
Event-based dodge detection system (no AI goals):
Fabric Events:
ServerLivingEntityEvents.ALLOW_DAMAGE - Detects melee and projectile hits before damage appliesUseItemCallback.EVENT - Detects ranged weapon usage (bow, crossbow, trident)MobbilityEvents.SPELL_CAST_START - Detects spell casts targeting the mobForge Events:
LivingAttackEvent - Detects melee and projectile hits before damage appliesArrowLooseEvent - Detects player bow shots with charge calculationLivingEntityUseItemEvent.Finish - Detects crossbow/trident usageMobbilityEvents.SPELL_CAST_START - Detects spell casts targeting the mobDodge Process:
Fully customizable via config/mobbility/combat_roll.toml:
[combatRoll]
enabled = true
mobRollChance = 0.3
dodgeRangedAttacks = true
dodgeMeleeAttacks = true
cancelCastOnDodge = true
allowDodgeDuringChanneling = false