The bug
An entity_properties predicate with the player sub-predicate can only be evaluated as true if the gamemode field is specified, meaning that a predicate testing for a player's experience level, recipes, advancements or statistics will need to test for a game mode as well.
Likewise, an advancement criterion with the player condition in its legacy form using the player sub-predicate will only be automatically granted if conditions.player.player.gamemode exists and matches the player's game mode.
How to reproduce
Create a new creative mode world with the attached data pack. This data pack contains fourteen advancements. The root advancement will be obtained automatically to reveal the advancement tab with all other advancements. Advancements with legacy in the name use conditions.player.player. Advancements with predicate in the name use conditions.player as an array of predicates. Advancements with gamemode in the name test for the player's game mode being creative, while advancements with no_gamemode in the name do not test for game mode.
Granting yourself the
mojira:fooadvancement while in creative mode will grantmojira:advancement_legacy_gamemodeandmojira:advancement_predicate_gamemodebut will not grantmojira:advancement_legacy_no_gamemodeandmojira:advancement_predicate_no_gamemode.Giving yourself at least one level of experience while in creative mode will grant
mojira:level_legacy_gamemodeandmojira:level_predicate_gamemodebut will not grantmojira:level_legacy_no_gamemodeandmojira:level_predicate_no_gamemode.Riding on a minecart for ten blocks while in creative mode will grant
mojira:stats_legacy_gamemodeandmojira:stats_predicate_gamemodebut will not grantmojira:stats_legacy_no_gamemodeandmojira:stats_predicate_no_gamemode.Unlocking the acacia pressure plate recipe while in creative mode will grant
mojira:recipe_legacy_gamemodeandmojira:recipe_predicate_gamemodebut will not grantmojira:recipe_legacy_no_gamemodeandmojira:recipe_predicate_no_gamemode.
Attachments
Comments 0
No comments.