Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local inChest = peripheral.wrap("ironchest:diamond_chest_11")
- local hopper = "minecraft:hopper_8"
- local cPrefix = "ironchest:obsidian_chest_"
- local itemChests = {
- ["minecraft:stone_sword"] = hopper,
- ["minecraft:wither_skeleton_skull"] = "enderstorage:ender_chest_11",
- ["minecraft:bone"] = 326,
- ["minecraft:coal"] = 327,
- ["minecraft:gunpowder"] = 328,
- ["minecraft:creeper_head"] = 329
- }
- while true do
- for i = 1, inChest.size() do
- local item = inChest.getItemDetail(i)
- if item ~= nil then
- local gotoChest = cPrefix .. "325"
- if itemChests[item.name] ~= nil then
- if type(itemChests[item.name]) == "number" then
- gotoChest = cPrefix .. tostring(itemChests[item.name])
- else
- gotoChest = itemChests[item.name]
- end
- end
- local moved = inChest.pushItems(gotoChest, i, 64)
- if moved < item.count then
- inChest.pushItems(peripheral.wrap(hopper), i, 64)
- end
- end
- sleep(0)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement