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

Tunnel x 2

Started by metron80, 10 June 2014 - 03:06 AM
metron80 #1
Posted 10 June 2014 - 05:06 AM
Finally! After about a year of procrastinating, I have completed rewriting it into a less buggy program that does the same thing! (Plus more!) (With less bugs!) Introducing:


Tunnel x 2

It's double the tunnel!


What it does:

What this program does is makes a tunnel of a specified length. The turtle making this tunnel has maximum efficiency by mining up, down, left, right, and forward, mining 5 blocks per unit of fuel! If the inventory gets full, it will place a chest, empty the items, and continue mining the same tunnel. It automatically updates, and saves it's progress.

How to use it:

SpoilerUsage: tunnel2 <length> [StopOnBlockAb]. Length is how far the turtle will mine. "StopOnBlockAb" is a boolean value that is not required. If true, it will stop and return as soon as there is the absence of a block in front of the turtle. Place the turtle facing toward the mining direction. Example on right:

[attachment=2334:2015-07-30_10.34.56.png]

It will then ask you to throw some chests on top of it. Throw a stack of chests on top of it, it doesn't matter how much, just 64 or under. Then it will ask you the same about torches. Repeat the process with torches. Now it mines a beautiful t-shaped tunnel (On left)! It will place a torch every 12 blocks, and a chest every time it's inventory gets full. When it comes back, it will tell you how many chests it left in the tunnel. Then you may retrieve the turtle.

Known Bugs:

Spoiler
  • No known bugs! Please report any you notice.

Changelog:

Spoilerv1.0
  • Release!
v1.1
  • Major bug fixes: The program auto-restarts, The program breaks the chest, other less major ones.
  • Added auto-refuel
  • Fixed chest bug. More efficient supply return.
v1.2
  • Minor bug fix
  • Got rid of Gravel problem
v1.3
  • Minor bug fix
v2.0!
  • Fixed all known bugs in 1.3
  • Added torch place feature
  • Added ability to stop at absence of block
  • Changed the way turtle dropped off items
v2.1
  • Fixed: If an entity gets in the way, it no longer thinks it went forward, even though it didn't
v2.2
  • Added auto-updating
v2.4a
  • Added auto-saving progress of tunnel (May be buggy)
v2.4b
  • Improved auto-save performance, not buggy anymore.
v2.5
  • Now saves chestNum (Number of chests placed in the tunnel) in the autosave.

Additional Notes:
  • It's gravel-proof!
  • Mining turtle required. Works on advanced and normal.
  • In order to not use chests or torches, drop something else instead of torch or chest when it requests them. Keep in mind though that instead of placing the chest/torch it will place whatever you gave it.
  • Chest not required, although if no chest is provided, the turtle will just spew out the items into the side of the tunnel.
  • Torches not required.
  • Best used on the side of a mountain or chunk mine. Set StopOnBlockAb as true if you want it to come back when it reaches the other side, or a cave.
  • It automatically updates as of v2.2, so don't worry about coming back to the download link every day. You MUST have access to pastebin to auto-update, or you have to manually update it.
  • It automatically saves it's progress, so if the world shuts down, or it goes into an unloaded chunk, just find it and start up the program again. It will ask you if you want to resume, then say "Yes". Then you just turn it facing forward using the arrow keys, press enter, and it continues mining the same tunnel, to the original specified length.
Download:

v2.5: (Stable)
pastebin get 2ybU4SQW tunnel2
http://pastebin.com/2ybU4SQW



Please report any bugs or suggestions in this thread and I will do my best to accommodate you. Thank you and enjoy Tunnel x 2!
Edited on 05 August 2015 - 01:44 PM
metron80 #2
Posted 13 June 2014 - 04:31 AM
Fixed major code issues and back online.
metron80 #3
Posted 31 July 2014 - 10:54 PM
New update: Minor bug fixes
ThisOneGuy #4
Posted 12 October 2014 - 06:17 PM
Very nice program! :D/> Works great and I see no problems with it.
jackzmc #5
Posted 12 October 2014 - 08:00 PM
Sweet! Maybe you could make it place torches?
Also I put 100, but it kept mining for so far longer than 100.
Edited on 12 October 2014 - 06:37 PM
metron80 #6
Posted 12 October 2014 - 09:47 PM
Sweet! Maybe you could make it place torches?
Also I put 100, but it kept mining for so far longer than 100.

I will have to take a look at that bug. What happened to make it do that? How many times did it come back to drop off items? I will look into torch placing in 1.1.

Very nice program! :D/> Works great and I see no problems with it.

Thanks!
Edited on 12 October 2014 - 07:48 PM
jackzmc #7
Posted 12 October 2014 - 11:27 PM
Sweet! Maybe you could make it place torches?
Also I put 100, but it kept mining for so far longer than 100.

I will have to take a look at that bug. What happened to make it do that? How many times did it come back to drop off items? I will look into torch placing in 1.1.

Thanks!
It never went to refill to the chest, because it never got full. I tried manually putting items in, and it just dropped the items it mined then.
EDIT: I am currently testing it with 20 blocks.

EDIT2: It stopped at 20 blocks, maybe before i guessed wrong (I didn't actually count the blocks)
Edited on 13 October 2014 - 01:52 PM
metron80 #8
Posted 30 October 2014 - 09:10 PM
Sweet! Maybe you could make it place torches?
Also I put 100, but it kept mining for so far longer than 100.

I will have to take a look at that bug. What happened to make it do that? How many times did it come back to drop off items? I will look into torch placing in 1.1.

Thanks!
It never went to refill to the chest, because it never got full. I tried manually putting items in, and it just dropped the items it mined then.
EDIT: I am currently testing it with 20 blocks.

EDIT2: It stopped at 20 blocks, maybe before i guessed wrong (I didn't actually count the blocks)

First of all, sorry for the late reply.
Yeah, there is a problem regarding going long distances.


P.S. New Update! v1.3 out now! Working on v2.0.

Edit: Fixed in v2.0!
Edited on 31 July 2015 - 01:49 PM
metron80 #9
Posted 29 July 2015 - 03:53 AM
Version v2.0 is out now! (After all year!)
metron80 #10
Posted 29 July 2015 - 04:34 PM
Updated to v2.2: Added auto-updating.
Currently working on saving when world exits, or it goes out of loaded chunks. Then you can continue mining.
ThisOneGuy #11
Posted 30 July 2015 - 04:45 PM
I've been waiting for this! Thank you! It took forever though. :P/> Much better than before, though! :)/> Great job!
metron80 #12
Posted 31 July 2015 - 03:51 PM
I've been waiting for this! Thank you! It took forever though. :P/> Much better than before, though! :)/> Great job!
Thanks!
metron80 #13
Posted 31 July 2015 - 05:25 PM
Added auto-saving in v2.4a.

EDIT: Improved it in v2.4b, less buggy.
Edited on 02 August 2015 - 05:46 PM
rockyacev1 #14
Posted 28 September 2015 - 04:40 PM
Keep saying Not Enough fuel to go 100 blocks but i put 64 coal :(/>
Konlab #15
Posted 29 September 2015 - 03:19 PM
Suggestion: customizable height, width and turning off torches and chests and ability to return and drop items at the beginning of the tunnel?
Anyways cool program, i like the save-ability ;)/>