类 LivingUseTotemEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event

public class LivingUseTotemEvent extends LivingEvent
Fired when an Entity attempts to use a totem to prevent its death.

This event is cancellable, and does not have a result. If this event is cancelled, the totem will not prevent the entity's death.

This event is fired on the Forge event bus, only on the logical server.

  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • getSource

      public DamageSource getSource()
      返回 the damage source that caused the entity to die。
      返回:
      the damage source that caused the entity to die
    • getTotem

      public ItemStack getTotem()
      返回 the totem of undying being used from the entity's inventory。
      返回:
      the totem of undying being used from the entity's inventory
    • getHandHolding

      public InteractionHand getHandHolding()
      返回 the hand holding the totem。
      返回:
      the hand holding the totem