Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modem = peripheral.wrap("bottom")
- local input_chest = "minecraft:chest_1"
- local output_crate = "botania:open_crate_"
- local num_foods = 6
- local num_crates = 4
- local crate_offset = 7
- local food_delay = 4
- while (true) do
- for food_id=1, num_foods do
- while not redstone.getInput("back") do
- sleep(4)
- end
- local item = modem.callRemote(input_chest, "getItemDetail", food_id)
- if item and item.count > num_crates then
- for crate_id=1, num_crates do
- modem.callRemote(input_chest, "pushItems", output_crate..(crate_offset+crate_id), food_id, 1)
- end
- sleep(4)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment