mojira.dev
MC-307142

Mobs using a ranged weapon cannot hit targets at longer ranges

Mobs using a ranged weapon (skeletons, pillagers, drowned with trident etc.) are unable to hit targets at long range.

Steps to reproduce:

  1. Summon one of the above mobs with an increased follow range in a flat area:

    /summon skeleton ~ ~2 ~ {equipment:{mainhand:{id:"minecraft:bow",count:1}},attributes:[{id:"minecraft:follow_range",base:250},{id:"minecraft:movement_speed",base:0}]}
  2. Walk away from the mob until it can no longer hit you (about 16 blocks). It will continue to fire in your direction but be unable to hit you.

  3. Walking even further away causes the distance shot to increase, but never to the position of the player.

The same applies with verticality.

  1. Repeat the above process but summon the mob higher than your position:

    /summon skeleton ~ ~50 ~ {equipment:{mainhand:{id:"minecraft:bow",count:1}},attributes:[{id:"minecraft:follow_range",base:250},{id:"minecraft:gravity",base:0},{id:"minecraft:movement_speed",base:0}]}
  2. The mob will hit just in front of the player. Walking a couple blocks backwards confirms the mob should be able to hit the players position, the mob was just unable to target it.

Attachments

Comments 4

Thank you for helping us improve Minecraft! We saved your files:

[media][media]

Hey! Just wanted to point out that there’s an intentional amount of random variation that ranged mobs have when attacking. At shorter distances this isn’t as noticeable since the variation isn’t enough to make the mob miss. But, the greater the distance away, the more apparent the random variation becomes. This is intentional game balance to make ranged combat feel more fair.

That said, I did test your first command just to see if I was seeing the same thing, and it was similar. I was still being hit up to 28 blocks, but the frequency of successful hits had dropped significantly to the point where there was essentially no threat.

TL;DR I think this is intentional behavior to make the game more fair and fun for the average Minecraft player.

I am very interested in how you were getting hit at 28 blocks. I have left it running for 30 minutes and have not been hit once at a range of about 18 blocks. It consistenty hits in front of me.

The issue for me has not been random variation, I understand that is intentional. They just consistently target in front of the player. This is most obvious in the “long_range_aiming” video I uploaded. Where the skeleton consistently hits 1 block in front of me, but upon moving backwards, it is shown to be able to target the location I was just at, but not when I am there.

Looked at this again, it is affected by difficulty. I was able to be hit from a further distance on Easy and Normal. I think this is due to the random variance being greater the lower the difficulty, so some shots that are supposed to be off target go further and hit the player.

Brianthecoo

(Unassigned)

Confirmed

Gameplay

Low

Combat

26.1

Retrieved