Advertisement
LeonTheCrusher

turt_test

Feb 26th, 2025
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. local success, data = turtle.inspect()
  2.  
  3. if success then
  4.   print("Block name: " .. data.name)
  5.   print("Block metadata: " .. tostring(data.metadata))
  6.  
  7.   -- If running Minecraft 1.8+, print the block state details
  8.   if data.state then
  9.     print("Block state details:")
  10.     for key, value in pairs(data.state) do
  11.       print("  " .. key .. ": " .. tostring(value))
  12.     end
  13.   end
  14. else
  15.   print("No block detected: " .. data)
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement