Dog - Automated Ore Gathering Powered by Plethora/AP

Started by Fatboychummy, Apr 14, 2024, 08:43 AM

Previous topic - Next topic

Fatboychummy

Meet Dog. He likes to fetch ore for you.



Dog utilizes Plethora's Block Scanner or Advanced Peripherals' Geoscanner to detect ores in a small radius around itself, and directly mine to them. It digs in a straight line down until it reaches bedrock (or a pre-set depth limit), and resurfaces to drop off ores it has found.

Installation
Installation is simple, just run the following command and follow the installer's prompts.

wget run https://raw.githubusercontent.com/Fatboychummy-CC/Dog/refresh/installer.lua
Usage
Ensure the turtle has a pickaxe and a block scanner or geoscanner. It does not matter where these are in the turtle's inventory, it will automatically select and equip them if they are not equipped.

After that, simply run the program.

If you are using Advanced Peripherals, the turtle will not be able to determine its facing, so you will need to use the F3 menu to tell it whether it is facing north/east/south/west.

dog [max_offset=8] [flags/options]
Command Line Arguments
Maximum Offset
You can change the maximum distance that the turtle will wander using the max_offset argument, by simply supplying a range in blocks.
dog 8
By default, this value is 8.


Flags
Four flags exist for this program, they are listed below.

    *-h, or --help: Prints a help message with usage information
    *-v, or --version: Prints version information
    *-f, or --fuel: The turtle will refuel from fuel items that it mines (coal, etc).
    *-l, or --level: Mine in a straight line across the world, instead of down. Useful for mining surface ores (clay, or other modded things). Best used with a low `max_depth` option, unless the turtle's path is chunkloaded.

Options
Six options exist to control how the turtle works.

    *--depth=<number>: Set the maximum depth the turtle can dig down to.
    *--loglevel=<debug|info|warn|error>: Set the log level, only logs that level and above will be displayed. If you are reporting an issue that is causing an error, please set this to debug and upload your log!
    *--georange=<number>: Change the range for the geoscanner. By default this is 8 (which is the AP default setting), but if you change AP config you can supply a new range to use instead.
    *--include=<file_path>: Include a list of blocks to be mined specified in the file.
    *--exclude=<file_path>: Exclude a list of blocks to be mined specified in the file (Note: The turtle will not avoid these blocks, but rather it just won't count it as an ore. If the block is in its way, it will still be mined).
    *--only=<file_path>: Mine only the specified blocks specified in the file.

The latter three options work in exactly the same way, they point to a file containing just a lua table with a list of blocks, i.e:
{
  "minecraft:stone"
}
Issues
This program requires chunkloading. I want to add a recovery system, but I don't know whether I will actually get to adding it. By default, the turtle will avoid going further than 8 blocks away from its origin point in order to avoid leaving a chunkloaded area. However, if it dies underground, it will stay underground.

For all other issues...
If you want to report an issue, please set the log level to debug and upload your logs.
dog --loglevel=debugWhile many issues may be fixable without the logs, I won't have to ask if I do wind up needing them!
Links
I make unfinished programs