Skip to content

Conversation

@Y2Kwastaken
Copy link
Contributor

Addresses #13438 as a potential fix

As somewhat stated in the issue the issue trickles down to these two methods below in BlockLectern

    public static void resetBookState(@Nullable Entity entity, Level level, BlockPos pos, BlockState state, boolean hasBook) {
		...
        level.setBlock(pos, blockState, Block.UPDATE_ALL);
		...
    }

    public static void signalPageChange(Level level, BlockPos pos, BlockState state) {
        changePowered(level, pos, state, true); 
		// In changePowered "level.setBlock(pos, state.setValue(POWERED, powered), Block.UPDATE_ALL);"
		...
    }

In each of these methods setBlock is called acting on the world. As the MenuType API acts upon fake BlockEntities utilizing the player's position in order to invoke functionality on the fake block entities thus moving them from "fake and virtual" into the real world as tangible blocks.

My proposed fix (Which is by no means clean or ready for merger). Is to add a simple boolean toggle to the BlockEntity that my InventoryViewBuilder can activate when required. While this fix isn't ideal I found no "top-level" way to avoid this besides a boolean switch that didn't involve strenuous rewrites and large diff.

If this approach seems satisfactory I'll clean up this PR to align with merger requirements.

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Awaiting review

Development

Successfully merging this pull request may close these issues.

1 participant