Update pairing.lua
This commit is contained in:
parent
4db5bc77dd
commit
de2b2995f3
@ -1,3 +1,5 @@
|
|||||||
|
args = {...}
|
||||||
|
|
||||||
function pair(x, y)
|
function pair(x, y)
|
||||||
return math.floor((x + y) * (x + y + 1)/2 + y)
|
return math.floor((x + y) * (x + y + 1)/2 + y)
|
||||||
end
|
end
|
||||||
@ -49,6 +51,7 @@ function digTo(x, z)
|
|||||||
turtle.digUp()
|
turtle.digUp()
|
||||||
x = x - 1
|
x = x - 1
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function digSpot(i)
|
function digSpot(i)
|
||||||
x, z = ithSpot(i)
|
x, z = ithSpot(i)
|
||||||
@ -57,7 +60,6 @@ function digSpot(i)
|
|||||||
turtle.down()
|
turtle.down()
|
||||||
end
|
end
|
||||||
|
|
||||||
args = {...}
|
|
||||||
spotnum = tonumber(args[1])
|
spotnum = tonumber(args[1])
|
||||||
if spotnum then
|
if spotnum then
|
||||||
digSpot(spotNum)
|
digSpot(spotNum)
|
||||||
|
Loading…
Reference in New Issue
Block a user