BetaBetaType of item to create. See the MinecraftItemTypes enumeration for a list of standard item types in Minecraft experiences.
Optionalamount: numberNumber of items to place in the stack, between 1-255. The provided value will be clamped to the item's maximum stack size. Note that certain items can only have one item in the stack.
Creates a new instance of a stack of items for use in the world.
This function can't be called in read-only mode.
BetaamountNumber 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 BetaisBetakeepGets or sets whether the item is kept on death.
This property can't be edited in read-only mode.
BetalockGets or sets the item's lock mode. The default value is
ItemLockMode.none.
This property can't be edited in read-only mode.
Readonly BetamaxOptional BetanameGiven 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 BetatypeReadonly BetatypeBetaCreates an exact copy of the item stack, including any custom data or properties.
This function can't be called in read-only mode.
BetaThe identifier of the component (e.g., 'minecraft:food') to retrieve. If no namespace prefix is specified, 'minecraft:' is assumed. If the component is not present on the item stack, undefined is returned.
Gets a component (that represents additional capabilities) for an item stack.
This function can't be called in read-only mode.
BetaReturns all components that are both present on this item stack and supported by the API.
This function can't be called in read-only mode.
BetaAn array of lore strings. If the item does not have lore, returns an empty array.
Returns the lore value - a secondary display string - for an ItemStack.
This function can't be called in read-only mode.
BetaThe identifier of the component (e.g., 'minecraft:food') to retrieve. If no namespace prefix is specified, 'minecraft:' is assumed.
Returns true if the specified component is present on this item stack.
This function can't be called in read-only mode.
BetaReturns whether this item stack can be stacked with the
given itemStack. This is determined by comparing the item
type and any custom data and properties associated with the
item stacks. The amount of each item stack is not taken into
consideration.
This function can't be called in read-only mode.
BetaOptionalblockIdentifiers: string[]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.
BetaOptionalblockIdentifiers: string[]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.
BetaOptionalloreList: string[]Sets the lore value - a secondary display string - for an ItemStack.
This function can't be called in read-only mode.
BetaName of the item type event to trigger. If a namespace is not specified, minecraft: is assumed.
Triggers an item type event. For custom items, a number of events are defined in an items' definition for key item behaviors.
This function can't be called in read-only mode.
Defines a collection of items.