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