Summary: Inventory hand-in matching only does strict, full-component equality (ExactItem → candidate.isSimilar(item.create())). The catalog needs a third item matcher that accepts an item by base type while ignoring extra data components (or by matching only a subset of required components, e.g. an enchantment at level ≥ N), so component-rich vanilla items can be handed in.
Why this blocks 4.0
This is the last pure-engine gap on the 4.0 readiness survey. Several redesigned Tier 6 challenges require the player to possess items that, in real play, always carry extra data components the YAML prototype can't predict (food with per-flower suspicious_stew_effects, a forged netherite tool, or gear carrying enchantments and other meta). Because ExactItem.matches requires the candidate to be isSimilar to a fixed prototype, any real-world variation in components causes the hand-in to fail, making those challenges effectively impossible to complete. The any-of and #tag matchers landed and cover "any of a fixed set" / "any member of a material tag", but neither expresses "this base item with at least these components, ignore the rest."
Current state (on feature/immutable-challenge-catalog)
ItemMatcher is a sealed interface permitting only ExactItem, ItemTag, AnyOfItems — no at-least/subset variant. uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/challenge/catalog/ChallengeRequirements.java:94
ExactItem.matches is strict full-component equality: return candidate.isSimilar(item.create());. ChallengeRequirements.java:104-106 (the isSimilar call is on line 105)
ItemStackSpec.create() returns prototype.clone(), a full ItemStack carrying all meta/components, so isSimilar compares the complete component set, not just the base type. uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/gameobject/ItemStackSpec.java:23-25
- The YAML parser accepts a plain item id (→
ExactItem), a #tag (→ ItemTag), or a YAML list (→ AnyOfItems). There is no matchMode / minimum / ignore-components / stored_enchantments handling for item requirements (the item requirement parser only knows item / amount / progression). uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/challenge/catalog/yaml/ChallengeCatalogYamlParser.java:420-438 (the minimum / ignore substrings that do appear are all unrelated to item-component matching: the IslandLevelRequirement minimum at lines 390-391, the rank gate's minimumCompletedChallenges at lines 379/382, a block-data comment at line 472, and a caught-exception name at line 528)
- Matchers are consumed during completion in
ChallengeExecutor via the ItemRequirementSpec.matches dispatch: spec.matches(item) at uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/challenge/ChallengeExecutor.java:615 and required.getKey().matches(item) at :642
- Affected redesigned challenges (design draft, untracked at
docs/challenge-redesign/uskyblock-v2-challenge-redesign.md):
- 6.5
topchef — requires suspicious_stew (carries per-flower effect components). Draft lines 517-522
- 6.7
netheritesmith — requires netherite_upgrade_smithing_template + netherite_ingot, the inputs consumed to forge netherite gear. Draft lines 530-534
- 6.8
warmaster — requires gear at a target enchantment, e.g. diamond_sword[enchantments={sharpness:4}], diamond_chestplate[enchantments={protection:4}], bow[enchantments={power:4}]. Draft lines 536-540
Scope
References
Category: engine-code · Effort: medium · Source: 4.0 readiness survey.
Summary: Inventory hand-in matching only does strict, full-component equality (
ExactItem→candidate.isSimilar(item.create())). The catalog needs a third item matcher that accepts an item by base type while ignoring extra data components (or by matching only a subset of required components, e.g. an enchantment at level ≥ N), so component-rich vanilla items can be handed in.Why this blocks 4.0
This is the last pure-engine gap on the 4.0 readiness survey. Several redesigned Tier 6 challenges require the player to possess items that, in real play, always carry extra data components the YAML prototype can't predict (food with per-flower
suspicious_stew_effects, a forged netherite tool, or gear carrying enchantments and other meta). BecauseExactItem.matchesrequires the candidate to beisSimilarto a fixed prototype, any real-world variation in components causes the hand-in to fail, making those challenges effectively impossible to complete. The any-of and#tagmatchers landed and cover "any of a fixed set" / "any member of a material tag", but neither expresses "this base item with at least these components, ignore the rest."Current state (on
feature/immutable-challenge-catalog)ItemMatcheris a sealed interface permitting onlyExactItem,ItemTag,AnyOfItems— no at-least/subset variant.uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/challenge/catalog/ChallengeRequirements.java:94ExactItem.matchesis strict full-component equality:return candidate.isSimilar(item.create());.ChallengeRequirements.java:104-106(theisSimilarcall is on line 105)ItemStackSpec.create()returnsprototype.clone(), a full ItemStack carrying all meta/components, soisSimilarcompares the complete component set, not just the base type.uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/gameobject/ItemStackSpec.java:23-25ExactItem), a#tag(→ItemTag), or a YAML list (→AnyOfItems). There is nomatchMode/minimum/ ignore-components /stored_enchantmentshandling for item requirements (the item requirement parser only knowsitem/amount/progression).uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/challenge/catalog/yaml/ChallengeCatalogYamlParser.java:420-438(theminimum/ignoresubstrings that do appear are all unrelated to item-component matching: theIslandLevelRequirementminimumat lines 390-391, the rank gate'sminimumCompletedChallengesat lines 379/382, a block-data comment at line 472, and a caught-exception name at line 528)ChallengeExecutorvia theItemRequirementSpec.matchesdispatch:spec.matches(item)atuSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/challenge/ChallengeExecutor.java:615andrequired.getKey().matches(item)at:642docs/challenge-redesign/uskyblock-v2-challenge-redesign.md):topchef— requiressuspicious_stew(carries per-flower effect components). Draft lines 517-522netheritesmith— requiresnetherite_upgrade_smithing_template+netherite_ingot, the inputs consumed to forge netherite gear. Draft lines 530-534warmaster— requires gear at a target enchantment, e.g.diamond_sword[enchantments={sharpness:4}],diamond_chestplate[enchantments={protection:4}],bow[enchantments={power:4}]. Draft lines 536-540Scope
ItemMatchervariant to the sealed interface inChallengeRequirements.javathat matches an item by base type while ignoring components not explicitly specified (an "at-least" / subset match), including the ability to require an enchantment at level ≥ N.matches(ItemStack)for the new variant without relying onisSimilar(compare base type + only the specified components/enchantments, allowing the candidate to carry additional components).ChallengeCatalogYamlParserto parse the new matcher syntax for item requirements (e.g. amatchMode/minimum/ignore-components key or astored_enchantments-style spec) and route it throughparseItemMatcher; add it to the relevantwarnUnknownKeysallowlists.ChallengeCatalogYamlParserTestand matcher unit coverage (candidate with extra components passes; missing required component or too-low enchant level fails).topchef,netheritesmith,warmaster) inchallenges.ymlto the new matcher.#tag/ any-of documentation.References
docs/challenge-redesign/uskyblock-v2-challenge-redesign.md(untracked / do-not-commit), challenge sections at lines 517-540ChallengeRequirements.java(ItemMatcherat line 94,ExactItem.matchesat 104-106),ChallengeCatalogYamlParser.java(item matcher parsing at 420-438),ItemStackSpec.java:23-25,ChallengeExecutor.java:615/:642Category: engine-code · Effort: medium · Source: 4.0 readiness survey.