-
Notifications
You must be signed in to change notification settings - Fork 322
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
Check Line of Sight of Player Before Block Placements and Opening Containers #1679
base: 2.0
Are you sure you want to change the base?
Conversation
src/main/java/ac/grim/grimac/checks/impl/badpackets/ContainerLOS.java
Outdated
Show resolved
Hide resolved
src/main/java/ac/grim/grimac/checks/impl/badpackets/ContainerLOS.java
Outdated
Show resolved
Hide resolved
src/main/java/ac/grim/grimac/checks/impl/badpackets/ContainerLOS.java
Outdated
Show resolved
Hide resolved
src/main/java/ac/grim/grimac/checks/impl/badpackets/ContainerLOS.java
Outdated
Show resolved
Hide resolved
src/main/java/ac/grim/grimac/checks/impl/badpackets/ContainerLOS.java
Outdated
Show resolved
Hide resolved
src/main/java/ac/grim/grimac/checks/impl/badpackets/ContainerLOS.java
Outdated
Show resolved
Hide resolved
src/main/java/ac/grim/grimac/checks/impl/badpackets/ContainerLOS.java
Outdated
Show resolved
Hide resolved
src/main/java/ac/grim/grimac/checks/impl/badpackets/ContainerLOS.java
Outdated
Show resolved
Hide resolved
src/main/java/ac/grim/grimac/checks/impl/badpackets/ContainerLOS.java
Outdated
Show resolved
Hide resolved
src/main/java/ac/grim/grimac/checks/impl/badpackets/ContainerLOS.java
Outdated
Show resolved
Hide resolved
this should be done in rotationplace, but I added a review anyways (I gave up halfway through so some things don't have comments) |
This needs a lot of rework and seems like is still in draft, please change the status from Open to Draft |
src/main/java/ac/grim/grimac/checks/impl/badpackets/ContainerLOS.java
Outdated
Show resolved
Hide resolved
src/main/java/ac/grim/grimac/checks/impl/badpackets/ContainerLOS.java
Outdated
Show resolved
Hide resolved
I wrote this as a quick port of a hacky spigot-api based check I had in a custom plugin for a very specific problem on a specific server, which I wanted to move to a proper anticheat. I'm not that familiar with GrimAC's codebase, but I noticed that Sam was working on something similar: #1238 I cleaned it up a little here: https://github.com/Axionize/Grim. I'm going take to modifying Sam's check to also work for Blocks/Entities/Digging in the I plan to make a separate draft for this new approach when I'm ready to get some feedback. I greatly appreciate your time and help, and I'd still like for the code to be reviewed. If there's anything I can do to make that easier, please let me know. |
The problem with my draft is that it falses due to the movement threshold, you could be anywhere within 0.03 and thus the raytrace is wrong |
Wasn't that bug fixed past 1.18.2? I've taken a look at how you account for this movement and I don't see anything obviously wrong with it? Are there any reproducible circumstances under which you can cause it to fail I can investigate? In any case, I don't see anything wrong with disabling the 0.03 offsets if the player's version is > 1.18.2. It would be better than nothing and most modern (non 1.7/1.8) servers only keep support for the last couple of major MC versions anyways. Please let me know if I'm overlooking something or you have a better alternative in mind. |
no it's still a thing, it's just 0.0002 and not 0.03, it's just called "0.03" because it's the same mechanic |
(cherry picked from commit 335c33b)
0d70608
to
328596f
Compare
0e382d0
to
8cfb9f0
Compare
# Conflicts: # src/main/java/ac/grim/grimac/utils/collisions/CollisionData.java
Co-authored-by: ManInMyVan <[email protected]>
Co-authored-by: ManInMyVan <[email protected]>
Co-authored-by: ManInMyVan <[email protected]>
Co-authored-by: ManInMyVan <[email protected]>
Co-authored-by: ManInMyVan <[email protected]>
Co-authored-by: ManInMyVan <[email protected]>
Co-authored-by: ManInMyVan <[email protected]>
Co-authored-by: ManInMyVan <[email protected]>
Co-authored-by: ManInMyVan <[email protected]>
Co-authored-by: ManInMyVan <[email protected]>
Co-authored-by: ManInMyVan <[email protected]>
Co-authored-by: ManInMyVan <[email protected]>
2024-10-11.21-04-19.mp4false flag |
Client and server version? What block is the plant on the right? |
1.21.1 Folia |
2024-10-14.12-56-44.mp42024-10-14.12-54-26.mp4 |
|
2024-10-14.13-12-52.mp4 |
This prevents players from using Freecam and interacting with blocks through walls. For example, accessing a chest behind a wall they shouldn't have access to.
Can be used to check all block interactions, but currently only checks containers for maximum performance. The list of blocks being interacted with to check will be configurable to all or a list.
This also prevents laggy players from being able to break a block in regions protected by plugins such as Worldguard and quickly opening a container behind it before the block reappears client side.
Currently making a PR To ask for feedback on:
EDIT: This could have the potential to close #1498