Advertisement
Thujed

Untitled

Apr 28th, 2024 (edited)
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. local detector = peripheral.find("environmentDetector")
  2.  
  3. -- e.g. prints "Biome: minecraft:plains"
  4. print("Biome: " .. detector.getBiome())
  5.  
  6. for k, v in pairs(detector.scanEntities(5)) do
  7. print(k, v)
  8. print("---------------------")
  9. for key, value in pairs(v) do
  10. if (key == "name") then
  11. print(value:find("Bee"))
  12. print(("Bee with name: %s"):format(value))
  13. end
  14. print(key, value)
  15. sleep(1)
  16. if (key == "tags") then
  17. print("TAGS START___")
  18. for j, a in pairs(value) do
  19. print(j, a)
  20. end
  21. print("TAGS END_____")
  22. end
  23. -- if (key == "name") then
  24. -- print(key, value)
  25. -- end
  26. end
  27. print("---------------------")
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement