Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getItem(itemName)
- local inChest = peripheral.wrap("left")
- local size = inChest.size()
- for i=1, size do
- local contents = inChest.getItemDetail(i)
- if (contents ~= nil) then
- if (contents.name == itemName) then
- inChest.pushItems("top", i, 1)
- break
- end
- end
- end
- end
- local orb = peripheral.wrap("top")
- local inChest = peripheral.wrap("left")
- local outChest = peripheral.wrap("right")
- local size = inChest.size()
- while true do
- local finishSlot = orb.getItemDetail(1)
- local orbSlot1 = orb.getItemDetail(2)
- local orbSlot2 = orb.getItemDetail(3)
- local orbSlot3 = orb.getItemDetail(4)
- local orbSlot4 = orb.getItemDetail(5)
- local orbSlot5 = orb.getItemDetail(6)
- local orbSlot6 = orb.getItemDetail(7)
- if (orbSlot1 == nil and finishSlot == nil) then
- for i=1, size do
- local contents = inChest.getItemDetail(i)
- if (contents ~= nil) then
- if (contents.name == "minecraft:diamond" or contents.name == "minecraft:emerald" or contents.name == "minecraft:blaze_rod" or contents.name == "minecraft:iron_ingot"
- or contents.name == "minecraft:nether_star" or contents.name == "minecraft:blue_ice" or contents.name == "minecraft:ender_eye" or contents.name == "powah:uraninite_raw") then
- inChest.pushItems("top", i, 1)
- break
- end
- end
- end
- elseif (orbSlot1 ~= nil and orbSlot1.name == "minecraft:iron_ingot") then
- --Iron ingots for energized steel
- local goldSlot = orb.getItemDetail(3)
- if (goldSlot == nil) then
- getItem("minecraft:gold_ingot")
- end
- elseif (orbSlot1 ~= nil and orbSlot1.name == "minecraft:nether_star") then
- if orbSlot2 == nil then
- getItem("minecraft:redstone_block")
- elseif orbSlot3 == nil then
- getItem("minecraft:redstone_block")
- elseif orbSlot4 == nil then
- getItem("powah:blazing_crystal_block")
- end
- elseif (orbSlot1 ~= nil and orbSlot1.name == "minecraft:blue_ice") then
- if orbSlot2 == nil then
- getItem("minecraft:blue_ice")
- end
- elseif (orbSlot1 ~= nil and orbSlot1.name == "minecraft:ender_eye") then
- if orbSlot2 == nil then
- getItem("powah:dielectric_casing")
- elseif orbSlot3 == nil then
- getItem("powah:capacitor_basic_tiny")
- end
- elseif (finishSlot ~= nil) then
- if (finishSlot.name == "powah:steel_energized" or finishSlot.name == "powah:crystal_spirited"
- or finishSlot.name == "powah:crystal_niotic" or finishSlot.name == "powah:crystal_blazing" or finishSlot.name == "powah:crystal_nitro" or finishSlot.name == "powah:dry_ice"
- or finishSlot.name == "powah:ender_core" or finishSlot.name == "powah:uraninite") then
- orb.pushItems("right", 1)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement