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

minecraft:hurt_on_condition

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

Overview

minecraft:hurt_on_condition is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Damages the entity when certain conditions are true, like standing in lava or touching water.

Fields

FieldTypeDefaultDescription
damage_conditionsArraynoneList of conditions, each with the damage type, amount and event to fire.

Example

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

BP/entities/<name>.json
{
  "minecraft:hurt_on_condition": {
    "damage_conditions": {}
  }
}

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