AutoBlock
[X] DefinitiveAutoBlock — holds a block/shield up while continuously swinging at enemies. On 1.8 it's block-hit autoblock, on 1.21 shield-while-attacking. Ported from Rain's AutoBlockCheck. Vanilla can't swing and use an item simultaneously for more than an instant.
What it detects
AutoBlock — holds a block/shield up while continuously swinging at enemies. On 1.8 it's block-hit autoblock, on 1.21 shield-while-attacking. Ported from Rain's AutoBlockCheck. Vanilla can't swing and use an item simultaneously for more than an instant.
False-positive guards
- Attacker-in-vehicle exempt
- lastSwingTick overflow guard (Int.MIN_VALUE -> not swinging)
- Gated on isBlocking (UseAction.BLOCK), excluding bows (BOW), food (EAT), potions (DRINK)
- On 1.8 sword-blocking is a normal PvP technique -> +30 tick bonus so legit block-hitters don't flag
- ProtocolDetector fails open to modern (looser 1.8 gate only loosens)