The bug
Melee mobs sometimes attack faster than the usual rate of once per second. When this happens, the animation for the first attack is (possibly always) not played.
The easiest way to reproduce this is to spawn a vindicator and let it attack you while you are blocking while walking towards it. The vindicator will deal damage to you immediately after disabling your shield, making it appear as though the disabling attack dealt damage.
A proper fix for this would involve saving mobs' attack cooldown to NBT and fixing MC-250059 as well.
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
is duplicated by 4
relates to 3
Attachments
Comments 15
I was going to mention the bug fix of MC-147516 at first because I do think it's a side effect caused by the fix, but then decided not to.
They can now attack normally without stopping due to that fix, as intended... But they can now also sometimes suddenly attack 2 times in a row out of nowhere. This unexpected inconsistency can mess with the player's blocking and expected health during the fight.
I'll try to provide a clip when I can during the 24 hours.
I made a quick video of the bug in 1.17pre2 and uploaded it here.
The zombie would usually hit me every 20 ticks or so if I was standing still, but I would get more frequent double-attacks if I pulled away right as it hit me and then immediately strafed back into it. Sometimes the time between attacks was in the single digits although this was fairly rare.
Yep, an issue I too am experiencing in 1.17.1 - double strikes seem to be happening a lot lately, which is especially frustrating when you are playing hardcore.
Also present in 1.19.3 pre-2 it seems.
OK, I STILL stand by my previous comment that I love y'all, Mojang, but seriously, this still being a thing is getting ridiculous.
Relates to MC-131426
This is intentionally different to 1.15.2 due to the fixing of MC-147516, so yes, they are more likely to attack more often now. Please provide a short clip of what you think is the issue here with your F3 debug screen enabled.