-
Bug
-
Resolution: Unresolved
-
None
-
1.19.2, 22w43a, 23w06a, 1.19.4, 1.20.1
-
None
-
Confirmed
-
Combat, Networking
-
Normal
-
Platform
Bug
Any swinging animation results in the AttackStrengthTicker being reset on the server, even if it isn't reset on the client. This desync can cause seemingly full attacks to deal minimum damage.
Vanilla Reproducer
Some ways of producing a swing that shouldn't reset the cooldown include (but are not limited to): interacting with a block, breaking a block, using an item from your off hand.
This video shows such cases triggering the desync: https://youtu.be/-ppiZNBVm9g
Importance
This bug causes big problems during combat, players will seemingly perform a full attack only for the attack to deal 0 damage.
Recommended Fix
Currently, it seems as though the only reason the AttackStrengthTicker is reset upon swinging is in order to reset it when the player misses (in Minecraft#startAttack). Therefore, doing the following would solve the issue:
- Make the client send a `ServerboundMissPacket` upon missing, which the server can use to reset the ticker
- relates to
-
MC-255059 AttackStrengthTicker desynchronization when aborting block break
- Open
-
MC-116510 Attack indicator doesn't indicate (most of the time) that breaking instantly-mineable blocks resets your attack
- Open
-
MC-118740 Performing any right-click action silently resets the attack cooldown
- Reopened