NiallDoherty

AutoGenMacFur

Apr 10th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. gen = peripheral.wrap("front")
  2. bat = peripheral.wrap("ic2:batbox_1")
  3. mac = peripheral.wrap("ic2:macerator_1")
  4. fur = peripheral.wrap("ic2:electric_furnace_0")
  5.  
  6. maxEU = bat.getEUCapacity()
  7. monitor = peripheral.wrap("monitor_1")
  8. monitor.setTextScale(0.5)
  9.  
  10. while true do
  11. --[[    if bat.getEUStored() == maxEU then
  12.         gen.pushItems("up", 2)
  13.     elseif bat.getEUStored() < (maxEU / 4) then
  14.         gen.pullItems("up", 1)
  15.     end]]
  16.     if mac.getItemMeta(2) ~= nil then    
  17.         if mac.getItemMeta(2).count >= 1 then
  18.             mac.pushItems("east", 2)
  19.         end
  20.     end
  21.     if fur.getItemMeta(2) ~= nil then
  22.         if fur.getItemMeta(2).count >= 1 then
  23.             fur.pushItems("east", 2)
  24.         end
  25.     end
  26.     term.redirect(monitor)
  27.     term.clear()
  28.     term.setCursorPos(1,1)
  29.     print("Energy Stored: "..bat.getEUStored().." EU")
  30.     if mac.getItemMeta(7) ~= nil then
  31.         print("Currently macerating: "..mac.getItemMeta(7).displayName)
  32.     else
  33.         print("Not currently macerating.")
  34.     end
  35.     if fur.getItemMeta(7) ~= nil then
  36.         print("Currently smelting: "..fur.getItemMeta(7).displayName)
  37.     else
  38.         print("Not currently smelting.")
  39.     end    
  40.     term.native()
  41.     sleep(10)
  42. end
Add Comment
Please, Sign In to add comment