Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local detector = peripheral.find("environmentDetector")
- -- e.g. prints "Biome: minecraft:plains"
- print("Biome: " .. detector.getBiome())
- for k, v in pairs(detector.scanEntities(5)) do
- print(k, v)
- print("---------------------")
- for key, value in pairs(v) do
- if (key == "name") then
- print(value:find("Bee"))
- print(("Bee with name: %s"):format(value))
- end
- print(key, value)
- sleep(1)
- if (key == "tags") then
- print("TAGS START___")
- for j, a in pairs(value) do
- print(j, a)
- end
- print("TAGS END_____")
- end
- -- if (key == "name") then
- -- print(key, value)
- -- end
- end
- print("---------------------")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement