Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local orechest = peripheral.wrap("minecraft:chest_0")
- local targetchest = peripheral.wrap("minecraft:barrel_0")
- local needItem = {"minecraft:raw_iron", "create:raw_zinc","minecraft:redstone", "minecraft:lapis_lazuli", "bewitchment:raw_silver", "minecraft:raw_gold", "minecraft:diamond", "minecraft:raw_iron_block"}
- local barrelStorage = {"minecraft:barrel_1","minecraft:barrel_2","minecraft:barrel_3","minecraft:barrel_4","minecraft:barrel_5","minecraft:barrel_6",}
- local function barrelPush()
- for slot, item in pairs(targetchest.list()) do
- for i = 1,6 do
- targetchest.pushItems(barrelStorage[i],slot)
- end
- end
- end
- while true do
- for slot, item in pairs(orechest.list()) do
- for i = 1,8 do
- if item.name == needItem[i]
- then
- print(("%d x %s in slot %d"):format(item.count, item.name, slot))
- orechest.pushItems("minecraft:barrel_0", slot)
- end
- end
- end
- barrelPush()
- sleep(20)
- end
Add Comment
Please, Sign In to add comment