Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- sen = sensor.wrap("left")
- mon = peripheral.wrap("back")
- while true do
- mon.setCursorPos(1,1)
- mon.setTextColor(colors.red)
- mon.write("Alloy Furnace:")
- anzeigeB = 0
- anzeigeC = 0
- ziele = sen.getTargets()
- for k,v in pairs(ziele) do
- if v.Name == "Alloy Furnace"
- then
- details = sen.getTargetDetails(k)
- for i = 1,11 do
- if details.Slots[i].Name == "Bucket" then
- mengeB = details.Slots[i].Size
- anzeigeB = anzeigeB+mengeB
- end
- if details.Slots[i].Name == "Charcoal" then
- mengeC = details.Slots[i].Size
- anzeigeC = anzeigeC+mengeC
- end
- mon.setCursorPos(1,3)
- mon.setTextColor(colors.white)
- mon.write(" ")
- mon.setCursorPos(1,3)
- mon.write("Buckets: "..anzeigeB)
- mon.setCursorPos(1,4)
- mon.setTextColor(colors.brown)
- mon.write(" ")
- mon.setCursorPos(1,4)
- mon.write("Coal: "..anzeigeC)
- end
- end
- end
- sleep(5)
- end
Add Comment
Please, Sign In to add comment