Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Setup by facing a glass block
- -- Turn until facing the glass block
- function turnToGlass()
- success, data = turtle.inspect()
- if success then
- while data.name ~= "minecraft:glass" do
- turtle.turnRight()
- success, data = turtle.inspect()
- end
- end
- end
- turnToGlass()
- -- We are now facing the glass block
- function getNewHammer()
- turnToGlass()
- turtle.select(1)
- turtle.turnLeft()
- -- wait until we have a hammer
- while turtle.getItemCount(1) == 0 do
- turtle.suck()
- sleep(1)
- end
- turtle.turnRight()
- end
- while true do
- -- First check if we have a copper hammer
- if turtle.getItemCount(1) == 0 then
- getNewHammer()
- end
- -- Now grab ores from the barrel. These are behind the turtle
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.select(2)
- turtle.suck()
- -- Now craft the ores into dust
- turtle.craft()
- -- Now put dust in the barrel, which is to the right of the glass block
- turtle.turnLeft()
- for i = 2, 16 do
- turtle.select(i)
- turtle.drop()
- end
- turnToGlass()
- end
Advertisement
Add Comment
Please, Sign In to add comment