-
-
Notifications
You must be signed in to change notification settings - Fork 145
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
Improve client events #256
Comments
I think that generally this is a really good idea, and it's even slowly happening a bit already - #252 merged the drop events. 😍 I'm a bit wary about the performance implications of automatically pulling in the actual entities with the events though, especially when they might not even get used. Perhaps adding convenience methods might be better? 🙂 Regarding event sanitisation, I think that's an awesome idea. However In any case, I really like this! Great to see! 👍 |
@JadedBlueEyes Pulling in |
Thank you! Excuse my ignorance - this project is the first time I've used Bevy! Continuing on from my thoughts on anticheat, I think that any kind of anticheat, especially one that is effective, is likely to be a significant endeavor in itself no matter how we go about doing it. It’s probably best to work in stages - start with simple checks (is this person self-hitting, has this person been breaking this block for roughly the right amount of time) to more complex ones that require guessing the client's state (is this person actually looking at this entity). (Sort for the brain vomit - stream-of-thought queen here!) |
I agree. The checks here should be enough to prevent some of the most egregious exploits like teleporting around arbitrarily, attacking every entity in the entire world, etc. I expect advanced users will need to disable these checks, but this should provide a reasonable default for regular users. Unfortunately there are no perfect solutions and anticheat is very "context sensitive".
A hashmap lookup is needed to map the entity ID to an |
Is your feature request related to a problem? Please describe.
Currently, most client events are a thin layer above the serverbound packets without any kind of filtering or validation applied. This is bad because:
Describe the solution you'd like
Sanitize events before emitting them. Don't emit an event if they fail the check. Examples:
The vanilla server should be used as a reference (See
ServerPlayNetworkHandler.java
). If desired, the checks can be disabled with a config option.Remove low-level details from events. Examples:
Entity
of theMcEntity
that was interacted with.In cases where direct access to packets is needed, we can accept a callback taking a&C2sPlayPacket
as an argument.Blocked on:
valence_protocol
#253Additional context
Minestom's events
The text was updated successfully, but these errors were encountered: