This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
coloco21's profile picture

DiamondsMiner v0.35 [Torch counter, bug fixes]

Started by coloco21, 04 July 2012 - 06:41 PM
coloco21 #1
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 :
  1. Stone
  2. Dirt
  3. Gravel
  4. Diamond Ore [or any ore you want to get]
  5. Cobblestone
  6. Another cobblestone OR Gold ore
  7. Another cobblestone OR Iron ore
  8. Torches ! Or if you don't want torches then use Cobblestone or Gold ore
  9. NOTHING (or diamonds)
You must fill all the slots except one, the last one. Also, here's a schema to show you where are located each slot :

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
TODO List :
  • 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
Known bugs :
  • 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.
If you have any idea of things to add, let me know !


Tip : You can see the code without downloading it by going here : http://pastebin.com/WkJ5vZLd
Sorry for my english…


Have fun !
coloco21 #2
Posted 07 July 2012 - 12:42 PM
I will try to make a big update tomorrow. Stay tuned :P/>/>
Cruor #3
Posted 07 July 2012 - 04:17 PM
good work coloco :P/>/>

~Cruor
coloco21 #4
Posted 09 July 2012 - 10:47 AM
Sorry I was lazy yesterday… I will make it today (if I can - I mean if it works…). As you might have waited for nothing, I will tell you what I will do today :
- Upgrade to 1.0 -> Automatically explore diamond veins when it find somes.

I will make it, then test it several times to find bugs (it will take some time), and then make a video, upload it in HD (about 30mn) and then edit the post :)/>/>

Aproximate hour for the release : 16h GMT
Currently I'm in GMT+1 (+1h due to summer).
If you want to calculate it -> See the hour of this post : I'm posting it at 11h46 (AM of course). So it is 9h46 GMT. The release will be at 6PM for me, so…