when a mob is aggravated towards another from the same type (e.g. from a custom snowball with mob2's UUID as Owner), the mob1 can attack the mob2 from any distance.
This is not consistent for all mobs, but it only does that when both are of the same type.
I have tested it from versions 1.16.5 to 1.19.2, and it always has this effect.
Steps to Reproduce:
place 2 mobs in containment, many blocks apart.
summon an arrow onto a block above mob1
merge mob2's UUID as the owner of the arrow
break the block under the arrow, allowing it to hit mob1
mob1 will then attack mob2 even if they are multiple blocks apart
Observed Results:
mob1 will attack mob2, even though they are out of range
Here are the results of my tests: (yes: any range attack; no: tries to attack normally; none: does not try to attack at all)
husks: yes
blazes: yes
zombies: yes
skeletons: no
wither skeletons: no
husk + blaze: no
zombie villagers: yes
pillagers: none
piglins: none
pillager + husk: no
skeleton + zombie: no
zombie + skeleton: no
Expected Results:
The mobs should attempt to pathfind and only attack when in range.
Screenshots/Videos:
Demonstration of the test with a snowball, 1.19.2
Notes:
This mostly only affects datapack development, although it is simply just not supposed to happen and may cause future issues with implementing ranged mobs.
When/if someone starts looking into what code causes this issue, I've noted that it seems that mobs that have the ability to wield ranged weapons are the ones who work properly.
I couldn't figure out how to put more versions in but I have tested the bug from 1.16.5 to 1.19.2 and it happens in all those versions
Environment
openjdk 17.0.4 2022-07-19
Linked issues
duplicates 1
Comments 2
Thank you for your report!
We're tracking this issue in MC-110386, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Duplicate of MC-110386.