Posted 04 July 2012 - 08:41 PM
DiamondsMiner
Version 0.35 - By Coloco21
[left]This tool was made in order to mine diamonds easier. It's also a great code for Lua learners (I commented almost each line). It will mine a block that is above, below or in front of the turtle if this kind of block is in the turtle's inventory. This means you can use it to mine diamonds, coal, iron, gold, lapis, redstone… or everything you want. It also comes back when the turtle is full of diamonds (or anything else).
So, it makes a tunnel with a height of 3 blocks, and 1 block large. If you right click on the turtle you will directly see how many diamonds there are in it. It automatically places torches.[/left]
Video :
[media]http://youtu.be/5MN2QIyoxUI[/media]
Version 0.3. The current version (0.35) has a torch counter and no more gravel bug.
How to install it :
You first need to download the attached file. Then rename it to mine (remove the .txt at the end). If you want to be able to use it with any turtle, place it in the folder %appdata%/.minecraft/mods/ComputerCraft/lua/rom/programs/
If you want to use it with a specific turtle, move it to
%appdata%/.minecraft/saves/[the name of your world]/computer/[the ID of your turtle]/
To get the ID of your turtle, right click on your turtle in Minecraft and type ID, then press Enter.
How to use it :
Right click on your mining turtle. Then in its inventory, put the following blocks :
Slots :
- Stone
- Dirt
- Gravel
- Diamond Ore [or any ore you want to get]
- Cobblestone
- Another cobblestone OR Gold ore
- Another cobblestone OR Iron ore
- Torches ! Or if you don't want torches then use Cobblestone or Gold ore
- NOTHING (or diamonds)
1 - 2 - 3
4 - 5 - 6
7 - 8 - 9
Changelog :
- 0.35 : Added a torch counter below the diamond counter. Fixed a bug with torches and gravel.
- 0.3 : Added automatical torches.
- 0.2 : The turtle now comes back exactly at his first position.
- 0.13 : Fixed a bug when someone enters an invalid number (if he presses enter or enters letters)
- 0.12 : Added a question at the beginning, to let the user choose how many diamonds does he want (number between 1 and 64)
- 0.11 : Fixed the text (Diamonds Mined), now he updates himself without printing another below. Also, I removed the constant advertising ("Diamonds Miner, by coloco21")
- 0.1 : Original version
- Mine as many ores as you want
- Automatically explore the diamond veins
Put torches- Add some cool options
- Make the turtle to come back when he's stuck
When the turtle hits gravel and when gravel falls down, the loop makes that if it placed a torch at this place, this torch will be destroyed.- RARE : The turtle might place a stone block instead of a torch. I don't know why. To avoid it, place more than 1 stone block.
- Sometimes the turtle doesn't place any torch. I'm looking into this.
Tip : You can see the code without downloading it by going here : http://pastebin.com/WkJ5vZLd
Sorry for my english…
Have fun !