-
-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
small hitbox and sink fix #715
base: main
Are you sure you want to change the base?
Conversation
Changed hardcoded sink limit from `y < 5` to `y < (craft.getWorld().getMinHeight() + 5)` preserving the original 4 block buffer but accounting for the new minimum world heights of 1.18+
Adjusted X, Y, Z, lengths by +1 to compensate for coordinate vs block math.
Movecraft/src/main/java/net/countercraft/movecraft/async/AsyncManager.java
Outdated
Show resolved
Hide resolved
@@ -293,7 +293,7 @@ private void processSinking() { | |||
if (!(craft instanceof SinkingCraft)) | |||
continue; | |||
|
|||
if (craft.getHitBox().isEmpty() || craft.getHitBox().getMinY() < 5) { | |||
if (craft.getHitBox().isEmpty() || craft.getHitBox().getMinY() < (craft.getWorld().getMinHeight() +5 )) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thought but is their really any reason we even check for it being 5 over the min in the firs place 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed it on my fork and everything works fine. I kept it here because I didn't know if there were any other classes that need it.
It fixed the off-by-1 hitbox math and the hardcoded y < 5 sink limits
Checklist