mojira.dev
MC-270804

Breaking blocks in spawn chunks causes BE data desyncs

When breaking a block with block entity data, in the event that the break is denied by the server (such as when breaking blocks in spawn chunks), the block entity data is lost until the chunk is reloaded from the server.

Attached are an image of a sign and a banner in spawn chunks, and then another image of what they look like after attempting to break them as a non-opped player (which causes the break to be denied by the server).

The data is lost until the block is re-sent to the client, such as by relogging. My analysis is below (copied inline from here).

When breaking a block, the client will start a prediction about the break process via MultiPlayerGameMode#startPrediction, and immediately trigger the break on the client.

While the prediction is "active", changes to the block sent by the server via ClientboundBlockUpdatePacket will not be commited into the world, instead being delayed until a ClientboundBlockChangedAckPacket is sent (which will happen next tick). This process allows the client to reset the player's position if they moved into an illegally-broken block.

Since the block change is not committed into the world, other packets that rely on the block change being committed (such as ClientboundBlockEntityDataPacket) will be discarded, meaning that when a block is broken on the client but denied by the server, the BE data is lost from the client.

Linked issues

Attachments

Comments 2

[^BJCNFLx[1].png]
[^f9p4JnW[1].png]

Thank you for your report!
We're tracking this issue in MC-36093, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.

Shadows_of_Fire

(Unassigned)

Unconfirmed

(Unassigned)

1.20.4, 1.20.5 Pre-Release 2

Retrieved