BlockHardness LibraryСкачатьСкачать
ВЕРСИИ (2)
release
Material Speeds, Potion Effects & Progress Saving
2.0.020 сент. 2026 г.32Minecraft: 1.20, 26.2paper, spigot
Что нового
### Features
* **Tool speed in mining** — Better pickaxes, Efficiency, and Haste now speed up custom-hardness blocks using vanilla maths. Opt-in per call, with values configurable in `config.yml`.
* **Per-source toggles** — Tool speed, Efficiency, and Haste can be enabled independently using a `SpeedOptions` builder.
* **Saved progress** — Optionally remember a player's partial mining progress per block, with progress decaying over time instead of resetting when they look away.
* **Crack visuals** — Saved progress keeps its crack animation, multiple blocks can show cracks at once, and cracks refresh on a timer using `show-saved-cracks` and `crack-refresh-ticks`.
* **Fix** — Mining state is now dropped when a player quits and keyed by UUID, fixing a memory leak and preventing animations from being sent to a stale player after relogging.
### New `config.yml` Format
```yaml
# How fast each tool mines a custom-hardness block, relative to a bare hand.
# Matched against the start of the item's name, so tools from other plugins can be given a speed.
# Anything unmatched (and the wrong tool for a block) stays at 1.0.
Tool-Speeds:
WOODEN_: 2.0
STONE_: 4.0
COPPER_: 5.0
IRON_: 6.0
DIAMOND_: 8.0
NETHERITE_: 9.0
GOLDEN_: 12.0
Mining:
# Used for whatever a caller leaves unsaid. Each source is independent, so a block can ignore the tool
# entirely while still rewarding a Haste beacon.
Tool-Speed-Defaults:
# Does a better tool break the block faster?
tool-tier: false
# Does Efficiency help?
enchantments: false
# Do Haste and Conduit Power help?
potion-effects: false
# Times never go below this; BreakPlayer treats it as an instant break.
minimum-break-seconds: 0.1
# Half-mined blocks. Nothing here survives a restart or a logout; it is all kept in memory.
Progress:
# Keep a block's progress when the player mines something else, so coming back resumes rather than
# starting over. Used when a caller doesn't say either way.
save-by-default: false
# Progress lost per second while a block is not being mined, as a fraction of the whole bar.
# 0.1 empties a full bar in ten seconds; 0 never decays.
decay-per-second: 0.1
# Forget a block entirely this long after it was last mined, however slowly it decays. 0 never forgets.
forget-after-seconds: 60
# Leave the cracks on blocks with saved progress, so a player can see what they half-mined.
# Each block gets its own animation id, so several can be cracked at once.
show-saved-cracks: true
# How often those cracks are re-sent, in ticks. The client forgets block damage it has not heard about
# for a while, and this is also what makes decay visible as it happens. Lower is smoother and chattier.
crack-refresh-ticks: 100
# How many blocks one player may hold progress on at once. The least recently mined is dropped first.
# 0 is unlimited, which is only safe if decay and forget-after are doing the tidying.
max-tracked-blocks-per-player: 16
```
beta
BlockHardness Library 0.0.1
0.0.124 авг. 2023 г.300Minecraft: 1.19, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1bukkit, paper, purpur, spigot