类 LivingSwapItemsEvent.Hands
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.LivingSwapItemsEvent
net.neoforged.neoforge.event.entity.living.LivingSwapItemsEvent.Hands
- 所有已实现的接口:
net.neoforged.bus.api.ICancellableEvent
- 封闭类:
LivingSwapItemsEvent
public static class LivingSwapItemsEvent.Hands
extends LivingSwapItemsEvent
implements net.neoforged.bus.api.ICancellableEvent
This event is fired when a living entity is about to swap the items in their main and offhand.
This event is executed in
ServerGamePacketListenerImpl.handlePlayerAction(net.minecraft.network.protocol.game.ServerboundPlayerActionPacket)
This event is cancellable, and does not
.引用无效
have a result
-
嵌套类概要
从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.living.LivingSwapItemsEvent
LivingSwapItemsEvent.Hands
从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingVisibilityEvent
从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Gets the item that will be swapped to the main hand of the entity.Gets the item that will be swapped to the offhand of the entity.void
Sets the item that will be swapped to the main hand of the entity.void
Sets the item that will be swapped to the offhand of the entity.从类继承的方法 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
-
字段详细资料
-
toMainHand
-
toOffHand
-
-
构造器详细资料
-
Hands
-
-
方法详细资料
-
getItemSwappedToMainHand
Gets the item that will be swapped to the main hand of the entity.- 返回:
- The item that will be swapped to the main hand.
-
getItemSwappedToOffHand
Gets the item that will be swapped to the offhand of the entity.- 返回:
- The item that will be swapped to the offhand.
-
setItemSwappedToMainHand
Sets the item that will be swapped to the main hand of the entity.- 参数:
item
- The item to swap to the main hand.
-
setItemSwappedToOffHand
Sets the item that will be swapped to the offhand of the entity.- 参数:
item
- The item to swap to the offhand.
-