Posted 04 April 2013 - 07:38 PM
So quick explanation first: When I mine, I dig in a straight line - then every 3rd block I create a perpindicular path. I wrote a program that digs a tunnel; digs out the walls - and replaces them cobblestone. Basically, I end up with a 1 x 3 tunnel, where everything around it (top, bottom and sides) is dug out and replaced with cobblestone.
My problem is bedrock. Currently, to account for gravel - I dig and check again if there's a block; and keep doing that until I can place cobble. Bedrock is a problem - any way around this? Currently, I just try 5 times and then give up; but is there a better way of getting around cobble?
Here's my current code:
Please tell me there's a better way of doing this? :)/>
My problem is bedrock. Currently, to account for gravel - I dig and check again if there's a block; and keep doing that until I can place cobble. Bedrock is a problem - any way around this? Currently, I just try 5 times and then give up; but is there a better way of getting around cobble?
Here's my current code:
local function PlaceBlock()
checker = 0
while turtle.place() == false do
if turtle.detect() == false then
turtle.attack()
turtle.place()
else
turtle.dig()
turtle.place()
checker = checker +1
sleep(0.25)
if checker > 5 then
return
end
end
end
end
Please tell me there's a better way of doing this? :)/>