Advertisement
MigasRocha

Untitled

Jul 27th, 2022
902
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. local chest = peripheral.find("minecraft:chest")
  2. local item = chest.getItemDetail(1)
  3. if not item then print("No item") return end
  4.  
  5. print(("%s (%s)"):format(item.displayName, item.name))
  6. print(("Count: %d/%d"):format(item.count, item.maxCount))
  7.  
  8. for _, group in pairs(item.itemGroups) do
  9.   print(("Group: %s"):format(group.displayName))
  10. end
  11.  
  12. if item.damage then
  13.   print(("Damage: %d/%d"):format(item.damage, item.maxDamage))
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement