Skip to content

Fail loudly for CRAFTING/CREATIVE CraftContainer types - #201

Merged
windcolor-dev merged 5 commits into
Wind-Development:masterfrom
xii69:fix/craftcontainer-inventory-types
Oct 15, 2026
Merged

windcolor-dev merged 5 commits into
Wind-Development:masterfrom
xii69:fix/craftcontainer-inventory-types

Conversation

@xii69

@xii69 xii69 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

What was wrong

Opening CREATIVE or CRAFTING through CraftContainer silently did the wrong thing: creative was a no-op empty container, crafting fell through into workbench layout

What this changes

Throw IllegalArgumentException for those types in setupSlots and getNotchInventoryType, same idea as CraftHumanEntity.openInventory. Real types (workbench, chest, furnace, …) unchanged.

Why this is needed

Silent wrong behavior hides plugin bugs and can desync inventory UI. Failing loudly is safer and matches how opening those inventories is already rejected elsewhere.

Testing

CraftContainerInventoryTypeTest 4/4; server suite green; package OK.

cursoragent and others added 4 commits October 13, 2026 18:58
Invalid InventoryType.CRAFTING and CREATIVE now throw IllegalArgumentException
in setupSlots and getNotchInventoryType, matching CraftHumanEntity.openInventory.
WORKBENCH and other legitimate custom-container types are unchanged.

Co-authored-by: xii69 <xii69@yahoo.com>
@cursor
cursor Bot force-pushed the fix/craftcontainer-inventory-types branch from cb51262 to 02cb9a6 Compare October 14, 2026 21:11
…types

Correct "Fail loudly for CRAFTING/CREATIVE CraftContainer types"
@windcolor-dev
windcolor-dev merged commit b3a2a9c into Wind-Development:master Oct 15, 2026
2 checks passed
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.

4 participants