Container
¶
文档版本:1.21.60.21
Container
类。script_api.mojang-minecraft.container.description
属性¶
emptySlotsCount
emptySlotsCount
:int32
- script_api.mojang-minecraft.container.emptyslotscount.description
size
size
:int32
- script_api.mojang-minecraft.container.size.description
方法¶
addItem
script_api.mojang-minecraft.container.additem.description
itemStack
:ItemStack
- script_api.mojang-minecraft.container.additem.itemstack.description
- 返回值:
void
- script_api.mojang-minecraft.container.additem.return
getItem
script_api.mojang-minecraft.container.getitem.description
slot
:int32
- script_api.mojang-minecraft.container.getitem.slot.description
- 返回值:
ItemStack
|undefined
- script_api.mojang-minecraft.container.getitem.return
setItem
script_api.mojang-minecraft.container.setitem.description
slot
:int32
- script_api.mojang-minecraft.container.setitem.slot.description
itemStack
:ItemStack
- script_api.mojang-minecraft.container.setitem.itemstack.description
- 返回值:
void
- script_api.mojang-minecraft.container.setitem.return
swapItems
script_api.mojang-minecraft.container.swapitems.description
slot
:int32
- script_api.mojang-minecraft.container.swapitems.slot.description
otherSlot
:int32
- script_api.mojang-minecraft.container.swapitems.otherslot.description
otherContainer
:Container
- script_api.mojang-minecraft.container.swapitems.othercontainer.description
- 返回值:
boolean
- script_api.mojang-minecraft.container.swapitems.return
transferItem
script_api.mojang-minecraft.container.transferitem.description
fromSlot
:int32
- script_api.mojang-minecraft.container.transferitem.fromslot.description
toSlot
:int32
- script_api.mojang-minecraft.container.transferitem.toslot.description
toContainer
:Container
- script_api.mojang-minecraft.container.transferitem.tocontainer.description
- 返回值:
boolean
- script_api.mojang-minecraft.container.transferitem.return