Octol1ttle / FlightAssistant

Minecraft mod that adds a flight style HUD (like one you would see in a flight simulator), autopilot systems, flight protections, and more.
GNU General Public License v3.0
27 stars 6 forks source link

Mod triggers Anti-cheat #23

Closed Kishku7 closed 1 month ago

Kishku7 commented 2 months ago

After upgrading from FlightHUD to Flight Assistant today, I started to trigger my servers Anti-cheats.

From the log:

Anticheat Alert Kishku7 failed Elytra (Type F) [1/10] Description: Sending Elytra packets too quickly. Information: delay=7 Server Name: Default Client Brand: Fabric Client Version: 1.21 Ping | TPS: 89ms | 20 Location: (Quantum, -5271, 76, 8000)

This happen when just standing on the edge of a block, and while falling down an "elevator"

Octol1ttle commented 2 months ago

This issue is caused by the automatic elytra opening feature (called "Open Elytra Automatically" in the Flight Automations page of the config).

This happen when just standing on the edge of a block

The code that triggers the automatic open incorrectly activates when the player is on the ground because the fall damage calculation takes into account the ground below the player (which may not be the block they're actually standing on). If there are more than 3 blocks below the edge, then the check passes and an Elytra Switch Packet is sent to the server.

There is a measure supposed to avoid packet spam. When a packet is sent, it won't send more packets until the server confirms the state switch. But the server will not confirm the switch if the player lands in between the time the packet is sent and processed. For that reason, a check was added - count the packet as "processed" when the player is on the ground. This causes the code to send packets at every update. This one is easy to fix (fixing this is easier than explaining it)

while falling down an "elevator"

Please elaborate on what that elevator is and how it functions. I'm not sure on how an elevator might cause the check to be tripped, so details are important.

Octol1ttle commented 2 months ago

@Kishku7 I have published version 2.3.4 BETA 1 containing a fix for this issue. Please verify that the issue is fixed and write back.

Kishku7 commented 2 months ago

Forgive my ignorance, how do I obtain the beta .jar file?

Octol1ttle commented 2 months ago

Download it from Modrinth: https://modrinth.com/mod/flightassistant/versions

Octol1ttle commented 2 months ago

@Kishku7 any updates on this issue?

Octol1ttle commented 1 month ago

Assuming fixed by https://github.com/Octol1ttle/FlightAssistant/commit/3ac10399f6c1965ffe85fd21f287686e4b3cb0e1 (no response)