类 LivingEntityUseItemEvent.Start
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
net.neoforged.neoforge.event.entity.living.LivingEntityUseItemEvent.Start
- 所有已实现的接口:
net.neoforged.bus.api.ICancellableEvent
public static class LivingEntityUseItemEvent.Start
extends LivingEntityUseItemEvent
implements net.neoforged.bus.api.ICancellableEvent
Fired when a player starts 'using' an item, typically when they hold right mouse.
Examples:
Drawing a bow
Eating Food
Drinking Potions/Milk
Guarding with a sword
Cancel the event, or set the duration or <= 0 to prevent it from processing.
-
嵌套类概要
从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.living.LivingEntityUseItemEvent
LivingEntityUseItemEvent.Finish, LivingEntityUseItemEvent.Start, LivingEntityUseItemEvent.Stop, LivingEntityUseItemEvent.Tick
从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingVisibilityEvent
从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
-
构造器概要
构造器构造器说明Start
(LivingEntity entity, ItemStack item, int duration) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Start
(LivingEntity entity, ItemStack item, InteractionHand hand, int duration) -
方法概要
从类继承的方法 net.neoforged.neoforge.event.entity.living.LivingEntityUseItemEvent
getDuration, getHand, getItem, setDuration
从类继承的方法 net.neoforged.neoforge.event.entity.living.LivingEvent
getEntity
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
构造器详细资料
-
Start
@Deprecated(since="1.21.5", forRemoval=true) public Start(LivingEntity entity, ItemStack item, int duration) 已过时, 待删除: 此 API 元素将从以后的版本中删除。Usethe hand sensitive version
as this version provides wrong hand information -
Start
-
the hand sensitive version
as this version provides wrong hand information