Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.clear()
- term.setCursorPos(1,1)
- turtle.select(1)
- local data = turtle.getItemDetail()
- if data.name == "minecraft:sapling" then
- print("Derzeit befinden sich noch: ", data.count, " Saplings in Slot 1")
- if data.count < 10 then
- print("Bitte mindestens noch: ", 10-data.count, " Saplings in Slot 1 legen!")
- print("Saplins eingelegt und bereit das Programm fortzufahren?")
- print("Druecke einfach irgendeine Taste um fortzufahren!")
- os.pullEvent("key")
- elseif data.count > 10 then
- print("und somit genug zum starten!")
- end
- elseif data.name ~= "minecraft:sapling" then
- print("Es befinden sich keine Saplings in Slot 1!")
- end
- function faellen()
- for i=1,8 do
- turtle.dig()
- turtle.digUp()
- turtle.up()
- end
- for i=1,8 do
- turtle.down()
- end
- turtle.select(1)
- turtle.place()
- end
- function zustand()
- if turtle.compare(1) == true then
- print("Derzeit noch ein Setzling!")
- print("...Mache mit dem naechsten Baum weiter!")
- elseif turtle.compare(1) == false then
- print("Bereits ein Baum!")
- print("Ich werde ihn nun faellen!")
- faellen()
- end
- end
- zustand()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement