Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-266658

Mobs hit further diagonally now

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.20.2, 23w45a
    • None
    • Confirmed
    • Hitboxes, Mob behaviour

      The bug

      The changes to mob attack reach were described in the 23w33a changelog as follows:

      The area where a mob can attack is now their bounding box extended in horizontal directions.

      This largely improved mob reach, I think it was a good change overall. But there is one negative consequence, which is that mobs now reach up to 33% further when attacking in a direction that's not aligned with the block grid.

      How to reproduce

      1. Summon a husk and prevent it from moving:

      /summon husk
      /effect give @e[type=husk] slowness 100000 20 true
      

      2. Teleport 1.5 blocks away from it, in an axis-aligned direction:

      /execute as @e[type=husk] at @s rotated 0 0 run tp @p ^ ^ ^1.5
      

      3. Now teleport 2 blocks away from it, in a diagonal direction:

      /execute as @e[type=husk] at @s rotated 45 0 run tp @p ^ ^ ^2
      

      Expected results
      If the husk can't hit you when you're 1.5 blocks away, it certainly shouldn't be able to hit you when you're 2 blocks away. This worked as expected in prior versions.

      Observed results
      You take damage when you're further from the husk, just because it's diagonal!

      Sadly, this seems like an unavoidable side effect of basing a mob's attack range on an inflated version of its axis-aligned hitbox. And yes, technically the player also has a (barely) longer reach against mobs diagonally, so it's "fair", but it's a regression and feels a bit weird that attacks are asymmetrical now.

            Unassigned Unassigned
            tryashtar [Mod] tryashtar
            Votes:
            6 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: