HELM0.1.0-26.2.jar
Curse Maven Snippet
What's new
Mining, and a rewrite of the world scanning it depends on.
Mining
$mine is new. It looks for blocks of a given type, walks to them, breaks them with
the right tool, picks up what they dropped, and repeats until there is nothing left,
a count is reached, or $stop is typed.
| Command | Aliases | Arguments |
|---|---|---|
$mine <blocks> [count] |
dig, excavate |
one or more block names, then an optional count |
$mine oak_log
$mine diamond_ore 64
$mine oak_log birch_log
$mine iron_ore gold_ore 128
The count goes last. With no count it mines every one it can find; with one it stops
once that many of the matching items are carried. More than one block name mines all of
them, nearest first. The picker of every block in the game opens as soon as you start
a block name and closes once you type the count, so $mine oak_ and $mine oak_log 30
both work without leaving the keyboard. Block names are the game's own, with or
without the minecraft: prefix, and a single state can be picked out in square
brackets.
Working a vein out
Mining used to abandon a vein the moment it broke the first block, walk off to collect one drop, then come back. It now commits to a vein and works it out before collecting, because collecting mid-vein meant re-walking the same ground for every single drop.
- It stays on the vein until its drops have been picked up.
- It steps up onto the block it is standing on to reach the rest of the vein, instead of giving up on anything above its own level.
- It only walks over drops that are close by, rather than crossing the map for one item.
- After a break it waits for anything still falling to land before moving on.
- It aims into the vein rather than at its edge, so one break can take two or three blocks, and air beside a block counts as part of the vein so a single loose block does not stop the dig.
- It stops walking the moment the block it was heading for is gone, rather than finishing a route that no longer leads anywhere.
Getting to the block
- A block directly above the player is broken without moving at all. This is what takes a tree down, and it no longer judges reach with a ray trace, which could rule out a block that was genuinely within arm's reach.
- A block straight above that is too high is reached by placing a block under the player and stepping up, repeating until the rest of the vein is within reach. It costs one block per level, and needs movement allowing placing and breaking.
- When no route can be found to any known block, the closest one is marked unreachable and the next is tried, instead of giving up on the whole job.
Finding nothing
When a look has finished and there is genuinely nothing left that is worth mining, it walks away from where the job started and keeps its distance while it does, so new chunks load and something turns up. The route is not aimed at a block: it neither climbs nor digs, and it has no depth in mind. This is only done when there is nothing left to work on, and turning it off means the job simply stops instead.
Selecting what counts
- Level band.
mining.lowestLevelandmining.highestLevelbound which levels a target may be on. - Only exposed targets. Requires air or liquid touching the block, which reads much less like seeing through stone on servers that shuffle ores around.
- Sight only. Never acts on a block that cannot be seen from where the player is standing, and keeps looking instead.
- Blocks allowed to be mined anyway, so
$minecan still be given a target while general breaking is turned off. - Skipping unreachable blocks is on by default, so one unreachable vein does not end the job.
Tools
The right tool is chosen for every block. Silk touch is preferred when it is no slower, a sword may be chosen where that is the fastest option, and the item saver stops using a tool once it is nearly broken.
World scanning rewritten
$mine needs to find blocks, which means reading the world. The old scanner read the
world one block at a time: for every chunk in range it visited all 24 layers the world
is built from, and inside each layer it asked for the block at each of the 4096
positions. A single chunk was 98,304 block reads. Across a 32 chunk radius that never
finished, so $mine diamond_ore found nothing at all, ever, and the log showed the
sweep never completing a single pass.
A chunk section in the world is not stored as 4096 blocks. It is stored as a short list of the distinct blocks it contains, plus one packed number per position. The scanner now reads the list first:
- A layer holding nothing you asked for is skipped whole, without reading a single position. Most layers underground are nothing but stone and deepslate, so almost every layer is now skipped this way. Measured against the old scanner on a real section, this is around forty-five times faster.
- A layer made entirely of one wanted block is taken whole, again without reading its positions.
- A layer that does contain something wanted has its packed numbers read directly rather than looked up one position at a time, which is several times faster than before.
The layers of a column are also visited from the player's own level, then one below, then one above, and so on down and up the whole column, so a look reaches the same ground the same way whichever chunk it is in.
Chunks are walked as a bounded spiral, starting at the chunk the player is standing in
and widening one ring at a time out to mining.scanRadius. Chunks that are not loaded
are stepped over rather than fetched, so a view distance shorter than the scan radius
costs nothing beyond a lookup. The old scanner expanded outwards without a limit, so
it never stopped.
A look now finishes in a tick or two rather than running indefinitely. It still spends a small slice of each tick and carries on from where it left off, so even a large radius cannot be felt as a hitch, and blocks found so far are used as soon as they exist.
The same scanner is used by $farm, so farming is quicker for the same reasons.
Outlines
- New: the blocks a mining job is working through are outlined, in
outline.targetColour, rather than only the ones on the current route. - A block a route will break is now marked only by the glow. It used to be drawn twice, once as a glow and once as a line box around the same blocks, so the two sat on top of each other and underground, where a route digs through a lot of stone, they were hard to tell apart. The path overlay now draws only the blocks it will place.
Settings changed
Two path settings are gone and one is renamed. There is no automatic migration, so if
you had either of these set, the new name is the default and the old line in
settings.conf is ignored and then removed the next time settings are written.
| Was | Now |
|---|---|
path.renderBlocksToBreak |
removed, the glow is always drawn |
path.renderBlocksToPlace |
path.blocksToPlace |
Settings added
Everything new is under mining. and is documented in full in
docs/FULLYEXPLAINEDFEATURES.md.
| Setting | Default | What it does |
|---|---|---|
mining.breakAllowedAnyway |
(empty) | Blocks mined even while breaking is off |
mining.maxTargets |
64 |
Most places remembered at once |
mining.lowestLevel |
0 |
Lowest level a target may be on |
mining.highestLevel |
2031 |
Highest level a target may be on |
mining.onlyExposed |
false |
Require air or liquid touching the block |
mining.exposedRadius |
1 |
How far around a target to look for that air |
mining.sightOnly |
false |
Never act on a block you cannot see |
mining.sightDiagonals |
false |
With sight only, accept a block touching a visible one |
mining.exploreWhenUnknown |
true |
Walk away when no target is known |
mining.skipUnreachable |
true |
Mark an unreachable target and try the next |
mining.rescanEveryTicks |
5 |
Ticks between looks, 0 looks once |
mining.scanRadius |
32 |
Chunks either side of you read when looking |
mining.scanWhenCacheThin |
false |
Also read loaded chunks when the cache is thin |
mining.followDroppedItems |
true |
Walk over drops of the right type |
mining.dropWaitMillis |
250 |
Milliseconds to wait after a break for a drop |
mining.digIntoVein |
true |
Aim into the vein rather than at its edge |
mining.digThroughAir |
true |
Count air beside a block as part of the vein |
mining.breakOverhead |
true |
Break a block directly above without moving |
mining.pillarToReach |
true |
Step up on a placed block to reach a block straight above |
mining.waitForDrops |
true |
Finish the vein first, then collect what it dropped |
mining.stopRouteWhenMined |
true |
Stop a route whose destination has gone |
mining.repackRadius |
40 |
Chunks remembered before mining starts |
mining.cacheScanRadius |
2 |
How far around you remembered chunks are searched |
mining.cacheScanLimit |
10 |
How many are found there before it stops widening |
mining.renderTargets |
true |
Outline every block the job has found |
outline.targetColour |
0xE0C24C |
Colour of the outline around a mining target |
path.blocksToPlace |
true |
Outline blocks that will be placed |
Ores have two names
Worth knowing before concluding $mine is broken: almost every ore exists as two
different blocks. minecraft:diamond_ore generates above level 0 and
minecraft:deepslate_diamond_ore below it, across a band of roughly y = −64 to 16, so
most of that band is the deepslate one. The same is true of coal, copper, gold, iron,
lapis, redstone and emerald.
A block name matches exactly one block and nothing else, so to mine both, name both:
$mine diamond_ore deepslate_diamond_ore
Documentation
docs/USAGE.md, docs/FEATURES.md, docs/SETTINGS.md and
docs/FULLYEXPLAINEDFEATURES.md are all updated for the above.
Known limitations
- Pillar blocks are not given back. When HELM pillars up to reach a block it spends one block per level and does not recover them.
- The explorer does not choose a depth. When nothing is known it walks away at whatever level it happens to be on, rather than going to the level a block generates at.
All Relations
- All Relations
- Embedded Library
- Optional Dependency
- Required Dependency
- Tool
- Incompatible
- Include

