read if gay
This commit is contained in:
parent
4f2631b349
commit
61eefcba8c
24 changed files with 21871 additions and 4224 deletions
|
@ -11,9 +11,9 @@ function build(chunk)
|
|||
for w = 1,8 do
|
||||
store[h][w] = {depth = 0}
|
||||
for d = 1,8 do
|
||||
bool, data = sf.blockat(x+w,z+d,y+h)
|
||||
bool, block = sf.blockat(x+w,z+d,y+h)
|
||||
if bool then
|
||||
store[h][w][d] = data
|
||||
store[h][w][d] = block
|
||||
store[h][w].depth = d
|
||||
grocerylist[store[h][w][d]] =
|
||||
(grocerylist[store[h][w][d]] or 0)+1
|
||||
|
@ -28,9 +28,9 @@ function build(chunk)
|
|||
end
|
||||
end
|
||||
if store.height==0 then
|
||||
print("cell at",x,y,z,"is done")
|
||||
--print("cell at",x,y,z,"is done")
|
||||
return true
|
||||
|
||||
|
||||
end
|
||||
flag = false
|
||||
count = im.countinventory()
|
||||
|
@ -45,26 +45,29 @@ function build(chunk)
|
|||
flag = true
|
||||
end
|
||||
if flag then
|
||||
pf.to(vector.new(pf.home.x,position.y+8,pf.home.z))
|
||||
pf.returnHome()
|
||||
return false
|
||||
pf.to(vector.new(pf.home.x,position.y+8,pf.home.z))
|
||||
pf.returnHome()
|
||||
return false
|
||||
end
|
||||
pf.to(origin + vector.new(x+1,y+8,z+1))
|
||||
--print("going")
|
||||
--pf.to(origin+vector.new(1,1,1))
|
||||
--im.select("minecraft:barrel")
|
||||
--turtle.placeDown()
|
||||
flag = false
|
||||
for w = 1,8 do
|
||||
for h = 1,8 do
|
||||
for d = 1,8 do
|
||||
for d = 1,8 do
|
||||
if store[h][w][d] then
|
||||
pf.to(origin+vector.new(x+w,y+h,z+d))
|
||||
im.select(store[h][w][d])
|
||||
turtle.placeDown()
|
||||
flage = true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if flag and im.select("minecraft:birch_sign") then
|
||||
pf.to(position+vector.new(0,1,0))
|
||||
turtle.placeDown(chunk)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
@ -75,11 +78,14 @@ function stringtovec(str)
|
|||
end
|
||||
return unpack(parts)
|
||||
end
|
||||
repeat
|
||||
rednet.send(1,nil,"getnexttobuild")
|
||||
print(chunk)
|
||||
|
||||
repeat
|
||||
rednet.send(1,(_G.position-origin):tostring(),"getnexttobuild")
|
||||
_,chunk = rednet.receive("nexttobuild")
|
||||
until not build(chunk)
|
||||
until not build(chunk)
|
||||
|
||||
rednet.send(1,chunk,"failedtobuild")
|
||||
|
||||
pf.returnHome()
|
||||
|
||||
|
||||
|
|
|
@ -16,11 +16,11 @@ function fell(index)
|
|||
im.select("minecraft:birch_sapling")
|
||||
print("going towards tree")
|
||||
pf.lookat(trees[index or math.random(#trees)])
|
||||
has, data = turtle.inspect()
|
||||
print(has,data)
|
||||
if
|
||||
has and data.name ==
|
||||
"minecraft:birch_log"
|
||||
has, block = turtle.inspect()
|
||||
print(has,block)
|
||||
if
|
||||
has and block.name ==
|
||||
"minecraft:birch_log"
|
||||
then
|
||||
turtle.dig()
|
||||
turtle.forward()
|
||||
|
@ -39,7 +39,7 @@ end
|
|||
|
||||
for i = 1,#trees do
|
||||
fell(i)
|
||||
end
|
||||
pf.returnHome()
|
||||
|
||||
end
|
||||
pf.returnHome()
|
||||
|
||||
|
||||
|
|
14
computer/3/obsidian.lua
Normal file
14
computer/3/obsidian.lua
Normal file
|
@ -0,0 +1,14 @@
|
|||
for i = 1,10 do
|
||||
for j = 1,8 do
|
||||
turtle.digDown()
|
||||
turtle.forward()
|
||||
end
|
||||
turtle.turnLeft()
|
||||
turtle.digDown()
|
||||
if math.mod(i,2) == 0 then
|
||||
turtle.forward()
|
||||
else
|
||||
turtle.back()
|
||||
end
|
||||
turtle.turnLeft()
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue