Interface EntityEvent.LivingHurt
- Enclosing interface:
- EntityEvent
public static interface EntityEvent.LivingHurt
-
Method Summary
Modifier and TypeMethodDescriptionhurt(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.damagesource.DamageSource source, float amount) Invoked before an entity is hurt by a damage source.
-
Method Details
-
hurt
EventResult hurt(net.minecraft.world.entity.LivingEntity entity, net.minecraft.world.damagesource.DamageSource source, float amount) Invoked before an entity is hurt by a damage source. Equivalent to Forge'sLivingAttackEventevent.You currently cannot override the amount of damage the entity receives.
- Parameters:
entity- The entity that is attacked.source- The reason why the entity takes damage.amount- The amount of damage the entity takes.- Returns:
- A
EventResultdetermining the outcome of the event, the execution of the entity attack may be cancelled by the result.
-