Mojira Archive
MC-255059

AttackStrengthTicker desynchronization when aborting block break

Bug

The client resets its AttackStrengthTicker in MultiPlayerGameMode#stopDestroyBlock, however (strangely) it does not reset it in the other places where ABORT_DESTROY_BLOCK is sent. The server never resets the AttackStrengthTicker when a block destroy is aborted.

Vanilla Reproducer

This bug is hard to demonstrate due to another bug https://bugs.mojang.com/browse/MC-255058. Currently, the bug in this report simply causes a 1-tick delay between the client & server strength ticker.

However, once that other bug is fixed, this issue will become more obvious because the client will think it has a low AttackStrengthTicker, but the server will make attacks deal maximum damage.

Fix

Remove the last line of `MultiPlayerGameMode#stopDestroyBlock` which erroneously resets the attack strength.

 

Thanks,

Moulberry

Unresolved

James Jenour

2022-08-08, 05:06 PM

2023-09-06, 12:28 PM

6

5

Confirmed

Low

Platform

Networking

1.19.2, 1.19.4, 23w31a

-