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