ItemContainerSlot
Implements
Index
Constructors
constructor
Parameters
id: number
count: number
data: number
Returns ItemContainerSlot
Properties
count
data
extra
id
Methods
asJson
Returns JSONObject
Following ItemContainerSlot as org.json.JSONObject instance.
asScriptable
Returns ItemInstance
Following ItemContainerSlot as ItemInstance object.
clear
Clears slot contents.
Returns void
dropAt
Drops slot contents in given world at given coords.
Parameters
region: BlockSource
x: number
y: number
z: number
Returns void
getContainer
Returns ItemContainer
Container linked to the slot.
getCount
Returns number
Count of the item in slot.
getData
Returns number
Data of the item in slot.
getExtra
Returns ItemExtraData
Extra data object of the item in slot, or
null
if it is not present in the given item.
getId
Returns number
Numeric ID of the item in slot.
getName
Returns string
Slot name.
isEmpty
Returns boolean
Whether the slot is empty or not.
isSavingEnabled
Returns boolean
markDirty
Refreshes slot in UI.
Returns void
resetSavingEnabled
Returns void
set
Sets slot contents.
Parameters
id: number
count: number
data: number
extra: ItemExtraData
Returns void
setSavingEnabled
Parameters
enabled: boolean
Returns void
setSlot
Sets slot contents.
Parameters
id: number
count: number
data: number
Returns void
validate
Resets slot if it's ID or count equals
0
.Returns void