One item stack, live. Handles come from e:held_item(), e:equipped(slot),
inventory.item, game.item(id) and similar. A handle for an
inventory slot tracks whatever sits in that slot now.
Method
Returns
id(), name(), count()
Item id ("minecraft:diamond_sword"), display name, stack size
Bracketed chat name, [Diamond Sword] with a show-item hover
lore()
Lore lines, or nil
tooltip([advanced])
Tooltip lines exactly as the inventory renders them
Data components
Method
Returns
has_component(id)
true when the stack carries it
component(id)
Decoded Lua value, true when present but not decodable, nil when absent
local held = player:held_item()if held:enchantments()["minecraft:sharpness"] then print(held:name() .. " has Sharpness")endif held:has_component("minecraft:piercing_weapon") then local weapon = held:component("minecraft:piercing_weapon") print(held:name() .. " dismounts: " .. tostring(weapon.dismounts))end