Mine Turtle Instructions


The turtles have been programmed so that they will automatically refuel and gather torches which it places so as to light up the entire tunnel that it mines. it also automatically dumps the items into a chest. The turtle can be operated manually via the manual miner program or with another computer that has buttons that operate the turtles

Mods needed:
  • ComputerCraft
  • Chunky Peripherals (optional but highly recommended)
General Notes:
Any quotes (“) in the instructions should be left out. Only type in what is within the quotes
Parentheses (brackets) that are within the quotes are needed. Don’t leave them out
Everything that is typed in is case sensitive (Caps do matter)
Things encased in square brackets ([ and ]) are things you decide to enter. Don’t type the brackets in eg [name] means enter a name here (enter “Jane” not “[Jane]” without the quotes)

Pastebin Enabled
Make sure that your computer craft is pastebin enabled. Find out by going to your config folder in your minecraft file, find the computer craft config file, open it in wordpad or notepad. Look for this line:
# Enable the "http" API on Computers (see "http_whitelist" for more fine grained control than this)
B:http_enable=true

If your http_enable=false change the false to true. This allows you to download files from pastebin.

Start-up Program
This is a program that will start whenever the computer starts up. Most of the time this will be when you start up your game.
First we need a program named start up so type “edit startup”. This takes you to a blank screen. Type in this screen “shell.run(“[program name]”)” (the quotes in the brakets are important. The program name is obviously the one that you want to run when the computer is started up. Now press Ctrl button on your keyboard use the left and right arrow keys to select the save option and press enter. Do the same but select exit and press enter. Now hold Ctrl + R for about 5 seconds. This reboots the computer.

There is a video explaining the setup. I recommend you watch the video as the written instructions can get a bit confusing. Especially for the Remote Miners code. Check it out on YouTube. Link below:

Video coming soon.





Manual Miner

This is a program that I developed for early game use (as early game as a turtle gets). You just need a turtle and a chunk loader peripheral (little bit hard to craft I know). This is a basic program. If the chest that are needed are not stocked well and often then the turtle may run out of fuel, torches or won’t be able to put the items anywhere. This could lead to the turtle getting lost in the tunnel, the tunnel being dark so mobs spawn, or the turtle will run back and forth from the area its mining to the chest to try and place items. A big waste of Coal.
Instructions:
  1. Craft a turtle
  2. Turn it into a mining turtle
  3. Craft a chunk loader peripheral for Chunky Peripherals (optional but highly recommended)
[indent=1][/indent]
  1. Place down the turtle
  2. To the right of the turtle place a chest (can be a double chest)
  3. Place a chest on top of the first one and another on top of the second one

  1. Place torches in the middle chest and coal in the top chest
  2. Open the turtle (right click) and type in “lua” and press enter
  3. Put coal in the first slot (as much as you want but it will all be used so be careful)
  4. Type in “turtle.refuel()” and press enter (this uses the coal in the first slot to fuel the turtle)
  5. Put the Chunk Loader peripheral into the first slot (only if you did step 3)
  6. Type in “turtle.equipRight()” and press enter (not “equipright()”!) (only if you did step 3)
  7. Type in “exit()” (this closes the Lua interface)
  8. Type in “pastebin get kxQTZqZc [program name]” (this downloads the code, program name is what you will type to start the program)
  9. To run the program simply type in the name that you called it (The program name for previous step)
  10. It will ask you how far you would like to mine
  11. Enter a value and walk away (be reasonable. It can do 10000 blocks but if you close the game while the turtle is running it will be stuck where it last mined)
  12. It is advisable that you automatically empty the chest that stores items and fill the chest that have coal and torches
  13. Before closing the game make sure that all turtles are home so that you won’t lose any. (program stops when game is closed so turtle doesn’t come home)

Remote Miner (Advanced)

WARNING! This setup is complex. The guide is designed to be easy to follow but there are many steps. Basic knowledge on how to use the code editor required. You do not need to know how to code however.
This is intended to be a lot later game. It requires gold and ender pearls as well as quite a lot of other resources. A good items sorting and chest stocking infrastructure is advisable (one such as an AE system). For the mining program you will need:
  • a computer (possibly more than 1, advanced or basic)
  • advanced monitors (12 of them)
  • mining turtles (max 4) (make sure the pickaxe is on the left of the turtle)
  • a wireless modem for each turtle and one for the computer
  • a Chunk Loader peripheral for each turtle
  • chests (at least 3 per turtle)
  • wired modems (or wireless. Discussed later)
  • Networking cable (Not needed for wireless setup)
  • The ID’s of all the computers you will use including turtles (just type id into the computer interface to get the ID)
  • It is advisable that you chunk load the area where your turtles are (I recommend chicken chunks)
Instructions:
  1. Craft the items in the above list
  2. Turtle setup:
    1. Dig a 3 by 3 by 2 deep hole in the wall
    2. Place the turtle at the bottom row in the middle of the wall
    3. Place a chest to the right of the turtle (single or double)
    4. Place a chest above the one just placed and another above that (see diagram in Manual Miner instructions)
    5. Leave the bottom chest empty (automatically emptying the chest highly advised)
    6. Place torches in the middle chest and coal in the top one
    7. Now open up the turtle’s interface
    8. Type “lua”
    9. Place coal in the highlighted slot in the turtles inventory (don’t need more than one piece but you can put more)
    10. Type “turtle.refuel()”
    11. Now put a wireless modem in the highlighted slot
    12. Type “turtle.equipRight()”
    13. Type “exit()”
    14. Place a Chunk Loader peripheral in the 15th slot (3rd slot in the last row)
    15. Type “pastebin get 9XtwSprN [name]” (no spaces in the name)
    16. You can now make a start-up program (see guide above, Program name is the name you gave it in step 15)
    17. Repeat for the turtles you have (up to 4 turtles)
  3. If you wish to use the Move button (moves the turtle to a mining position behind it)
    1. Dig 6 blocks behind the turtle (in 3x3 pattern)
    2. Replicate the chest setup from the previous step making sure the chests are on the right if you face the mining wall (back towards the turtle)
  4. Computer setup:
    1. Place down a computer in the desired location(advised to sink it into the floor)
    2. This is your main computer
    3. Above the computer place the advanced monitors 3 tall by 4 across
    4. On the right hand side of the computer (not the monitors) place either a wireless modem (if close to the turtles) or a wired modem (shift right click)w
    5. Open the computers interface (right click)
    6. Type “pastebin get HRbMF1Eg button” (important that it is called button)
    7. Type “pastebin get ScASCfjj [name]”
    8. Type “edit [step 7 program name]”
    9. Go to line 17 to 20
    10. Replace the Number after the “=” with the ID’s of your turtles (if you don’t have 4 turtles then leave “0” in the place of the ID you don’t have)
    11. Save and Close the editor
    12. Create a startup program of step 7 program
    13. If the computer is far from the Turtles (ie in your house above ground) then place another computer close to where the turtles are
    14. This is the Repeater Computer
    15. If you do so place a wired modem on this computer (left or right side)
    16. Place also a wireless modem on the computer (left or right side)
    17. Create a start-up program with the program repeat (shell.run(“repeat”)
    18. Above the shell.run line type “rednet.open(“left”)” and on the line above that type “rednet.open(“right”)” (go to beginning of line and press enter to get a line above)
    19. Save the program and exit the editor
    20. Run networking cable from the wired modem on the main computer to the wired modem on the Repeater Computer
    21. Get the ID of your main computer
    22. Reboot the two computers (hold Ctrl + R)
  5. Go back to your turtles and type “edit [turtle setup step 15 name]”
  6. Go to line 11 of the code
  7. Change the number after the “=” to the ID of the Main Computer (do this for all turtles)
  8. Save and Exit the editor
  9. Reboot all turtles (hold Ctrl + R)
  10. To use the Controller:
    1. For mining click (right click) the distance you would like to mine (Right of the screen) the button turns green
    2. Then click the turtle that you would like to do the mining (left of the screen) the distance button turns red and the turtle button turns green
    3. When the turtle is done mining the turtles button turns red
    4. To move the turtle to the new mining position set up in step 3 click the “move” button then click the turtle that you want to move
    5. The turtles button goes back to red when it has completed the move
    6. The “C” and “T” button above move indicate is there is torches and coal in the chest Green means there is and red means that you need to refill the chests
    7. The turtle will stop mining until the chest are filled and will continue to mine after the chest are refilled (may take so time for turtle to register that the chest are filled 10 seconds at the most)
    8. The “reset” button are in case you make a mistake. If you click “50” but wanted to click “100” for instance then just press reset until all distance buttons are red then select the correct distance
    9. Same for “move reset”
    10. Can’t reset the turtles once they are mining
    11. Don’t click the turtle button after it has been sent mining as this will change the colour to red and give a false reading as to the completion of the mining
    12. Please don’t exit the game until all turtles have completed their mining. Doing so will result in you having to run down the tunnel looking for the turtle. Picking it up and redoing the whole turtle setup.
    13. Should the game crash while the turtles are mining:
      1. Then run down the tunnel the turtle made find the turtle
      2. Type “label set [name]” this prevents the turtle from losing the programs
      3. Pick up the turtle and take it back to the start position
      4. Repeat steps 7 to 14 of the turtle setup
That is the end of the instructions. That was long. At least now you have an 4 turtle army to do your mining for you.

About the code:

I have spent over 30 hours developing this program. I did it as a fun, little project to test my skills and also helped me to learn a new programming language (lua). It also helps me with the bane of my time playing minecraft and that is the mining part of it. In the past I have tried to program a turtle to do the mining for me. Never has it succeeded until now. Now I can just leave the turtles to mine while I do other things.

Thanks:

I would like to thank Bomb Bloke and KingOfGamesYami. Both have been a tremendous help with my program and it definitely would not have been completed without their input. Also thanks to direwolf20 whose button API I used.

Conclusion:
Please don’t hesitate to give me suggestions and constructive criticism. Please no hate. Anyone that wants to use my code is welcome. Anyone that wants to edit my code and improve it is welcome with one condition: I would like to be thanked for the writing of the original code.

Please if you like the code recommend it to friends.