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
public class LivingEntityUseItemEvent extends LivingEvent
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLivingEntityUseItemEvent.FinishFired after an item has fully finished being used.static classLivingEntityUseItemEvent.StartFired when a player starts 'using' an item, typically when they hold right mouse.static classLivingEntityUseItemEvent.StopFired when a player stops using an item without the use duration timing out.static classLivingEntityUseItemEvent.TickFired 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.LivingUpdateEvent, LivingEvent.LivingVisibilityEvent
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
-
-
Constructor Summary
Constructors Modifier Constructor Description privateLivingEntityUseItemEvent(LivingEntity entity, ItemStack item, int duration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDuration()ItemStackgetItem()voidsetDuration(int duration)-
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Field Detail
-
item
private final ItemStack item
-
duration
private int duration
-
-
Constructor Detail
-
LivingEntityUseItemEvent
private LivingEntityUseItemEvent(LivingEntity entity, @Nonnull ItemStack item, int duration)
-
-
Method Detail
-
getItem
@Nonnull public ItemStack getItem()
-
getDuration
public int getDuration()
-
setDuration
public void setDuration(int duration)
-
-