Posted 17 January 2013 - 04:46 PM
I've been writing a program off and on for the past few days, based on the idea of having fully autonomous chunkloading mining turtles. (Note that this means good luck getting back any mining turtles you run with this program…)
As such, the goal of this program is to mine the most ores per unit of time per turtle. It currently doesn't check the sides of the (1x1) tunnel it digs except when it finds ores ahead/above/below - this is intentional, as fuel is cheap, and if it turns to check a side it takes longer per block exposed. If you want it to be thorough, change line 200 to digRecursively(true).
Code is on PasteBin; instructions are included at the top of the file. Just put dirt in slot 13, smoothstone in slot 14, an ender chest for blocks mined in slot 15, and an ender chest for fuel in slot 16.
If anyone has any questions / comments / suggestions, please tell me.
It currently has a limitation of only being able to dig 100 blocks per ore-mining mode, as it is recursive and there is a stack limit of ~240 calls (256 minus os use, I'm guessing…). I've been thinking about how to switch it over to a mapping of what blocks are mined / exposed, and if/when I do that I will call that v1. The biggest problem with a mapping is that I don't know how to optimize checking blocks, and have a sinking feeling that there is no "good" solution at all.
As such, the goal of this program is to mine the most ores per unit of time per turtle. It currently doesn't check the sides of the (1x1) tunnel it digs except when it finds ores ahead/above/below - this is intentional, as fuel is cheap, and if it turns to check a side it takes longer per block exposed. If you want it to be thorough, change line 200 to digRecursively(true).
Code is on PasteBin; instructions are included at the top of the file. Just put dirt in slot 13, smoothstone in slot 14, an ender chest for blocks mined in slot 15, and an ender chest for fuel in slot 16.
If anyone has any questions / comments / suggestions, please tell me.
It currently has a limitation of only being able to dig 100 blocks per ore-mining mode, as it is recursive and there is a stack limit of ~240 calls (256 minus os use, I'm guessing…). I've been thinking about how to switch it over to a mapping of what blocks are mined / exposed, and if/when I do that I will call that v1. The biggest problem with a mapping is that I don't know how to optimize checking blocks, and have a sinking feeling that there is no "good" solution at all.