Posted 21 November 2014 - 03:19 PM
Hey guys
I'm currently in the process of writing my own mining scripts, and I've just run into weirdness.
I've noticed that most people will write their gravel handling like this
If someone with a deep knowledge of ComputerCraft could explain to me why this happens, that would be awesome. I can live with doing things inefficiently, but only if I know I have to and why.
Or maybe if there's a workaround to make them both go full speed, that would be even better.
Thanks in advance,
Axim
I'm currently in the process of writing my own mining scripts, and I've just run into weirdness.
I've noticed that most people will write their gravel handling like this
while turtle.detect() do turtle.dig() end
I kinda feel as though this wastes valuable computation cycles so I prefer
while turtle.dig() do end
which works perfectly fine clearing a gravel tower in front of the turtle. However
while turtle.digUp() do end
does not work to clear one on top. It'll just dig one block then fail to detect another and end. So a bit of trial and error later I find the exact amount of sleep I need to add to make it work, which is 0.35 seconds. However now it is considerably slower than the one digging in front. I tested this with two turtles both digging a 100 block high gravel tower; the turtle digging up had about 10 blocks left when the other was done.If someone with a deep knowledge of ComputerCraft could explain to me why this happens, that would be awesome. I can live with doing things inefficiently, but only if I know I have to and why.
Or maybe if there's a workaround to make them both go full speed, that would be even better.
Thanks in advance,
Axim