类 LivingEntityUseItemEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.living.LivingEvent
net.neoforged.neoforge.event.entity.living.LivingEntityUseItemEvent
- 直接已知子类:
LivingEntityUseItemEvent.Finish
,LivingEntityUseItemEvent.Start
,LivingEntityUseItemEvent.Stop
,LivingEntityUseItemEvent.Tick
-
嵌套类概要
嵌套类修饰符和类型类说明static class
Fired after an item has fully finished being used.static class
Fired when a player starts 'using' an item, typically when they hold right mouse.static class
Fired when a player stops using an item without the use duration timing out.static class
Fired every tick that a player is 'using' an item, seeLivingEntityUseItemEvent.Start
for info.从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingVisibilityEvent
从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
-
字段概要
字段 -
构造器概要
构造器限定符构造器说明private
LivingEntityUseItemEvent
(LivingEntity entity, ItemStack item, int duration) private
LivingEntityUseItemEvent
(LivingEntity entity, ItemStack item, InteractionHand hand, int duration) -
方法概要
修饰符和类型方法说明int
getHand()
返回 the hand the entity is using the item in。getItem()
void
setDuration
(int duration) 从类继承的方法 net.neoforged.neoforge.event.entity.living.LivingEvent
getEntity
-
字段详细资料
-
item
-
hand
-
duration
private int duration
-
-
构造器详细资料
-
LivingEntityUseItemEvent
-
LivingEntityUseItemEvent
private LivingEntityUseItemEvent(LivingEntity entity, ItemStack item, InteractionHand hand, int duration)
-
-
方法详细资料
-
getItem
-
getDuration
public int getDuration() -
setDuration
public void setDuration(int duration) -
getHand
返回 the hand the entity is using the item in。- 返回:
- the hand the entity is using the item in
-