Skip to content

fix false positive when being inside the edge of a block #2013

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

Open
wants to merge 2 commits into
base: 2.0
Choose a base branch
from

Conversation

maxomatic458
Copy link

closes #2000 (Happens with all blocks that the player can collide with, not just gravity blocks)

Currently tested on 1.8.8/1.8.9 (same version as in issue).
I will do some more testing on other versions before marking it as ready.

let me know if there is anything important i need to consider when using
isNearGlitchyBlock, i just used it here to increase the collision threshold when the player is partially inside a block.

@ManInMyVan
Copy link
Contributor

using uncertainty seems wrong, this should be fixed properly

@maxomatic458
Copy link
Author

@ManInMyVan

using uncertainty seems wrong, this should be fixed properly

So should grim be able to accurately predict movement like that?
Im not sure if that is easy to implement as thats some really glitchy mc behavior
(the difference between the predicted and actual movement is also pretty different / seems pretty random)

Do you have any specific idea in mind?

It would also be possible to just force push the player out of the block (But im not sure if thats "intended" as that would change vanilla behavior)

@ManInMyVan
Copy link
Contributor

I have a feeling this will false at high speeds

@ManInMyVan
Copy link
Contributor

Do you have any specific idea in mind?

Are we detecting if the player is in a block properly? If not, fix that

@maxomatic458
Copy link
Author

changing the uncertainty value from 0.1 to 0.17 fixes the false positive. (0.17 was the value where the values where consistently green)

But at high speeds (speed lvl ~50+; im assuming more than 1m/tick) the game client lets the player pass through the block.
How should this be handled?
Should this be reported (as its not really valid movement) or not (because its possible in vanilla).

output.mp4

@maxomatic458
Copy link
Author

currently testing this on every version.

and im having trouble getting the plugin to work on 1.13+

gradle tells me i need java 16+ to build the plugin, but the papermc 1.13 server requires java 13 or older
(so far the fix is working with every version up to 1.12)

any tips for properly building the plugin for those versions?

@SamB440
Copy link
Contributor

SamB440 commented Feb 21, 2025

See "other versions": https://github.com/GrimAnticheat/Grim/wiki/Updating-to-Java-17#other-versions

@maxomatic458
Copy link
Author

I tested this so far with the following versions:

  • 1.8.9
  • 1.9
  • 1.10.2
  • 1.11.2
  • 1.12.2
  • 1.13.2

In versions 1.14+ This issue does not exist (the player doesn't "bug around" like in the older versions)

But at high speeds (speed lvl ~50+; im assuming more than 1m/tick) the game client lets the player pass through the block.
How should this be handled?
Should this be reported (as its not really valid movement) or not (because its possible in vanilla).

(see clip above)

Let me know how we should handle this and then the PR would be ready.

@maxomatic458 maxomatic458 marked this pull request as ready for review February 23, 2025 16:09
@maxomatic458
Copy link
Author

@ManInMyVan
let me know if/how this edge case (being able to pass through the block at high speeds) should be handled.

using uncertainty seems wrong, this should be fixed properly

i believe it's fine to do it here, as the original implementation for handling pushing did so too (the uncertainty was just a bit to low)

@Axionize
Copy link
Contributor

Axionize commented Apr 1, 2025

Is there any reason for the uncertainty to be 0.17 in 1.14.4+ ?

@ManInMyVan ManInMyVan added the status: rebase required The pull request needs rebasing onto the merge branch label May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: rebase required The pull request needs rebasing onto the merge branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

false when falling blocks collide
5 participants