1. Wiki
  2. /Entities
  3. /minecraft:mob_effect

minecraft:mob_effect

Don't want to write this by hand? GodCraft sets minecraft:mob_effect for you with a switch.Get GodCraft

Overview

minecraft:mob_effect is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Gives a potion effect to nearby entities, like a pufferfish poisoning anything that gets close.

Fields

FieldTypeDefaultDescription
ambientBoolean"false"Treats the effect like a beacon effect, with fainter particles.
cooldown_timeInteger"0"Seconds to wait between applying the effect.
effect_rangeDecimal"0.2"How close in blocks an entity must be to get the effect.
effect_timeInteger"10"How many seconds the effect lasts, or "infinite".
entity_filterMinecraft FilternoneWhich entities can receive the effect.
mob_effectStringnoneThe effect to give, such as poison.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:mob_effect": {
    "ambient": "false",
    "cooldown_time": "0",
    "effect_range": "0.2",
    "effect_time": "10",
    "entity_filter": {},
    "mob_effect": ""
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more