Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = 8
- y = 8
- r = 1
- a = true
- function start()
- print("Kohle in Slot 16 plazieren. 64 Seeds in Slot 1")
- turtle.select(16)
- turtle.refuel()
- turtle.select(1)
- print("Bitte Enter druecken")
- while a do
- local event, key, isHeld = os.pullEvent("key")
- if keys.getName(key) == "enter" then
- if turtle.getItemCount(1) == 0 then
- print("Bitte Samen einfuellen!")
- else
- term.clear()
- inspectFeld()
- a = false
- end
- end
- end
- end
- function inspectFeld()
- for i = 1,8,1 do
- for j = 1,8,1 do
- success, data = turtle.inspectDown()
- if success then
- if data.name ~= "minecraft:wheat" then
- turtle.digDown()
- turtle.placeDown()
- end
- else
- turtle.digDown()
- turtle.placeDown()
- end
- turtle.forward()
- end
- turn(r)
- r = r ==1 and 0 or 1
- end
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.turnRight()
- end
- function turn(richtung)
- if richtung == 1 then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- else
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- end
- end
- while true do
- start()
- print("fertig")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement