Cooldown progress [0, 1] — 1 just after use, down to 0 when ready
inventory.slot()
Selected hotbar slot (0–8)
inventory.set_slot(i)
Selects a hotbar slot (0–8)
Slot numbering
Range
Meaning
0
Crafting result
1–4
Crafting grid
5–8
Armor (helmet → boots)
9–35
Main inventory
36–44
Hotbar
45
Offhand
module:event("tick", function() local totem = inventory.find("minecraft:totem_of_undying") if totem and inventory.item(45):id() ~= "minecraft:totem_of_undying" then inventory.swap(totem, 45) endend)