Drop incoming play packets carrying malformed (NaN/Infinity) or absurdly
large positions/velocities before the game applies them and overflows its
own section/collision math and crashes.
Some servers send such values deliberately to crash connected clients
(observed per-axis values around 1.8e38/2.8e38/2.1e38, reproducible with
optimisation mods disabled, so it is a vanilla-math overflow). A single
AutismProtectorNumericSanity check guards five vectors on
ClientPacketListener: explosion, player teleport, entity teleport, entity
position sync and entity spawn.
- AutismProtectorNumericSanity: pure, unit-tested sanity predicates.
- AutismProtectorPacketCrashGuardMixin: drops a packet whose position or
velocity is out of range; require = 0 so a mapping rename degrades to
"that packet unguarded" rather than failing the required mixin config.
- Gated by AutismProtector.shouldGuardCrashPackets() / config field
protectorCrashGuard (default on); inherits the security package's
opsec/external-protector deferral.
Adapted from BossCrashGuard (github.com/WaterBoss11/BossCrashGuard).