实验性只读 实验性entity只读 实验性is只读 实验性type静态 只读 实验性component实验性装备槽位,例如 "head"(头部)、"chest"(胸部)、"offhand"(副手)。
The equipment slot. e.g. "head", "chest", "offhand"
返回装备在指定装备槽位中的物品。若为空,则返回 undefined。
Returns the item equipped to the given EquipmentSlot. If empty, returns undefined.
实验性装备槽位,例如 "head"(头部)、"chest"(胸部)、"offhand"(副手)。 The equipment slot. e.g. "head", "chest", "offhand".
返回与指定装备槽位对应的 ContainerSlot(容器槽位)。
Returns the ContainerSlot corresponding to the given EquipmentSlot.
实验性装备槽位,例如 "head"(头部)、"chest"(胸部)、"offhand"(副手)。
The equipment slot. e.g. "head", "chest", "offhand".
可选itemStack: ItemStack要装备的物品。若为 undefined,则清空该槽位。
The item to equip. If undefined, clears the slot.
替换指定装备槽位中的物品。
Replaces the item in the given EquipmentSlot.
此函数无法在只读模式下调用。
无法在只读模式下调用此函数,详见 WorldBeforeEvents。
提供对生物装备槽的访问。此组件存在于所有生物实体上。
Provides access to a mob's equipment slots. This component exists for all mob entities.
示例: givePlayerElytra.ts