Fix: Shelf block entity items rendered in wrong slot for Bedrock clients#6225
Merged
onebeastchris merged 2 commits intoGeyserMC:masterfrom Mar 12, 2026
Merged
Conversation
Bedrock determines shelf item position by list index rather than a Slot tag, so a sparse Items list causes items to shift left into the wrong visual position. This produces a dense 3-element list with empty entries for unoccupied slots. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
Video demonstration of issue pre/post fix shelf-fix-demo.mp4 |
Camotoy
reviewed
Mar 12, 2026
.../main/java/org/geysermc/geyser/translator/level/block/entity/ShelfBlockEntityTranslator.java
Outdated
Show resolved
Hide resolved
…ent with last tested note
Member
|
Hello! Thank you for the PR. In the future, please indicate to which extent AI tools have been used - we'll get out AI policy online asap. Tested BDS handling, which matches the changes implemented in this PR: |
onebeastchris
added a commit
to onebeastchris/Geyser
that referenced
this pull request
Mar 18, 2026
…nts (GeyserMC#6225) * Fix: Shelf block entity items rendered in wrong slot for Bedrock clients Bedrock determines shelf item position by list index rather than a Slot tag, so a sparse Items list causes items to shift left into the wrong visual position. This produces a dense 3-element list with empty entries for unoccupied slots. * Move static final EMPTY_ITEM variable to BedrockItemBuilder, add comment with last tested note --------- Co-authored-by: onebeastchris <github@onechris.mozmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bedrock determines shelf item position by list index, not by a
Slottag. The previous implementation streamed Java's sparseItemslist (which only contains occupied slots), so items would shift left into the wrong visual position. For example, an item in slot 1 (middle) would appear in slot 0 (left) on Bedrock.This fix produces a dense 3-element list with empty item entries for unoccupied slots, so each item lands at the correct list index matching its Java
Slotvalue.Before:
[{item}]→ Bedrock renders in slot 0 (wrong)After:
[{empty}, {item}, {empty}]→ Bedrock renders in slot 1 (correct)Tested on a Velocity + Paper server with both Java and Bedrock clients connected.