▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Плагины/Advanced TreeCapitator
Advanced TreeCapitator

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.

453
2

Advanced TreeCapitator 1.4.0

release14 мая 2026 г.

[1.4.0] — 2026-05-14

Fixed

  • [CRITICAL] Forced Java 21 requirement — The pom.xml compile target has been lowered from Java 21 to Java 17. Previously the plugin threw UnsupportedClassVersionError on any server running Java 17 (Paper 1.20.x, Purpur, Pufferfish, most shared hosting providers). No source changes were needed because the code does not use any Java 21-specific APIs.
  • [CRITICAL] Protection plugin bypass — Extra log blocks (every block other than the origin) were broken with breakNaturally() without first firing a BlockBreakEvent, meaning WorldGuard, GriefPrevention, Lands, and Residence had no opportunity to intervene. A dedicated BlockBreakEvent is now fired for each extra block before it is broken; if any protection plugin cancels that event, the block is silently skipped.
  • [CRITICAL] Missing anti-recursion guard — The protection-plugin fix above fires BlockBreakEvent programmatically, which caused the plugin's own listener to trigger again for each block, creating an infinite loop. A breakingTrees Set<UUID> now marks any player whose felling session is currently in progress; the listener returns immediately if the player's UUID is already present. The set is always cleared inside a finally block so a player can never get permanently stuck.
  • [MEDIUM] BFS linking two nearby trees — The 26-direction BFS could follow diagonal log connections to merge two adjacent trees into one oversized fell. A new MAX_HORIZONTAL_DISTANCE = 8 constant (Manhattan X+Z distance from the origin block) causes BFS to skip any candidate block beyond that threshold. The value of 8 is wide enough to accommodate Big Oak and Dark Oak canopies without bridging two separate trunks.
  • [MEDIUM] No config value validation — Values such as max-blocks: -1 or damage-multiplier: -100 were loaded directly into fields, producing undefined behaviour (negative BFS limits, inverted durability). clamp() and clampDouble() helpers have been added to Config.reload(); all numeric values are now constrained to a valid range (e.g. max-blocks[1, 1000], damage-multiplier[0.1, 10.0]).

Clarified (not a bug)

  • Double durability damage (analyst report #2) — The audit report claimed that breakNaturally(tool) automatically reduces the tool's durability in the player's inventory, causing damage to be applied twice alongside DurabilityHandler. After reviewing the Paper API source: Block.breakNaturally(ItemStack) uses the ItemStack only to determine drop calculations (Fortune, Silk Touch) and does not modify the item in the player's inventory. DurabilityHandler remains the sole source of durability loss. No double damage occurs.

Changed

  • Lowered the supported api-version from Paper 1.21 to Paper 1.20.4+, broadening compatibility without requiring any 1.21-specific API.
  • Added Javadoc to TreeFinder, TreeCapitatorTask, and Config.

Not Fixed (planned v1.5.0)

  • Folia incompatibility — The plugin schedules work with BukkitScheduler.runTask(), which is incompatible with Folia's region-based threading model. A proper fix requires migrating to RegionScheduler / GlobalRegionScheduler and is planned for v1.5.0.

Advanced TreeCapitator 1.3.0

release26 апреля 2026 г.

[1.3.0] — 2026-04-25

Fixed

  • PALE_OAK_LOG bypassed require-leaves checkisOverworldLog() was missing PALE_OAK_LOG from its switch statement, meaning Pale Oak trees were treated the same as Nether stems (no-leaf bypass). With require-leaves: true, a Pale Oak log structure built by a player would be incorrectly felled. Added PALE_OAK_LOG to 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 dedicated wasTrimmed boolean 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 to TreeCapitatorEvent to:

    • 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().
  • leaf-durability-ratio config option (default: 10) — Controls how many leaf blocks count as one durability hit when break-leaves: true. Previously hardcoded to 1/10, this is now fully configurable. Set to 1 to make every leaf cost a durability point; set higher to reduce tool wear from leaf breaking.

  • MUSHROOM_STEM support — Added a commented-out entry in config.yml for MUSHROOM_STEM, enabling huge-mushroom felling. Uncomment to activate.

Refactored (God Class split)

  • TreeFinder (new class) — Extracted all BFS log-finding and leaf-scanning logic from TreeCapitatorTask into a dedicated utility class. isOverworldLog() and isLeaf() helpers moved here.

  • DurabilityHandler (new class) — Extracted all durability calculation and application logic (getRemaining, calcMaxExtraBreaks, applyDamage) into a dedicated utility class.

  • TreeCapitatorTask is now a lean orchestrator: BFS → leaves → trim → event → break → durability → effects.


Advanced TreeCapitator 1.2.5

release17 апреля 2026 г.

[1.2.5] — 2026-04-17

Fixed

  • Nether stems, Warped stems, and Bamboo Block now work correctly with require-leaves: true.

Improved

  • Highly optimized BFS: uses ArrayDeque, scans leaves only once, adds Manhattan distance, and uses HashSet.
  • Cleaner, more maintainable code.

Advanced TreeCapitator 1.2.4

release4 апреля 2026 г.

[1.2.4] — 2026-04-04

Fixed

  • Large trees (Jungle Giant, Dark Oak) could not be felled — When a tree exceeded max-blocks (default: 100), the plugin aborted the entire felling operation and only the single broken log was harvested. This made giant Jungle trees (200-500 blocks) and large Dark Oaks impossible to chop efficiently. The plugin now performs a partial chop — it breaks logs up to the configured max-blocks limit instead of doing nothing. The remaining logs can be harvested with additional chops.
  • Off-by-one in max-blocks check — Changed from > to >= so the limit is correctly enforced at exactly max-blocks.
  • Big Oak trees not fully harvested — The BFS search for logs was limited to 6 directions (face-adjacent only), causing the capitator to miss logs that are only diagonally adjacent. Big Oak trees have irregular structures where some logs only touch at corners. The search is now 26-direction (3×3×3 cube) to catch all connected logs.

Advanced TreeCapitator 1.2.3

release27 марта 2026 г.

[1.2.3] — 2026-03-27

Added

  • require-leaves option (default: true) — Before felling, the plugin now checks that the log cluster has at least one adjacent leaf block. If none are found, the capitator does nothing. This prevents accidental activation on player-built log structures such as house walls, cabin roofs, or log-block decorations. Set to false to restore the old behaviour.

Fixed

  • Durability did not limit felling — Tool durability was calculated and applied after all blocks were already broken. A nearly-broken axe (1 durability remaining) could silently fell a 100-log tree and would simply be destroyed at the end. The task now calculates the maximum number of extra logs the remaining durability permits before breaking any blocks, and trims the set accordingly. Unbreaking level is respected in this pre-check as well.

Совместимость

Minecraft: Java Edition

1.21.x

Платформы

Поддерживаемые окружения

Сервер

Создатели

Детали

Лицензия:Apache-2.0
Опубликован:2 месяца назад
Обновлён:8 часов назад
Главная