The bug
When a predicate does not exist, commands that evaluate it act as though it existed, ran properly, and returned false.
Compare the following:
@a[advancements={does_not_exist=false}] // finds nobody
@a[advancements={does_not_exist=true}] // finds nobody
@a[predicate=!does_not_exist] // finds everyoneHow to reproduce
/execute unless predicate aklsdjfaksjfa
/execute if entity @s[predicate=!alskdjf]Expected result: error, 'aklsdjfaksjfa' not found
Actual result: Test passed
Using 19w41a's official mappings.
Both predicates in entity selectors and in
executecommands fallback toLootItemCondition.FALSE. (Seenet/minecraft/commands/arguments/selector/options/EntitySelectorOptions#bootstrapandnet/minecraft/server/commands/ExecuteCommand#checkCustomPredicate).However
advancementsargument in entity selectors checks whether the advancement doesn't equalnullinstead of using a fallback, so it will always returnfalseif the specific advancement doesn't exist.imo removing the fallback and checking if
customPredicate != null && ...will fix this bug.