Fix ItemPredicate field name in advancement JSON causing item-specific advancements to fire for any item#1620
Merged
rubensworks merged 2 commits intomaster-1.21-ltsfrom Feb 28, 2026
Conversation
…dd negative game test Co-authored-by: rubensworks <440384+rubensworks@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix progression errors for manual tutorial
Fix ItemPredicate field name in advancement JSON causing item-specific advancements to fire for any item
Feb 28, 2026
This was referenced Feb 28, 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.
Tutorial advancements using item-specific predicates (e.g. "Tool for Obsidian", and the IntegratedTunnels "Click with diamond sword") were triggering regardless of the actual item configured, because
ItemPredicate.CODECin 1.21 renamed the field from"item"to"items". The unrecognized field silently produced an empty predicate matching every itemstack.Changes
advancement/challenges/tool_for_obsidian.json: FixItemPredicatefield name from the old"item"to"items"so it correctly matches onlyminecraft:stone_pickaxe:GameTestsAdvancements.java: AddassertAdvancementNotDonehelper and a newtestAdvancementToolForObsidianNegativegame test that verifies the advancement does not trigger when the operator is constructed withbone_mealinstead ofstone_pickaxe.Note on IntegratedTunnels
The same broken format exists in IntegratedTunnels'
click_sword/click_sword.json(the originally reported advancement). The identical fix — changing"item": "minecraft:diamond_sword"→"items": "minecraft:diamond_sword"inside theItemPredicateobject — should be applied there as well.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/CyclopsMC/IntegratedTunnels/git/trees/master-1.21/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.