Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DUMP_BELT = {
- "minecraft:coal",
- "thermal:cinnabar",
- "minecraft:quartz",
- "thermal:ruby",
- "thermal:sulfur",
- "thermal:niter",
- "appliedenergistics2:certus_quartz_crystal",
- "minecraft:lapis_lazuli",
- "occultism:otherstone",
- "minecraft:glowstone_dust",
- "thermal:sapphire",
- "minecraft:diamond",
- "minecraft:emerald",
- }
- DUMP_HOPPER = {
- "tconstruct:cobalt_ore",
- }
- DUMP_GRINDER = {
- "create:crushed_nickel_ore",
- "create:crushed_copper_ore",
- "create:crushed_zinc_ore",
- "create:crushed_lead_ore",
- "create:crushed_gold_ore",
- "create:crushed_iron_ore",
- }
- function search(list, item)
- for index, value in pairs(list) do
- if (item == value) then
- return true
- end
- end
- return false
- end
- function dumpFromList()
- print("Dumping Inventory...")
- local item = turtle.getItemDetail(1)
- if(item ~= nil) then
- if (search(DUMP_BELT, item["name"])) then
- print("Dropping into Belt >> " .. item["name"])
- turtle.turnLeft()
- while (not turtle.drop()) do end
- turtle.turnRight()
- return true
- end
- if (search(DUMP_HOPPER, item["name"])) then
- print("Dropping into Hopper >> " .. item["name"])
- turtle.turnLeft()
- turtle.turnLeft()
- while (not turtle.drop()) do end
- turtle.turnLeft()
- turtle.turnLeft()
- return true
- end
- if (search(DUMP_GRINDER, item["name"])) then
- print("Dropping into Grinder >> " .. item["name"])
- turtle.turnRight()
- while (not turtle.dropDown()) do end
- turtle.turnLeft()
- return true
- end
- end
- end
- while true do
- while (not turtle.suckUp(1)) do end
- turtle.place()
- turtle.dig()
- dumpFromList()
- end
Add Comment
Please, Sign In to add comment