Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[Attempt at tree harvesting on a circuit--]]
- os.loadAPI('pond')
- local rowlength=1
- local blockspace=1
- local treecounter=1
- treecounter = tonumber(treecounter)
- print('How many tree plots in a row?') --Queries the user
- rowlength = io.read()
- rowlength = tonumber(rowlength)
- print('How many blocks between trees?') --Queries the user
- blockspace = io.read()
- blockspace = tonumber(blockspace)
- --Move forward until something stops the turtle
- while not turtle.detect() do
- turtle.forward()
- end
- --Position turtle to start lumberjill
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- while pond.selectEmptySlot() do
- while treecounter < rowlength do
- if not turtle.detect() then pond.selectItem('minecraft:sapling')
- turtle.place() --Plant sapling
- else shell.run('lumberjill')
- end
- turtle.turnLeft()
- for i = 1, blockspace do
- turtle.forward()
- end -- end of forward movement
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement