Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local utils = require "utils"
- OP_PLATE = "PLATE"
- OP_WIRE = "WIRE"
- OP_CABLE = "CABLE"
- run = false
- in_barrel_name = "minecraft:barrel_1"
- in_barrel = peripheral.wrap(in_barrel_name)
- compressor_name = "modern_industrialization:electric_compressor_1"
- compressor = peripheral.wrap(compressor_name)
- wiremill_name = "modern_industrialization:electric_wiremill_0"
- wiremill = peripheral.wrap(wiremill_name)
- out_barrel_name = "minecraft:barrel_2"
- out_barrel = peripheral.wrap(out_barrel_name)
- repeat
- --run = redstone.getInput("front")
- starting_item = in_barrel.list()[1]
- sleep(0.05)
- until starting_item ~= nil
- print("Moving from barrel to compressor")
- -- move from barrel to compressor
- while #in_barrel.list() ~= 0
- do
- compressor.pullItem(in_barrel_name, starting_item.name)
- sleep(0.05)
- end
- print("Moving from compressor to next step")
- compressor_item_out = compressor.items()[1]
- while #compressor.items() ~= 0
- do
- local destination = wiremill_name
- if redstone.getInput("front") then destination = out_barrel_name end
- compressor.pushItem(destination, compressor_item_out.name)
- sleep(0.05)
- end
- sleep(2)
- print(#compressor.items())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement