Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = peripheral.wrap("back")
- local mobs
- while true do
- mobs = p.getEntityIds("mob")
- if (table.getn(mobs) == 0) then
- rs.setAnalogOutput("bottom", 0)
- end
- for k,v in pairs(mobs) do
- local dragon = (p.getEntityData(v,"mob").basic().name)
- print (dragon)
- if (dragon) == "Ender Dragon" then
- rs.setAnalogOutput("bottom", 15)
- else
- rs.setAnalogOutput("bottom", 0)
- end
- end
- os.sleep(10)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement