Class LivingUseTotemEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.living.LivingEvent
net.minecraftforge.event.entity.living.LivingUseTotemEvent
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.
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEventLivingEvent.LivingJumpEvent, LivingEvent.LivingTickEvent, LivingEvent.LivingVisibilityEventNested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEventEntityEvent.EnteringSection, EntityEvent.EntityConstructingNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Eventnet.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final InteractionHandprivate final DamageSourceprivate final ItemStack
- 
Constructor SummaryConstructorsConstructorDescriptionLivingUseTotemEvent(LivingEntity entity, DamageSource source, ItemStack totem, InteractionHand hand) 
- 
Method SummaryModifier and TypeMethodDescriptionReturns the hand holding the totem.Returns the damage source that caused the entity to die.getTotem()Returns the totem of undying being used from the entity's inventory.Methods inherited from class net.minecraftforge.event.entity.living.LivingEventgetEntityMethods inherited from class net.minecraftforge.eventbus.api.EventgetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
- 
Field Details- 
source
- 
totem
- 
hand
 
- 
- 
Constructor Details- 
LivingUseTotemEventpublic LivingUseTotemEvent(LivingEntity entity, DamageSource source, ItemStack totem, InteractionHand hand) 
 
- 
- 
Method Details- 
getSourceReturns the damage source that caused the entity to die.- Returns:
- the damage source that caused the entity to die
 
- 
getTotemReturns the totem of undying being used from the entity's inventory.- Returns:
- the totem of undying being used from the entity's inventory
 
- 
getHandHoldingReturns the hand holding the totem.- Returns:
- the hand holding the totem
 
 
-