Skip to content

Fixed and improved omni tool - #263

Merged
OmerBenGera merged 12 commits into
BG-Software-LLC:devfrom
Lemvs:fix/omni-tool
Oct 24, 2026
Merged

OmerBenGera merged 12 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.

@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.

@Lemvs Lemvs mentioned this pull request Sep 24, 2026
@Lemvs
Lemvs requested a review from OmerBenGera October 2, 2026 18:45
@Lemvs
Lemvs requested a review from OmerBenGera October 3, 2026 10:51
@Lemvs
Lemvs requested a review from OmerBenGera October 3, 2026 12:38
@Lemvs
Lemvs requested a review from OmerBenGera October 17, 2026 11:06
@Lemvs
Lemvs requested a review from OmerBenGera October 23, 2026 18:21
@Lemvs
Lemvs requested a review from OmerBenGera October 24, 2026 12:19
@OmerBenGera
OmerBenGera merged commit dedea75 into BG-Software-LLC:dev Oct 24, 2026
1 check failed
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