According to 25w41a changelog:
Item predicate in command form has been extended to accept empty predicates for any component type.
Similarily to component predicates in data, those empty entries only check for component existence.
However, some component predicates cannot be parsed correctly.
It happens to components with dedicated predicate that doesn’t allow empty object.
This behavior doesn’t match the phrase “for any component type” mentioned in the changelog.
Steps to reproduce
Run the command in chat:
/execute if items entity @s weapon *[potion_contents~{}]Run the command in chat:
/execute if predicate {condition: entity_properties, entity: this, predicate: {slots: {weapon: {predicates: {potion_contents: {}}}}}}
Expected behavior
Either “test passed” or “test failed”, depending on what the player is holding.
Observed behavior
Both commands cannot be parsed.
The error message in command 1 is:
Malformed 'minecraft:potion_contents' predicate: 'Failed to parse either. First: Not a string; Second: Failed to parse either. First: Not a list: {}; Second: Not a string'The error message in command 2 is:
Failed to parse structure: Failed to parse either. First: Not a string; Second: Failed to parse either. First: Not a list: {}; Second: Not a string missed input: {potion_contents:{}} missed input: {weapon:{predicates:{potion_contents:{}}}}Linked issues
is duplicated by 1
Comments 2
Thank you for your report!
After consideration, the issue is being closed as Won't Fix.
Please note that this is not the same as Working as Intended, as this bug report correctly describes behavior in the game that might not be the intended or desirable behavior, but it will not be fixed right now. Sometimes, this is because the issue reported is minor and/or impossible to change without large architectural changes to the code base.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Can confirm in 26.2 Pre-Release 2 as well.