Skip to content

Fix plain SHULKER_BOX not treated as shulker box, voiding its contents - #16

Closed
Faboit1 with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-inventory-worth-bug
Closed

Fix plain SHULKER_BOX not treated as shulker box, voiding its contents#16
Faboit1 with Copilot wants to merge 5 commits into
mainfrom
copilot/fix-inventory-worth-bug

Conversation

Copilot AI commented Jun 4, 2026

Copy link
Copy Markdown

Non-dyed shulker boxes (SHULKER_BOX) were being sold as a regular item for their flat price while their contents were silently destroyed. Only dyed variants (WHITE_SHULKER_BOX, etc.) were correctly recognized and had their contents sold.

Root cause

isShulkerBox matched only on endsWith("_SHULKER_BOX"), which excludes the uncolored SHULKER_BOX material name. It fell through to the normal item-sell path, consumed the slot, and voided everything inside.

Fix

// Before
return item != null && item.getType().name().endsWith("_SHULKER_BOX");

// After
String name = item.getType().name();
return name.equals("SHULKER_BOX") || name.endsWith("_SHULKER_BOX");

…config auto-generation

- Fix POWDER_SNOW to POWDER_SNOW_BUCKET in price.yml (POWDER_SNOW is a block-only material, not a valid item)
- Add mat.isItem() safety check in CategoryItemsGUI.resolveItemStack to prevent similar crashes
- Skip worth packet decoration for creative mode players to prevent lore getting baked into item NBT
- Auto-generate example-config.yml from JAR defaults on startup and reload
Copilot AI changed the title Fix category buttons and worth tooltip persistence Fix POWDER_SNOW item crash, creative mode worth lore leak, add example-config generation Jun 9, 2026
Copilot AI changed the title Fix POWDER_SNOW item crash, creative mode worth lore leak, add example-config generation Fix plain SHULKER_BOX not treated as shulker box, voiding its contents Jun 13, 2026
@Faboit1 Faboit1 closed this Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants