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

3x3 tunnel digger Really fast, handles lava, water, caverns...

Started by infinitebrainspace, 01 December 2014 - 07:28 PM
infinitebrainspace #1
Posted 01 December 2014 - 08:28 PM
Uses 9 turtles, absolutely synchronized, no lava / water spillage into tunnel. Places torches for you.
depending on how much ore is in tunnel, it is difficult to keep up with them.

Place any one of them in center of 3x3 wall, and run program. it will tell you what it needs to start.

NO MODEM REQUIRED. All 9 turtles have the same ID, and hence the same code. using file system to communicate.

center turtle is controller turtle, and torch placer. center turtle places other 8 turtles. startup code
decides weather turtle is controller or not based on air blocks above and below (wall needs a ceiling @4 blocks, and a floor).
startup code terminates if turtle is controller. controller places all the other turtles and uses turnOn() function to run startup code
in each one.

Place center turtle, load with cobblestone (first 9 slots), 8 turtles having same ID as controller in slot 10, and torches in slot 11.

run controller program (stand 3 or 4 blocks to the side of controller before hitting enter, since it will attack you if it can't back up).

If you don't know how to get 9 turtles having the same ID: (assuming you have access to the server/singleplayer world)

1. find the computer folder, and right click on the "lastID.txt" file. Select properties, and set the file attributes to "read only".
2. exit the properties dialog.
3. craft 9 mining turtles, but don't place them until you have them all crafted.
4. place them all on the ground, and use label set "fasttunnel" in each one, or name them what you want - just all the same.
5. edit "s" in one of them, and save it.
6. click on each of the others, and verify (dir, or list) that they all have a file "s" in their folder.
7. uncheck the read only box (refer to step 1) of the "lastID.txt" file.
8. copy attached files into the folder with the same number as the id of the 9 turtles.
9. Place one of them facing a wall in the center position of the 3x3 square you wish to make into a tunnel.
10. type dig 100 (it will dig 100 blocks deep) if you don't specify a depth, it will dig 10 deep.

I hope the attachments are available… if not, I need help to figure out how to upload them.
KingofGamesYami #2
Posted 01 December 2014 - 08:43 PM
Generally, you would want to make the program set itself up, not require the user to edit things themselves. Especially files CC can't access.
infinitebrainspace #3
Posted 01 December 2014 - 09:02 PM
Generally, you would want to make the program set itself up, not require the user to edit things themselves. Especially files CC can't access.

Hey! the quote thing worked this time.
I haven't found a way to set the ID of a turtle from within CC yet. Otherwise I would for sure do it that way.
the lastID file is below the root of the turtles file system. I would love to know how to do this within CC. I've been calling this process "cloning" a turtle / computer (even though that's not really an appropriate term). I use this to make pseudo - wireless communication without the range limitation, and also pertaining to my original ASK A PRO thread, I use it for teleporting with the pocket computer (hence the need to have the startup code run at chunk load). I don't expect the user to edit the lastID file, just put it into a "frozen" state momentarily. Also, I wouldn't expect a client user to have access to server files, so I guess these programs are very specific to server administrators, or SP environments. I could have done it wireless, and I guess it could be converted, but then you would have to use 9 inventory slots. If they all have the same ID and the same Label, they all go into one slot - not to mention the limitation of 16 slots in the controller turtle - 10 of which are already in use with cobblestone and torches.

I do have a single turtle 3x3 tunnel digger that also handles all the bad stuff, and places torches, but I fall asleep following it.
oh, the single turtle version will dig diagonally ( not up or down ) if given the "r" or "l" argument.

the single version does not require "cloning"
Edited on 01 December 2014 - 08:11 PM
Lyqyd #4
Posted 01 December 2014 - 09:22 PM
Thread closed. Please report your thread when you have code to show so it can be unlocked for you.