mojira.dev
MC-191642

Inconsistent mob melee attack rate / mobs double-attacking

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

Attachments

Comments 15

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.

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.

Can confirm in 1.17.1.

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. 

5 more comments

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.  

In 23w33a

Confirmed in 1.20.2

STILL a problem in 24w14A.

 

Seriously, WHY is this still a thing FOUR YEARS LATER? 🤬

Relates to MC-131426

clamlol

(Unassigned)

Confirmed

Gameplay

Important

Mob behaviour

1.16.1, 20w27a, 20w28a, 20w29a, 20w30a, ..., 24w04a, 24w14a, 1.20.5 Pre-Release 1, 1.21.1, 24w35a

Retrieved