osmarks

ore thing

Jun 10th, 2021 (edited)
608
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local m = peripheral.find("modem", function(_, o) return o.isWireless() end)
  2.  
  3. local function send_metric(...)
  4.     m.transmit(3054, 3054, {...})
  5. end
  6.  
  7. function pulse(side)
  8.     rs.setOutput(side,true)
  9.     sleep(0.05)
  10.     rs.setOutput(side,false)
  11.     sleep(0.05)
  12. end
  13.  
  14. while true do
  15.     local exists, data = turtle.inspect()
  16.     if not exists then sleep(0.05)
  17.     elseif data.name == "minecraft:netherrack" or data.name == "minecraft:stone" then pulse "left"
  18.     else send_metric("ores_made", "quantity of ores summoned from beespace", "inc", 1) pulse "right" end
  19. end
RAW Paste Data