Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkIfStone()
- local success, data = turtle.inspect()
- if success then
- if data.name == "minecraft:stone" then
- return true
- end
- end
- return false
- end
- function checkInventory(curSlot)
- if turtle.getItemDetail() == nil or turtle.getItemDetail().name ~= "minecraft:stone" then
- repeat
- curSlot = curSlot + 1
- turtle.select(curSlot)
- until turtle.getItemDetail().name == "minecraft:stone"
- end
- return curSlot
- end
- function checkFuel(curSlot)
- if turtle.getFuelLevel() ~= "unlimited" and turtle.getFuelLevel() < 1 then
- turtle.select(16)
- while turtle.refuel(0) == false do
- print("Bitte Treibstoff in Slot 16 Füllen!")
- os.sleep(2)
- end
- turtle.refuel(1)
- turtle.select(curSlot)
- end
- end
- turtle.select(1)
- print("Fuel: Slot 16")
- print("Stone: Slot 1-15")
- print("Höhe: ")
- local height = read()
- print("Breite (nach rechts):")
- local width = read()
- curSlot = 1
- for i=1, width do
- for j=1, (height-1) do
- checkFuel(curSlot)
- if checkIfStone() == false then
- turtle.dig()
- curSlot = checkInventory(curSlot)
- turtle.place()
- end
- if i%2 == 1 and j ~= height then
- turtle.up()
- end
- if i%2 == 0 and j ~= height then
- turtle.down()
- end
- end
- if checkIfStone() == false then
- turtle.dig()
- curSlot = checkInventory(curSlot)
- turtle.place()
- end
- if i < tonumber(width) then
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- end
- end
- if tonumber(width)%2 == 1 then
- for i=0, (height-1) do
- turtle.down()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment