Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("I need a width!")
- local width = read()
- width = width + 0
- print("I need a height!")
- local height = read()
- height = height + 0
- xoff = 0
- yoff = 0
- n = 1
- function Slice(wh,ht)
- for j = 1, wh do
- column(ht)
- if n % 2 == 1 then
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- n = n + 1
- else
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnRight()
- n = n + 1
- end
- end
- end
- function column(ht)
- for i = 1, ht do
- turtle.digDown()
- if i < ht then
- turtle.dig()
- turtle.forward()
- end
- end
- end
- function getBack()
- turtle.turnLeft()
- for i = 1, width do
- turtle.dig()
- turtle.forward()
- end
- turtle.turnRight()
- for j = 1, height - 1 do
- turtle.dig()
- turtle.forward()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- end
- function emptyInventory()
- local xd = 0
- turtle.turnLeft()
- turtle.turnLeft()
- succes,data = turtle.inspect()
- while data.name ~= "minecraft:chest" do
- turtle.up()
- xd = xd + 1
- succes,data = turtle.inspect()
- end
- for k = 1, 16 do
- turtle.select(k)
- turtle.drop()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.select(1)
- for l = 1 , xd do
- turtle.down()
- end
- end
- while true do
- if turtle.getItemCount(16) > 0 then
- emptyInventory()
- end
- Slice(width,height)
- getBack()
- turtle.down()
- n = 1
- end
- print("yoff:")
- print(yoff)
- print("xoff:")
- print(xoff)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement