Question: How long does it take to kick?
- Native Minecraft Version:
- Tested Minecraft Versions:
- Source Code:
Answer: Usually 0.8 seconds, it can take longer if the player toggles FastMath on while joining without FastMath. It can also take longer if by chance, FastMath has the same result as the regular trig table.
Answer: I made this plugin for parkour servers, as optifine fast math allows movements that are not possible in vanilla. It could also be useful in PvP servers, where fastmath gives 3.00025 blocks of reach in some cases.
Question: No, but really, why?
I needed this function for a future anticheat and I'm open sourcing this detecting to help other devs
Example implementation of a system like this:
It takes the offset that each trig system gives, and if that offset is between 1e-4 and 5e-5, it increments a buffer by 1. If the offset is too high to determine, the buffer is decreased by 0.25. If the offset is accurate, the buffer is decremented. If the buffer is too high, all systems using this class switch trig tables and the buffer is reset and is ready to switch trig systems again if needed.
Detects and kicks players using optifine fastmath