Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- 2013 (c) psychedelixx
- Minecraft Turtle: Fir Chopper
- 2013-05-22
- Chops a whole fir tree and returns to the ground. It should work on every other 1x1 tree as well.
- Usage:
- - Place the turtle on the ground in front of the fir tree
- - use turtle and type "label set <name>"
- (to give your turtle an unique name so it remembers its programs)
- - type "pastebin get X3TfSMR2 fir"
- - type "fir"
- --]]
- if turtle.getFuelLevel() == 0 then
- turtle.refuel()
- end
- if turtle.getFuelLevel() == 0 then
- print("I need fuel!")
- else
- print("======== 2013 (c) psychedelixx ========")
- print("Let's go!")
- h=0
- turtle.dig()
- turtle.forward()
- repeat
- print("Fuel: " .. turtle.getFuelLevel())
- turtle.digUp()
- turtle.up()
- h = h+1
- if turtle.getFuelLevel() < 2 then
- turtle.refuel()
- end
- until not turtle.detectUp()
- while h>0 do
- print("Fuel: " .. turtle.getFuelLevel())
- turtle.down()
- h = h-1
- if turtle.getFuelLevel() < 2 then
- turtle.refuel()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement