Skip to content

Fixed and improved omni tool - #263

Open
Lemvs wants to merge 5 commits into
BG-Software-LLC:devfrom
Lemvs:fix/omni-tool
Open

Fixed and improved omni tool#263
Lemvs wants to merge 5 commits into
BG-Software-LLC:devfrom
Lemvs:fix/omni-tool

Conversation

@Lemvs

@Lemvs Lemvs commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #249

Changelog

  • Optimized the getDestroySpeedCategory() method in NMSAdapter by creating reference Diamond Axe and Diamond Shovel instances once, rather than upon every method call, and by storing calculated DestroySpeedCategory values ​​for materials in an EnumMap to avoid creating new block data/state objects when the category has already been determined.
  • Additionally, versions 1.17 and higher now use fast org.bukkit.Tag lookups instead of simulating block destruction and checking if the speed was 8f.
  • Removed the map tracking the last-broken material per player UUID, as it prevented proper tool type switching when a player held multiple omni tools; instead, additional checks were added and the order of some operations was changed to allow the method to return earlier if no tool type change is required.
  • Added support for hoes, as many blocks are destroyed fastest with them in newer versions.

Comment thread src/main/java/com/bgsoftware/wildtools/listeners/BlocksListener.java Outdated
Comment thread src/main/java/com/bgsoftware/wildtools/listeners/BlocksListener.java Outdated
@Lemvs
Lemvs requested a review from OmerBenGera August 28, 2026 14:54
@Lemvs
Lemvs requested a review from OmerBenGera August 28, 2026 16:59
@OmerBenGera

Copy link
Copy Markdown
Member

Did you test everything?

@Lemvs

Lemvs commented Aug 30, 2026

Copy link
Copy Markdown
Contributor Author

Did you test everything?

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Owni tools issue

2 participants