Repository navigation
Fix Display wall settings disconnecting Fabric clients - #13
Merged
Merged
Conversation
Fabric writes menu open data later, on the network thread, where the Display wall saw no formed chest and sent no faces. The client then built a smaller menu than the server. Open data is now read when the menu opens, also for the chest GUI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
Coverage Report for CI Build 38111870486Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage increased (+0.2%) to 76.531%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions42 previously-covered lines in 3 files lost coverage.
Coverage Stats
💛 - Coveralls |
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.
Opening the settings of a Display Chest Wall (right-click with an empty hand) on Fabric disconnected the client with
IndexOutOfBoundsException: Index 36 out of bounds for length 36inClientboundContainerSetContentPacket.Cause
On Fabric, Cyclops Core's
openMenuwrites the menu's open data when the packet is encoded, on the Netty IO thread, not when the menu opens.ContainerDisplay.writeOpenDatareadwall.getDisplayFaces()at that moment, and off the server thread it found no formed chest, so it sent zero faces. The client then built the menu with only the 36 player slots, while the server menu also had one ghost slot per face. I confirmed this with logging: the server wrotefaces=[]fromNetty Server IO, while its own menu had 2 faces.Fix
ContainerDisplay.openDataWriterandContainerChest.openDataWriterread everything when the menu opens and return a writer of those values. The Display wall and the chest core open their menus through them. The chest GUI wasn't visibly broken, but it read its slot and upgrade counts at encode time too, so it could race with a resize. Interface, Redstone and Magnet walls and the Material Upgrade Tool only write a position or hand, so they were fine.Testing
testDisplayOpenDataReadWhenOpening: it creates the writer while the chest is formed, breaks the chest, then writes. With the old lazy writer it fails (Expected faces on the client to be 1, but was 0); with the fix it passes../gradlew buildpasses. Game tests pass on NeoForge (102), Forge (102) and Fabric (104).🤖 Generated with Claude Code
https://claude.ai/code/session_01RSz5r6eowhjNuANBjZE2v6
Generated by Claude Code