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

minecraft:mob_effect_immunity

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

Overview

minecraft:mob_effect_immunity is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Makes the entity immune to the listed status effects, so they are never applied to it. Use it for a fire mob that ignores poison or a boss that can't be slowed.

Fields

FieldTypeDefaultDescription
mob_effectsArraynoneNames of the effects this entity ignores, such as poison or wither.

Example

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

BP/entities/<name>.json
{
  "minecraft:mob_effect_immunity": {
    "mob_effects": {}
  }
}

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