When a mob is given a item with an extended attack reach (e.g., 10 blocks) via attribute modifiers, there is a behavioral inconsistency between mobs using the legacy goal AI system and those using the Brain-based AI system.
Steps to Reproduce:
Select two mobs — one using legacy AI (e.g., Zombie) and one using Brain-based AI (e.g., Piglin).
Give both mobs an item with an extended attack reach attribute, e.g.:
execute as @e[type=!minecraft:player] unless items entity @s weapon.mainhand minecraft:stick run item replace entity @s weapon.mainhand with minecraft:stick[minecraft:attack_range={mix_reach:0,max_reach:10}]Place a target player at a distance of approximately 8 blocks from them.
Observe their behavior when the target is within attack range but not adjacent.
Observed Result:
Mobs using legacy AI continue to walk toward the target until they reach the default melee range, despite the extended reach already allowing them to hit the target from a distance. This indicates that legacy AI does not evaluate the dynamic attack reach attribute and relies on a hardcoded distance check instead.
Mobs using Brain-based AI stop moving immediately once the target enters their extended attack reach and perform the attack animation from their current position. The Brain system correctly queries the dynamic attack reach attribute before deciding whether to move closer.
Expected Result:
Mobs should behave consistently under the same conditions. When equipped with an item has extended attack reach, the reasonable behavior is for the mob to stop moving and attack once the target enters its actual attack range, rather than continuing forward to the default melee distance.
Thank you for helping us improve Minecraft! We saved your files: