Skip to content

AuraSkills grants XP for the entire tree even when the axe breaks/runs out of durability mid-cut #8

Description

@WZMADZYT

Description
When using /timberz toggle to fell a tree with an axe that doesn't have enough durability to cut all the logs (based on durabilityMultiplier and minDurability), the cut stops partway through and only 1 log is actually broken. However, AuraSkills still grants Foraging XP as if the entire tree had been felled (e.g., ~10 levels/XP bars for breaking a single log).

It looks like the XP sent to AuraSkills is calculated using the total detected log count of the tree, before checking whether the axe actually has enough durability to complete the cut. This allows an XP exploit: a player can deliberately fell large trees with a nearly-broken axe to gain massive XP from breaking just one block.

Steps to reproduce

  1. Equip a stone axe (131 base durability) with durabilityMultiplier: 1.0
  2. Enable timber mode (/timberz toggle)
  3. Fell a tree with more logs than the axe can support given its remaining durability
  4. The cut stops after breaking 1-2 logs, but AuraSkills grants XP for the full tree

Expected behavior
The XP sent to AuraSkills should match the number of logs actually broken, not the number initially detected in the tree.

Additional testing

  • Setting minDurability: 0 (letting the axe break completely) reduces the bug for trees that fit within the axe's total durability, but the issue still persists for trees larger than the axe's max durability.
  • There may also be a risk of an error if the item is destroyed (reaches 0 durability and breaks) mid-loop during the cutting process — worth checking for a possible NullPointerException or similar there.

Server info

  • Plugin version: TimberZ 1.3.0
  • Server software: Purpur 1.21.11-2543-HEAD@25642b6 (2025-12-28), API 1.21.11-R0.1-SNAPSHOT
  • AuraSkills version: 2.3.12

Relevant config

durabilityMultiplier: 1.0
minDurability: 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions