Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- laag = 0
- bezig = true
- richting = "down"
- function doeLaag()
- for i = 1, 4, 1 do
- succes, data = turtle.inspect()
- if data.name ~= "minecraft:stone" or data.name ~= "minecraft:dirt" then
- checkInventory()
- turtle.select(3)
- turtle.dig()
- end
- turtle.turnLeft()
- end
- end
- function checkInventory()
- turtle.select(16)
- if turtle.getItemCount() ~= 0 then
- turtle.select(1)
- turtle.placeUp()
- for i =3, 16, 1 do
- turtle.select(i)
- turtle.dropUp()
- end
- turtle.select(1)
- turtle.digUp()
- end
- end
- function gaTerug()
- for i = 0, laag, 1 do
- turtle.up()
- end
- end
- function main()
- checkBrandstof()
- turtle.digDown()
- if turtle.down() then
- laag = laag + 1
- doeLaag()
- else
- gaTerug()
- bezig = false
- end
- end
- function checkBrandstof()
- if turtle.getFuelLevel() < 1500 then
- turtle.select(2)
- turtle.refuel(1)
- else
- print("Nog voldoende brandstof")
- end
- end
- while bezig == true do main() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement