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

goldMine - Fancy 1x3 tunnel program

Started by goldenapple, 14 January 2015 - 01:47 PM
goldenapple #1
Posted 14 January 2015 - 02:47 PM
What's goldMine all about?

Actually, there is not much to it. It mines a 3-block tall tunnel, attacking all mobs and mining all the gravel in the way. It does have a lot of configurability and it is quite stable, though.

Functionality?

To run the programm, type "goldMine infinite <placeTorches> <placeChests>" or "goldMine <length> <placeTorches> <placeChests>"

Firstly, this program has to modes: finite and infinite. What they do is pretty obvious: in finite mode you itype in the amount of blocks to mine and in infinite mode it just runs until it's out of fuel. However, there is more options to this programm.

You might have noticed that there is a <placeTorches> argument. Indeed, it places torches every 8 blocks it mines.

Next, <placeChests> determines whether or not the turtle will place a chest in and drop off all the items if it's inventory is full. It will not drop off any fuel, torches or other chests. There is also an Ender Chest mode, which basically makes it so that the turtle will get the chest back after drops items into it. Of course, it also works with Tesseracts and other item teleportation devices, as long as they save their frequency on breaking.

For developers

If you are a developer who wants to launch my program via shell.run() and you want to disable all of the "Press any button to continue…" messages, there is also a special feature for that.

If you type in "noAsking" as the 4th parameter, the program won't require any user input. "noAskingEnder" will enable Ender Chest mode.

I implemented this feature mostly because I want to make a "goldStripMine" program, which would dig a 3x3 tunnel and then use the simple goldMine program for the branches. It will be done sometime in the future.

To do
  • Fix chest placement! Right now it places too many of them.
  • Make the turtle drop off fuel that it doesn't need into chests. Right now it just keeps everything.
  • A mode where turtles would go back and drop stuff off into a "main" chest instead of just placing Soaryn-chests everywhere.
  • Chunkloader support?
  • Monitor support?
Pastebin

http://pastebin.com/d2TUuhkm

pastebin get d2TUuhkm goldMine
Edited on 14 January 2015 - 06:01 PM
wakafanykai123 #2
Posted 25 February 2015 - 04:27 PM
This program is super cool, though the million chests being placed is annoying.
Picksme #3
Posted 13 April 2015 - 03:21 AM
Very nice! I like how even though you could have made a very simple program, you added customization and variability. Well done!