Repository navigation
Fail loudly for CRAFTING/CREATIVE CraftContainer types - #201
Merged
windcolor-dev merged 5 commits intoOct 15, 2026
Merged
windcolor-dev merged 5 commits into
windcolor-dev merged 5 commits into
Conversation
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>
…ry/CraftContainerInventoryTypeTest.java
Co-authored-by: xii69 <xii69@yahoo.com>
cursor
Bot
force-pushed
the
fix/craftcontainer-inventory-types
branch
from
October 14, 2026 21:11
cb51262 to
02cb9a6
Compare
…types Correct "Fail loudly for CRAFTING/CREATIVE CraftContainer types"
windcolor-dev
approved these changes
Oct 15, 2026
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.
What was wrong
Opening
CREATIVEorCRAFTINGthroughCraftContainersilently did the wrong thing: creative was a no-op empty container, crafting fell through into workbench layoutWhat this changes
Throw
IllegalArgumentExceptionfor those types insetupSlotsandgetNotchInventoryType, same idea asCraftHumanEntity.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
CraftContainerInventoryTypeTest4/4; server suite green; package OK.