Since I started two days ago, I have written a shaft mining program that suits my purposes very well. It is capable of automatically grabbing lava from the environment while it mines, and using it to refuel itself. It also builds an enclosure filling in any gaps and liquids around the shaft, and replacing ores it mines with cobblestone, so that it can tunnel through water, lava, and caves in such a way that a player can go in behind it without risk of burning or getting blown up. It also has a return function. After it mines a specified shaft length, it will come back and re-orient itself exactly as it was left.
Foogle Proof Mining Program Version 1.3 (pastebin link)
- mines 1x2 shafts of configurable distances (via command line argument)
- places inventory in chest underneath starting position when inventory is full
- places inventory in chest underneath starting position at conclusion of trip
- keeps bucket and torches in its inventory
- automatically returns to starting position
- mines nearby ores within 1 block of the shaft
- automatically obtains fuel (lava) from the environment
- creates a safe shaft that a player can walk through
- replaces adjacent water, lava, and air blocks with cobble to make shaft walls
- gravel proof: detects whether it was able to move into a spot -- if not, it mines there until it can move. Its count will not be negatively impacted by encountering gravel, and it will remain at the correct height.
- places torches every 14 blocks. Due to its tunnel building skills, water will not destroy them to my knowledge.
Changelog:
Planned Features:
automatically dispose of excess non-ore blocks- fill in empty wall spaces on return trip (this should only happen if it ran out of cobblestone)
- automatically return if it is low on fuel (this should only happen if it is not mining at diamond level)
automatically place inventory (except buckets and torches) in designated chestsautomatically place torches- custom shaft sizes (1x3, 2x2, 3x3)
- use any stone/cobblestone type block for building, not just cobblestone
If it runs out of cobblestone, it may place a random item insteadMay move down one block when in gravel (unknown cause)
Please take a look and/or try it in your turtle and share your thoughts. I'd love it if other people found this program useful.
If you fork it, please feel share your new code here.
Edited by Foogles, 20 January 2016 - 12:12 AM.