Class 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.

  • Field Details

  • Constructor Details

  • Method Details

    • getSource

      public DamageSource getSource()
      Returns the damage source that caused the entity to die.
      Returns:
      the damage source that caused the entity to die
    • getTotem

      public ItemStack getTotem()
      Returns the totem of undying being used from the entity's inventory.
      Returns:
      the totem of undying being used from the entity's inventory
    • getHandHolding

      public InteractionHand getHandHolding()
      Returns the hand holding the totem.
      Returns:
      the hand holding the totem