
Advanced TreeCapitator
Advanced TreeCapitator enables fast tree felling on Paper 1.21. Sneak with an axe to chop entire trees, with configurable durability loss, world restrictions, and a reload command.
Список изменений
[1.3.0] — 2026-04-25
Fixed
-
PALE_OAK_LOGbypassedrequire-leavescheck —isOverworldLog()was missingPALE_OAK_LOGfrom its switch statement, meaning Pale Oak trees were treated the same as Nether stems (no-leaf bypass). Withrequire-leaves: true, a Pale Oak log structure built by a player would be incorrectly felled. AddedPALE_OAK_LOGto the overworld log list so it is correctly guarded. -
Fragile reference-equality trim check — The condition that decided whether leaves should be broken used
trimmedLogs == logsToBreak(Java reference equality) instead of an explicit boolean. While this happened to work correctly, it was subtle and error-prone. Replaced with a dedicatedwasTrimmedboolean flag for clarity and safety.
Added
-
TreeCapitatorEvent(Plugin API) — A new cancellable Bukkit event fired just before any tree is felled. Other plugins can now listen toTreeCapitatorEventto:- Cancel the felling via
event.setCancelled(true). - Inspect the full set of logs and leaves that will be broken.
- Grant custom rewards (economy, XP, quests) based on
event.getLogs().size().
- Cancel the felling via
-
leaf-durability-ratioconfig option (default:10) — Controls how many leaf blocks count as one durability hit whenbreak-leaves: true. Previously hardcoded to1/10, this is now fully configurable. Set to1to make every leaf cost a durability point; set higher to reduce tool wear from leaf breaking. -
MUSHROOM_STEMsupport — Added a commented-out entry inconfig.ymlforMUSHROOM_STEM, enabling huge-mushroom felling. Uncomment to activate.
Refactored (God Class split)
-
TreeFinder(new class) — Extracted all BFS log-finding and leaf-scanning logic fromTreeCapitatorTaskinto a dedicated utility class.isOverworldLog()andisLeaf()helpers moved here. -
DurabilityHandler(new class) — Extracted all durability calculation and application logic (getRemaining,calcMaxExtraBreaks,applyDamage) into a dedicated utility class. -
TreeCapitatorTaskis now a lean orchestrator: BFS → leaves → trim → event → break → durability → effects.
