-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix floating point issue #6467
Fix floating point issue #6467
Conversation
Fixes blocks not placing right next to the player at certain positions
I'm not seeing the issue, please mention reproduction steps |
Yep, that's the issue Minecraft_2024.09.23_-_12.57.42.12.mp4 |
This function already has an epsilon built in, it shouldn't be needed. Also not clear if this might cause unintended side effects. |
Would be nice to have some examples so this can be tested |
I have exactly the same problem |
I don't like this change. It'll affect all callers of getNearbyEntities(), which could have all kinds of unintended side effects. Glitchiness at large coordinates is to be expected, since there's a falloff in the ability of floats to represent high precision fractions when the number is very large. There's only so much we can compensate for that anyway. It would be nice to know what specific coordinates this occurs at so it can be investigated properly. As I said, an epsilon is already used for intersectsWith() so this issue should've been fixed long ago. |
This PR has been marked as "Waiting on Author", but we haven't seen any activity in 7 days. If there is no further activity, it will be closed in 28 days. Note for maintainers: Adding an assignee to the PR will prevent it from being marked as stale. |
This PR has been marked as "Waiting on Author", but we haven't seen any activity in 7 days. If there is no further activity, it will be closed in 28 days. Note for maintainers: Adding an assignee to the PR will prevent it from being marked as stale. |
As this PR hasn't been updated for a while, unfortunately we'll have to close it. |
Introduction
Fixes blocks not placing right next to the player at certain positions
Relevant issues
Currently you cannot place blocks right next to yourself at some positions due to floating point issues
Changes
API changes
No significant API changes
Behavioural changes
Might affect some extremely precise checks
Backwards compatibility
No Backwards compatibility issues
Tests
I tested this PR by doing the following (tick all that apply):
tests/phpunit
folder)