Class LivingEntityUseItemEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.living.LivingEvent
net.minecraftforge.event.entity.living.LivingEntityUseItemEvent
- Direct Known Subclasses:
LivingEntityUseItemEvent.Finish,LivingEntityUseItemEvent.Start,LivingEntityUseItemEvent.Stop,LivingEntityUseItemEvent.Tick
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFired after an item has fully finished being used.static classFired when a player starts 'using' an item, typically when they hold right mouse.static classFired when a player stops using an item without the use duration timing out.static classFired every tick that a player is 'using' an item, seeLivingEntityUseItemEvent.Startfor info.Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingTickEvent, LivingEvent.LivingVisibilityEventNested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructingNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateLivingEntityUseItemEvent(LivingEntity entity, @NotNull ItemStack item, int duration) -
Method Summary
Modifier and TypeMethodDescriptionint@NotNull ItemStackgetItem()voidsetDuration(int duration) Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityMethods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
item
-
duration
private int duration
-
-
Constructor Details
-
LivingEntityUseItemEvent
private LivingEntityUseItemEvent(LivingEntity entity, @NotNull @NotNull ItemStack item, int duration)
-
-
Method Details
-
getItem
-
getDuration
public int getDuration() -
setDuration
public void setDuration(int duration)
-