Advertisement
Thujed

hiveReader

Apr 26th, 2024 (edited)
567
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.82 KB | None | 0 0
  1. hive = peripheral.find("blockReader")
  2. print(hive.getBlockData()["BeeList"])
  3. if (hive.getBlockData()["BeeList"] ~= nil) then
  4.     print(#hive.getBlockData()["BeeList"]["Inhabitants"])
  5.     bees = hive.getBlockData()["BeeList"]["Inhabitants"]
  6.     for k,v in pairs(bees) do
  7.         print(k, v)
  8.         for key, value in pairs(v) do
  9.             print(key, value)
  10.         end
  11.         print("--------------------------")
  12.         os.sleep(1)
  13.     end
  14.  
  15.     for k, v in pairs (bees[1]["EntityData"]) do
  16.         print(k, v)
  17.         os.sleep(2)
  18.     end
  19. else
  20.     print("There is no bees")  
  21. end
  22.  
  23. -- for k, v in pairs(hive.getBlockData()["upgrades"]["Items"]) do  
  24. --     print(k, v)
  25. --     if (k == "BeeList") then
  26. --         for key, value in pairs(v) do  
  27. --             --print(key, value)
  28. --         end
  29. --     end
  30. -- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement