EnderDig

by: worshiprick

18 Votes22 Comments1 File (5,440 bytes)

Digs a user-specified cube (room / tunnel), dumps all blocks into the enderchest you give it, option to eat found coal, place torches, returns to starting point, and avoids wasting fuel on backtracking while digging. Requires only a standard mining turtle. No need for a home computer, floppy disks, rednet stuff, advanced turtles or anything. Just fuel up a mining turtle, give him an enderchest to fill and let him go.

Premium Project Mining Turtle Chunk Loader Turtle

As always, give any new turtles a unique label after you build them.

Assuming that is done, fuel him up and place him in the corner of the tunnel or room you want him to dig. When you place him, he will dig UP, LEFT and FORWARD.

Enter this script (which will just load another script so you stay up-to-date):

pastebin get 4CUbKQW5 dignow

Now, your turtle is set up. You can place him in the corner of an area you want him to dig and type "dignow" to begin.
Key Filename Size Options
#gjdh47 dignow 5,440 bytes Download View/Install
Feature Matrix:
Feature Required Optional Unused
Advanced Computer Unused
Advanced Monitor Unused
Computer Unused
Monitor Unused
Disk Drive Unused
Turtle Unused
Digging Turtle Unused
Felling Turtle Unused
Mining Turtle Required
Wireless Turtle Unused
RedPower Support:
Feature Required Optional Unused
Bundled Cable Unused
ccSensors Support:
Feature Required Optional Unused
ccSensors Unused
MiscPeripherals Support:
Feature Required Optional Unused
Feeding Turtle Unused
Chunk Loader Turtle Optional
Laser Turtle Unused
Resupply Turtle Unused
Solar Turtle Unused
Shearing Turtle Unused
Compass Turtle Unused
Wrench Turtle Unused
Treetap Turtle Unused
Alchemist Turtle Unused
Sign Reader Turtle Unused
REther Turtle Unused
Tank Turtle Unused
Inventory Turtle Unused
Thaum Scanner Turtle Unused
MFFS Turtle Unused
RTG Turtle Unused
Charge Station Unused
Iron Note Block Unused
Resupply Station Unused
Interactive Sorter Unused
Gate Reader Unused
Rail Reader Unused
Nuclear Information Reader Unused
Turtle Teleporter Unused
Player Detector Unused
Computer Controlled Crafter Unused
Tree Analyzer Unused

User Comments 22 Comments

Hey there, I really like your program, though I have one thing that I think I should point out. When I put the torches in slot 15 like it asks me to, it doesn't place them and just sends them through the Ender Chest along with everything else. Besides that, and that is no big deal to me, I am immensely thankful of your program because I have been looking for a program that is this exactly! Thank you very much!

by Kezaraux02/02/2013 07:35:03 pm


Thanks for your feedback! I updated the script to fix the torch placing bit. You should automatically get this fix the next time you run the program (assuming you used the "pastebin get 4CUbKQW5 dignow" method).

Let me know if every 7 blocks is decent torch spacing. If something else works better, I'll update it.

by worshiprick02/16/2013 12:56:37 pm


Update: torches now placed every 8 blocks instead of 7. If it's an odd number, every other torch gets placed on the opposite side of the wall. This is good for lighting, but it means the turtles eats up a line of torches on his way back to the starting point.

If anyone wants the staggered torches and for the turtle to not eat them up on the way back, I can work on that. Waiting to see if anyone cares before I put in the hours :)

by worshiprick02/16/2013 01:55:48 pm


Any chance to have support for digging down?

by darkmoo02/20/2013 09:40:16 pm


Best turtle digging program ever.

by mistAr_bAttles03/03/2013 12:22:20 am


One problem i've found is that if you make a tunnel 4 wide the tunnel spawns mob as the right side is never lit, only the left :(

by darkmoo03/03/2013 07:41:02 pm


Hey Worshiprick, Love the script just one question. Someone seems to be stealing the contents of my enderchest. Rather it disappears so I have a feeling maybe someone has a pipe connected to theirs. Anyhow, Is there a way that I can do a dye code or a lock on it that will work with the turtle and your script? fairly new at the game. Admin from the server suggested a dye code which I have no idea how to make.

by hiztorygaming03/08/2013 02:55:20 pm


Hiztorygaming, are you using an all white enderchest? If you are, you should use some dye on the white squares on the top of the enderchest while it's placed on the ground. This will color code them and make the contents of that chest only available to other enderchests with the same color. For instance if you use cocoa on the middle square of the enderchest to turn it brown and then do the same to a second enderchest so their color scheme is white/brown/white then all contents of those chests will be available to any other enderchest with the same color scheme. You can then put that colored enderchest into the turtle and then place the other enderchest in your base and get the contents and not worry about anyone else getting them.

