Beta
Beta
amountNumber of the items in the stack. Valid values range between 1-255. The provided value will be clamped to the item's maximum stack size.
This property can't be edited in read-only mode.
Readonly
Beta
isBeta
keepGets or sets whether the item is kept on death.
This property can't be edited in read-only mode.
Beta
lockGets or sets the item's lock mode. The default value is
ItemLockMode.none
.
This property can't be edited in read-only mode.
Readonly
Beta
maxOptional
Beta
nameGiven name of this stack of items. The name tag is displayed
when hovering over the item. Setting the name tag to an
empty string or undefined
will remove the name tag.
This property can't be edited in read-only mode.
Readonly
Beta
typeReadonly
Beta
typeBeta
Beta
Beta
Beta
The property identifier.
Returns the value for the property, or undefined if the property has not been set.
Beta
Returns the total size, in bytes, of all the dynamic properties that are currently stored for this entity. This includes the size of both the key and the value. This can be useful for diagnosing performance warning signs - if, for example, an entity has many megabytes of associated dynamic properties, it may be slow to load on various devices.
Beta
Returns a copy of the item in the slot. Returns undefined if the slot is empty.
Beta
An array of lore strings. If the item does not have lore, returns an empty array.
Beta
Returns all tags for the item in the slot. Return an empty array if the the slot is empty.
Beta
Beta
The item tag.
Returns false when the slot is empty or the item in the slot does not have the given tag.
Beta
The ItemStack that is being compared.
Returns whether this item stack can be stacked with the
given itemStack
.
Beta
Optional
blockIdentifiers: string[]The list of blocks, given by their identifiers.
The list of block types this item can break in Adventure mode. The block names are displayed in the item's tooltip. Setting the value to undefined will clear the list.
This function can't be called in read-only mode.
Beta
Optional
blockIdentifiers: string[]The list of blocks, given by their identifiers.
The list of block types this item can be placed on in Adventure mode. This is only applicable to block items. The block names are displayed in the item's tooltip. Setting the value to undefined will clear the list.
This function can't be called in read-only mode.
Beta
The property identifier.
Optional
value: string | number | boolean | Vector3Data value of the property to set.
Beta
Optional
itemStack: ItemStackThe ItemStack to be placed in the slot.
Sets the given ItemStack in the slot, replacing any existing item.
This function can't be called in read-only mode.
Beta
Optional
loreList: string[]A list of lore strings. Setting this argument to undefined will clear the lore.
Sets the lore value - a secondary display string - for an ItemStack.
This function can't be called in read-only mode.
Represents a slot within a broader container (e.g., entity inventory.)
Example: getMainhandSlotFromEquippble.js
Example: getMainhandSlotFromInventory.js