AutoBlock

[X] Definitive
AutoBlock — the use-item-while-attacking family. Three sub-flags share one VL pool: AutoBlock (Rain port — shield/sword-block + swing overlap), AutoBlock(SwingUse) (Grim MultiActionsE fold — swing while eating/drinking; vanilla left-click interrupts consuming), and AutoBlock(AttackUse) (Grim MultiActionsA fold — an AttackEvent while isBlocking||isUsingConsumable; vanilla attacking interrupts using). On 1.8 the block path is block-hit autoblock, on 1.21 shield-while-attacking.
id: autoBlock  ·  class: AutoBlockCheck  ·  group: Combat

What it detects

AutoBlock — the use-item-while-attacking family. Three sub-flags share one VL pool: AutoBlock (Rain port — shield/sword-block + swing overlap), AutoBlock(SwingUse) (Grim MultiActionsE fold — swing while eating/drinking; vanilla left-click interrupts consuming), and AutoBlock(AttackUse) (Grim MultiActionsA fold — an AttackEvent while isBlocking||isUsingConsumable; vanilla attacking interrupts using). On 1.8 the block path is block-hit autoblock, on 1.21 shield-while-attacking.

Observer signature

On SwingSignal records lastSwingTick; 'swinging' = tick - lastSwingTick < 6. AutoBlock: swinging && isBlocking -> autoBlockTicks; flag at level 1.0 when > threshold (+30 legacy bonus on 1.8). AutoBlock(SwingUse): swinging && isUsingConsumable -> useSwingTicks; flag at level 1.0 when > threshold. AutoBlock(AttackUse): on AttackEvent, if isBlocking||isUsingConsumable, flag at level 1.0 (one event is the cheat). Bows excluded (bow-draw is usingItem but not isUsingConsumable/isBlocking).

False-positive guards

  • Attacker-in-vehicle exempt
  • lastSwingTick overflow guard (Int.MIN_VALUE -> not swinging)
  • Block path gated on isBlocking (UseAction.BLOCK), excluding bows (BOW), food (EAT), potions (DRINK)
  • SwingUse path gated on isUsingConsumable (excludes bows — same MC-152728 rationale as noSlow)
  • On 1.8 sword-blocking is a normal PvP technique -> +30 tick bonus so legit block-hitters don't flag (block path only)
  • ProtocolDetector fails open to modern (looser 1.8 gate only loosens)

Configuration

Defaults (editable in-game via the YACL config screen or /ius config):

FieldDefault
enabledtrue
setbackVL5.0
decay0.5
threshold10.0
swing ticks6
1.8 bonus+30.0 (block path)
AttackUse level1.0
sub-flagsAutoBlock / SwingUse / AttackUse (one VL pool)

Source

src/main/kotlin/dev/iustitia/checks/combat/AutoBlockCheck.kt  ↗