类 ItemUseOnAfterEvent实验性

表示对方块使用物品时触发的后置事件。描述了物品的信息与使用的目标方块。 该事件会在玩家成功触发与方块的交互后发生。

Contains information related to an item being used on a block. This event fires when an item used by a player successfully triggers a block interaction.

层级 (查看完整内容)

属性

block: Block

物品使用的目标方块。

The block that the item is used on.

blockFace: Direction

物品在方块的哪一面被使用。

The face of the block that an item is being used on.

faceLocation: Vector3

物品在方块的面上被使用时,交互点相对于方块西北方底部顶点的坐标。

Location relative to the bottom north-west corner of the block where the item is placed.

isFirstEvent: boolean

This value will be true if the event was triggered on players initial interaction button press and false on events triggered from holding the interaction button.

itemStack: ItemStack

对方块使用物品时物品所在的物品堆叠。

The impacted item stack that is being used on a block.

source: Player

该事件的触发来源实体。

Returns the source entity that triggered this item event.