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