mojira.dev
MC-312454

Serverside check for players' block destroying speeds is mostly ineffective

Whenever a player destroys a block on the client a packet is sent to the server, then the server recalculates the expected duration it would take to break the block and checks if the client took at least 0.7x that amount. If this isn’t the case, the server places the block back on the client and removes it again once the expected amount of time for destroying the block has passed.

This is how it worked up to 26.3-pre-2, but since 26.3-pre-3 it seems that in a lot of scenarios the block is removed instantly even when it isn’t supposed to be (See my report MC-312450 on this, previously the block would only get removed once touching the ground).

Since ghost items aren’t really a thing anymore in 26.3 (thanks again!) I had to resort to a very simple mod to demonstrate the possible consequences of this bug. The only thing the mod does is that it overwrites the return value of BlockBehaviour::getDestroyProgress with 0.5F on the client side only. The results can be observed in the following videos:

Video 1: https://www.youtube.com/watch?v=1AvwdovHTkI
This was recorded on a single player world running the aforementioned modification in 26.3. You can see the blocks briefly reappearing for a single tick before the server removes them again.

Video 2: https://www.youtube.com/watch?v=PF_2HZuub8U
This was recorded on a 26.2 single player world with an identically functioning modification. Here the blocks do not disappear instantly after the server rejects the block destruction.

I have looked at some of the relevant changes made in decompiled source code, but wasn’t able to figure out what causes the difference in behaviour between 26.2 and 26.3 (or more specifically 26.3-pre2 and pre3).

I wanted to make this report private, as I see some griefing potential in this and wanted to avoid this information getting into the hands of cheat developers and/or griefers. I do believe there’s a real risk to vanilla server owners if modifications are developed that have the ability to clear large areas of blocks in a short amount of time. Unfortunately I misclicked and can’t seem to figure out how to make it private now °_°, guess you guys can decide if it should be privated or not

Comments 0

No comments.

Z0rty

(Unassigned)

Unconfirmed

26.3, 26.4 Snapshot 3

Retrieved