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