Fix showoff item cleanup on chunk unload and double-chest handling#64
Merged
MLG-SERBUR merged 1 commit intoApr 20, 2026
Merged
Conversation
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.
Motivation
This PR started from a review request and then narrowed to only changes that are actually useful.
User prompt:
“review #34
tell me what it changes, and if each change is actually useful/needed or not.
then implement the definitely useful ones.”
Assistant response (summary):
Reviewed PR #34, split changes into useful vs unnecessary/risky, and implemented only the clearly useful fixes.
Conversation Summary (Prompt → Response)
User prompt:
“if the shop has to be a chest or doublechest, and the stock has to fit in that chest or doublechest, how is it possible for it to exceed the 54 slots?”
Assistant response (summary):
Agreed this cap is not needed in practice for chest/double-chest constrained stock, and reverted that clamp change.
User prompt:
“as for location#getBlock in getContainer - check the git history/blame to see if that's intentional. I have a feeling it might've been to ensure the blockstate is loaded and it's not pulling from cache?”
Assistant response (summary):
Checked history/blame and restored
location.getBlock();instead of removing it casually. Also investigated upstream API/server sources; evidence suggests it may be a legacy/defensive call rather than strictly required, but keeping it is safer without a focused refactor.User prompt:
“for the despawn items - what if the placed block is not a shop? ... wouldn't this miss shops that are turned into doublechests with a non-shop chest block?”
Assistant response (summary):
Investigated shop creation flow and double-chest resolution. Current logic using
shopAPI.isShop(container)should still detect merged double chests when one side is already a shop, while avoiding non-shop cleanup.User prompt:
“print the commit where location#getblock was introduced. Also check if my prior question was correct or not...”
Assistant response (summary):
Identified introduction commit as
f75f7058d8591b6d7b55179900867e97325054e0and confirmed rationale analysis above.Final Scope in This PR
Kept (definitely useful)
ShowoffItemchunk-unload matching to compare world + chunk coordinates instead of chunk object identity.Reverted / Not Included
location.getBlock();inShopAPI#getContainer(restored after history/blame review).