Repository navigation
Conversation
Replace CraftBukkit's hardcoded invalidItems HashSet with Material- derived IDs inlined on PlayerConnection (NAME_ITEM, wall/standing, diode/comparator, double slabs, technical blocks). Co-authored-by: xii69 <xii69@yahoo.com>
cursor
Bot
force-pushed
the
fix/creative-item-filter
branch
from
October 14, 2026 21:31
2de053b to
bf8f04c
Compare
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
Creative mode blocked “invalid” item IDs with a hardcoded HashSet and a TODO saying “check after every update.” That list went stale whenever 1.8 materials drifted (doors, banners, comparators, etc.), so some technical/non-placeable IDs could still get through creative inventory.
What this changes
Replaces the manual ID list with
CreativeItemFilter, built from BukkitMaterial(block vs item forms, wall/standing pairs, on/off states, double slabs, plus explicit technical IDs). Still gated byfilter-creative-items.Why this is needed
A hand-maintained ID list is guaranteed to rot. Deriving the forbidden set from Material keeps the creative filter correct without needing someone to remember to update numbers every protocol tweak.
Testing
CreativeItemFilterTest5/5; server tests green; package OK.