Dokumentation
item
A stack of items.
Egenskaber 10
Item type, such as diamond_sword.
Number of items in the stack.
Custom name (none if not renamed).
Lore lines.
Enchantment shine without an enchantment. Handy for selected menu buttons.
Whether the item never loses durability.
Enchantments on the item as a map of name to level.
How worn a tool is (0 is new).
How many fit in one stack.
Custom model number for resource packs (none if unset).
Metoder 6
Custom data saved on the item with set_tag, or none. Use it to recognise your own items.
Saves custom data on the item (text, number, list, map). none removes it. Returns the item.
Hides enchantments, attributes and other extra tooltip lines. Returns the item.
True if both are the same kind of item with the same name, lore and tags (amount is ignored).
Adds an enchantment, e.g. item.enchant("sharpness", 3). Returns the item.
A separate copy of the stack.