Posted 01 May 2014 - 07:19 PM
Hi everyone! I've been lurking these forums for a while but have never contributed myself until now. For while I have been searching for the perfect mining turtle Lua script that would mine only the interesting ores without leaving these gigantic gaping quarry holes that ruin the scenery no matter what biome you're in. Someone had posted a comment in the forums on this site (I have long ago lost that link) where the ideal mining turtle would dig only 1x1 vertical mineshafts all the way to bedrock, and do so in the same sort of pattern one would use to place water source blocks you see in many sugar cane farms: after digging a hole the next hole would be dug two blocks over and one block up, and this pattern would be repeated across the entire area.
It dawned on me that this pattern of digging would be relatively easy to define in a Lua script, so I wrote one that worked very well. Here's the pastebin link to the current version of the script:
http://pastebin.com/ft3Hm7nS
The procedure for using your mining turtle is as follows:
Some important notes!!!
Happy mining! :D/>
It dawned on me that this pattern of digging would be relatively easy to define in a Lua script, so I wrote one that worked very well. Here's the pastebin link to the current version of the script:
http://pastebin.com/ft3Hm7nS
The procedure for using your mining turtle is as follows:
- Place your standard mining turtle towards the area you want mined. Right now the turtle will mine a square area, the lower left-hand corner of which is directly underneath the turtle (the first block that it will start mining will be directly in front of the turtle). When you start the program, the turtle will mine forward and to the right of where it started until it has covered the entire square area
- Be sure to fuel up the turtle and label it so it doesn't forget about its state if it's broken
- Place a chest behind the turtle, preferably the double-chest. By default, the turtle will mine a 10x10 block area for ores, and it will be bring back a lot of items to store
- Place some "ignore" blocks in the turtle's inventory slots starting from slot 1. You can put up to 8 "ignore" blocks in the turtle. Suggested blocks to put in the turtle are listed further down this post
- Run the "pastebin" command to download and execute the script referenced in the link above
- The script will first ask how many "ignore" blocks you want to configure. You can specify anywhere between 0 to 8. Specifying 0 will cause the mining turtle to mine *everything*, and you will end up with a big gaping hole in the end.
- The script will ask you how big an area you want to mine. To mine a 20x20 area, enter 20 (the default is 10x10)
- Step back and let it run!
- cobble stone
- smooth stone
- gravel
- grass-covered dirt block* (you'll need a tool with silk touch to obtain this)
- regular dirt block*
Some important notes!!!
- This software is still relatively untested and *may* result in the loss of your turtle! I've been running it on my worlds without issues, but it's important to realize that you shouldn't run this program unless you're ready to deal with the potential loss of your turtle.
- Make sure to stay in the area where the turtle is mining and don't let the chunk(s) unload, or your turtle will get stuck. If you have the appropriate mods installed, chunk loaders are your friend
- The turtle is efficient, but I'd fuel it up to the max before letting it loose since there are no refueling abilities built in to the script. I'm running some tests now to see how much fuel you can expect the turtle to use, but results may vary based on how high you're starting from and how many blocks you've reserved for "ignore blocks (the fewer slots available for legitimate ores, the more frequently the turtle will have to return to base to unload its contents if its inventory ever fills up).
- This mining turtle program was designed to preserve the landscape to the best of its ability, but there are a few considerations to make. One, it will level the area it's mining so that it has a flat space to work on. Two, once it is done, you'll have a ton of 1x1 holes that will probably go all the way down to bedrock and/or the lava level. Be careful; either fence off the area somehow or remember to (carefully!) fill in those holes at the surface
- New update on 2014-05-02
- Fixed problem where if a block forms in turtle's path on way back to drop off items (water meets lava, etc), the turtle would have gotten stuck.
- Found issue where it turtle is at bedrock or very near it, it will sometime hang on a "turn" or a "move up" command. It happens largely when a turtle is underwater and happens to be next to a lava (source?) block. I can't replicate the issue under controlled circumstances in creative mode yet, so the root cause is as yet unknown. Only known fix for this is to remove the source of the water or lava, causing the turtle to resume operations as though nothing happened. I haven't seen this issue happen since the latest bug fix, so with any luck I won't see this problem occur again
Happy mining! :D/>
Edited on 05 May 2014 - 03:22 PM