Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --This program will draw items out
- --of an ender chest and sort them.
- itemID = 0
- itemID = turtle.getItemDetail(1)
- local directory = "/path/"
- function bp(line)
- return directory..line
- end
- --item names
- planks = "minecraft:planks"
- ironore = "minecraft:iron_ore"
- goldore = "minecraft:gold_ore"
- silverore = "ThermalFoundation:Ore"
- copperore = "ThermalFoundation:Ore"
- ferrousore = "ThermalFoundation:Ore"
- aluminumore = "TConstruct:SearedBrick"
- tinore = "ThermalFoundation:Ore"
- leadore = "ThermalFoundation:Ore"
- cobblestone = "minecraft:cobblestone"
- coal = "minecraft:coal"
- dirt = "minecraft:dirt"
- gravel = "minecraft:gravel"
- sand = "minecraft:sand"
- redstone = "minecraft:redstone"
- diamond = "minecraft:diamond"
- lapis = "minecraft:dye"
- logs = "minecraft:log"
- sapphire = "ProjRed|Core:projectred.core.part"
- peridot = "ProjRed|Core:projectred.core.part"
- ruby = "ProjRed|Core:projectred.core.part"
- certus = "appliedenergistics2:item.ItemMultiMaterial"
- trash = {
- "chisel:andesite",
- "chisel:granite",
- "chisel:limestone",
- "minecraft:dirt",
- "minecraft:gravel",
- "chisel:marble",
- "ProjRed:Exploration:projectred.exploration.stone"
- }
- --utility functions
- function tf()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- end
- function tb()
- turtle.back()
- turtle.back()
- turtle.back()
- end
- function pg()
- turtle.turnRight()
- tf()
- turtle.turnLeft()
- turtle.forward()
- turtle.drop()
- turtle.back()
- turtle.turnLeft()
- tf()
- turtle.turnRight()
- end
- --item storage functions
- function Certus()
- shell.run(bp("certus"))
- end
- function LeadOre()
- shell.run(bp("leadore"))
- end
- function TinOre()
- shell.run(bp("tinore"))
- end
- function Ruby()
- shell.run(bp("ruby"))
- end
- function Peridot()
- shell.run(bp("peridot"))
- end
- function Sapphire()
- shell.run(bp("sapphire"))
- end
- function Redstone()
- shell.run(bp("redstone"))
- end
- function Coal()
- shell.run(bp("coal"))
- end
- function Lapis()
- shell.run(bp("lapis"))
- end
- function Diamond()
- shell.run(bp("diamond"))
- end
- function Trash()
- turtle.turnLeft()
- for i=1,7 do
- turtle.forward()
- end
- turtle.drop()
- turtle.turnRight()
- turtle.turnRight()
- for i=1,7 do
- turtle.forward()
- end
- turtle.turnLeft()
- end
- function Planks()
- shell.run(bp("oakplanks"))
- end
- function IronOre()
- shell.run(bp("ironore"))
- end
- function GoldOre()
- shell.run(bp("goldore"))
- end
- function SilverOre()
- shell.run(bp("silverore"))
- end
- function CopperOre()
- shell.run(bp("copperore"))
- end
- function FerrousOre()
- shell.run(bp("ferrousore"))
- end
- function AluminumOre()
- shell.run(bp("aluminumore"))
- end
- function Cobblestone()
- shell.run(bp("cobblestone"))
- end
- function Logs()
- shell.run(bp("logs"))
- end
- while true do
- shell.run("itemcheck")
- for i=1,#trash do
- if itemID.name == trash[i] then
- Trash()
- end
- end
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.drop()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- end
- T = ""
- end
- os.sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement