Skip to content

Fix inventory desync when placing blocks with spawn protection#11090

Merged
Machine-Maker merged 3 commits into
PaperMC:masterfrom
notTamion:fix-spawn-inv-desync
Aug 31, 2024
Merged

Fix inventory desync when placing blocks with spawn protection#11090
Machine-Maker merged 3 commits into
PaperMC:masterfrom
notTamion:fix-spawn-inv-desync

Conversation

@notTamion
Copy link
Copy Markdown
Contributor

fixes #11012

Should we maybe call BlockPlaceEvent in a cancelled state when a player tries placing blocks with spawn protection on? This could allow plugins to pick which blocks should be placeable at spawn.

@notTamion notTamion requested a review from a team as a code owner July 16, 2024 14:24
@TJIMOSHIMA

This comment was marked as spam.

@notTamion
Copy link
Copy Markdown
Contributor Author

do you have anything of value to add to this pr or are you just here to troll?

Copy link
Copy Markdown
Member

@Machine-Maker Machine-Maker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throw MC-99075 into the comment, it looks like this is a reported vanilla issue.

@notTamion notTamion force-pushed the fix-spawn-inv-desync branch from fc7091e to 4b26546 Compare August 29, 2024 13:13
@lynxplay
Copy link
Copy Markdown
Contributor

Changed with the following line of thought:

Cancelling the inventory open event is less restrictive than cancelling the entire interaction all together.
As such, some logic should still be run, hence a lot of places will be returning consuming interact results, however immediate logic, like stats related to inspecting such blocks are not incremented.

@Machine-Maker Machine-Maker merged commit 227c94a into PaperMC:master Aug 31, 2024
@notTamion notTamion deleted the fix-spawn-inv-desync branch August 31, 2024 19:16
LeonTG pushed a commit to LeonTG/Paper that referenced this pull request May 17, 2026
…MC#11090)

* fix

* mention mojira issue

* move to vanilla bug fixes patch

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Merged

Development

Successfully merging this pull request may close these issues.

Spawn protection does not update the client inventory.

4 participants