Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function harvest()
- block, tag = turtle.inspect()
- if(block)
- then
- if (tag['name'] == "minecraft:bamboo")
- then
- turtle.dig()
- turtle.suckDown()
- end
- end
- end
- function move()
- if(turtle.detect())
- then
- turtle.turnLeft()
- else
- turtle.forward()
- end
- end
- function checkChests()
- turtle.turnRight()
- block, tag = turtle.inspect()
- if (block)
- then
- if(tag['tags']['forge:chests'] == true)
- then
- if(turtle.getItemCount() >= 15)
- then
- turtle.drop(1)
- end
- end
- end
- turtle.turnLeft()
- end
- function checkFuel()
- if turtle.getFuelLevel() <= 5
- then
- turtle.refuel(8)
- end
- end
- while(true)
- do
- harvest()
- move()
- checkChests()
- checkFuel()
- sleep(10)
- end
Advertisement
Add Comment
Please, Sign In to add comment