Skip to content

Move MenuType API to utilize "real" boolean switch for BlockEntity's - #13439

Open
Y2Kwastaken wants to merge 2 commits into
PaperMC:mainfrom
Y2Kwastaken:lectern-behavior
Open

Move MenuType API to utilize "real" boolean switch for BlockEntity's#13439
Y2Kwastaken wants to merge 2 commits into
PaperMC:mainfrom
Y2Kwastaken:lectern-behavior

Conversation

@Y2Kwastaken

@Y2Kwastaken Y2Kwastaken commented Dec 26, 2025

Copy link
Copy Markdown
Contributor

This PR changes how we handle fake BlockEntity instances. There is a change in logic by adding a "real" field to BlockEntity we can deterministically tell if the BlockEntities are "real." By this real means that it is in world currently and should have somewhat limited capabilities compared to its in world counterparts.

Previously, fake BlockEntity instances were given the player's world without limitations to get around internal assumptions. While somewhat functional, this caused some nasty unintended side effects around placement state, event broadcasting, and redstone/game events. The goal here is to keep fake block entities truly unplaced, while still allowing safe interaction paths where needed.

The goal here is also not to necessarily sacrifice event functionality as much as possible when it comes to Menus as part of their power is being able to utilize normal Bukkit events where otherwise you would have to delegate to NMS or other hacks.

This is good for review its a bug fix, even on latest it fixes the bug still.

Fixes #13438

@Y2Kwastaken
Y2Kwastaken requested a review from a team as a code owner December 26, 2025 18:36
@github-project-automation github-project-automation Bot moved this to Awaiting review in Paper PR Queue Dec 26, 2025
@Y2Kwastaken
Y2Kwastaken force-pushed the lectern-behavior branch 2 times, most recently from a1eec90 to febd434 Compare December 31, 2025 17:45
@Y2Kwastaken Y2Kwastaken changed the title Address Lectern spawning while utilizing MenuType API Move MenuType API to utilize true fake BlockEntity's Dec 31, 2025
@Y2Kwastaken
Y2Kwastaken force-pushed the lectern-behavior branch 3 times, most recently from bb7bfb3 to c65f85e Compare February 4, 2026 18:10
@Y2Kwastaken Y2Kwastaken changed the title Move MenuType API to utilize true fake BlockEntity's Move MenuType API to utilize "real" boolean switch for BlockEntity's Aug 6, 2026
@kennytv

kennytv commented Aug 6, 2026

Copy link
Copy Markdown
Member

Looking at setChanged calls, this causes chunk updates that should be behind the real flag as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

Lectern Block Entity appears in the world When utilizing The MenuType API

4 participants