by mistAr_bAttles03/12/2013 02:39:40 pm


Hello, after I make a mining turtle I have my borther program it so I can type "dignow" the turtle will ask me for the dimensions and then it goes and digs it out. I'm hoping you can explain to me how to get a new turtle todo that so I dont have to bother him all the time thank you.

by Amsw238703/20/2013 04:03:54 am


This may be a silly question, but is the enderchest a hard requirement for storage, or can i place any type of chest behind the starting block to have the turtle populate with gathered blocks (similar to default turtle function)?

by drudeseal03/28/2013 10:34:06 am


Feature suggestion:

Rather than having fuel in slot 16 directly have the option of putting an ender chest in slot 16 that fuel will be extracted from. Place the chest, suck, refuel, dig the chest. It is what I am doing in my current big infinite quarry turtle project and seems to work pretty well, although I guess it may be overkill for a finite dig like this program is designed for.

by TrabberShir04/16/2013 02:14:21 am


I would second that Feature suggestion.

Find name the turtle. I'm having problems "Attempt to compare Number with string expected, got number"

by ZzZone2205/11/2013 02:45:31 pm


Heya worshiprick. I was hoping I could provide a negative Y value and use this program as a quarry of sorts, but that obviously doesn't work. I rewrote your code a bit so that when you input a Y coordinate in the startup sequence, it'll interpret that as "how deep do you want me to dig this hole. I thought I'd share it here if you were interested: http://pastebin.com/2MT6yW6X

by TacoStorm05/23/2013 01:26:15 pm


Does it resume on chunk reload?

If it doesn't, you can use a file to keep track of the progress of the mining. Teach it to keep track of what direction that it is facing, then teach it to use this to keep track of where it is relative to the starting point. Then, when the program is started back up, It first looks at the file, and if it has stuff and things in it, it tries to follow the stuff and things. you may need to make a program that clears the "buffer".

There may bee a simpler way, but personally I think that turtles should have a way to keep their train of thought anyway.

@drudeseal I think that the ender chest is put into the inventory so that it can place the chest, drop off the items, break the chest, and move on. The ender chest needs to be optional, though.

by Pinaz99306/25/2013 07:53:14 pm


can someone help me plz :((

I'm german so my englisch is not the best, but i was reading this thread and was very intressted at this script so i download it on my singleplayer map(where it work very good).

but now i wanted to install it on my server (Im not the Admin) so i read something about pastebin and a market and i googled it but i found nothing
so is there a way to copy the script on my mc server with have accses on the server folders?

plz help me and send me a mail at:

timenzlein@googlemail.com

by timtam10207/01/2013 04:32:50 am


sorry guyz i found it now :D

dont know how to delet my commnt ^^

by timtam10207/01/2013 04:53:31 am


Hello!!! I use this code all the time and I actually have a few suggestions that I wouldn't mind adding to this if someone would possibly help me. I know the basics of the coding, but the only problem I have with this is that when I have this turtle mine for a couple thousand squares he runs out of fuel and he just digs straight across a ravine so I have to go and put down some blocks to walk across. The not putting down blocks isn't too bad, but the fuel part is for me. Is there anyway to add some code to this to have the turtle check it's fuel and if it's below a certain amount it places down an ender chest in a different slot than the first one to gather fuel from? I normally have my turtle mine for at least 1000 squares if not more and when I want to go 10,000 there is no fuel that allows that so I would have to manually refill it which can be a pain if you don't know how far it has gone. Is there any way to add this small part or someone who is willing to help teach me how to add that part?

by iRitch1607/18/2013 11:40:21 am


Everytime I run this script, it stops working mid way through. I'm not leaving the chunk, nor is the turtle running out of fuel. What's goin on!?!

by youngtuck07/31/2013 01:02:32 pm


For some reason my turtle loses his ender chest after 3 or 4 loads. I've checked on him and I see he still has the chest but eventually I will be gone and the blocks will be dropped everywhere with no chest in sight.

by NinjAlt10/05/2013 05:33:49 am


Hi worshiprick, i need your help! How to upload a file to TurtleScripts.com? Thanks in advance!

by bmakica1002/14/2014 12:38:32 pm


Can this be optimised so that you use a wireless computer and a wireless mining turtle so that I can have multiple turtles mining at the same time

by King_Of_All06/07/2014 10:24:56 pm


for programming the turtle do i write every single line into the mining turtle? because i put all the lines i that where necessary and its not working PLEASE HELP!!!!!

by masterc832111/10/2014 07:18:26 am


Leave a comment:
You must be logged in to add a comment.