Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function turnaroundLeft()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- end
- function turnaroundRight()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- function isEven(x)
- if (x % 2 == 0) then
- return 1
- else
- return 0
- end
- end
- function runHarvestPlant()
- for i = 0, 21 do
- currentBlockSuccess, currentBlockData = turtle.inspectDown()
- if (currentBlockSuccess) then
- if (currentBlockData["name"] == "minecraft:wheat" ) then
- if(7 == currentBlockData["state"]["age"]) then
- turtle.digDown()
- for s = 0, 3 do turtle.suckDown() end
- turtle.placeDown()
- end
- for s = 0, 3 do turtle.suckDown() end
- end
- turtle.placeDown()
- turtle.forward()
- for s = 0, 3 do turtle.suckDown() end
- end
- end
- turtle.forward()
- end
- turtle.placeDown()
- --runHarvestPlant()
- function field()
- for j = 0, 5 do
- turtle.placeDown()
- runHarvestPlant()
- if (isEven(j)==1) then
- turnaroundLeft()
- else
- turnaroundRight()
- end
- turtle.placeDown()
- end
- turtle.turnRight()
- for f = 0, 5 do
- turtle.forward()
- end
- turtle.turnLeft()
- end
- field()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement