fix: inline hitbox interact locals and always fire listener hooks#281
Merged
toxicity188 merged 1 commit intov2-devfrom Feb 17, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
triggered()result) so hooks can observe all interaction attempts.Description
platformPlayerandjomlVectortemporaries by constructingModelInteractEvent/ModelInteractAtEventwithwrap()/toBukkit()/toVector3f()inline in all NMSHitBoxImplfiles and the FabricHitBoxEntityImpl.interactandinteractAtsolistener.interact(...)andlistener.interactAt(...)are invoked before theif (!interact.call().triggered())check, making listeners run regardless of trigger cancellation.HitBoxEntityImplto reuse aserverPlayerlocal for clarity while still inlining the platform player and vector where used.listenHitBoxhook onTrackerdelegating to the pipeline event dispatcher to allow registering builder-based hitbox listener transformations (exposesBiFunction<RenderedBone, HitBoxListener.Builder, HitBoxListener.Builder>hook).Testing
platformPlayer/jomlVectorlocals and confirmed listener invocation lines appear beforeinteract.call().triggered()checks usingrg(search checks succeeded)../gradlew :nms:v1_21_R7:compileKotlinto validate compilation, but the Gradle wrapper download failed due to a network/proxy restriction returning403 Forbidden, preventing a full compile check.Codex Task