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:foo
advancement while in creative mode will grantmojira:advancement_legacy_gamemode
andmojira:advancement_predicate_gamemode
but will not grantmojira:advancement_legacy_no_gamemode
andmojira:advancement_predicate_no_gamemode
.Giving yourself at least one level of experience while in creative mode will grant
mojira:level_legacy_gamemode
andmojira:level_predicate_gamemode
but will not grantmojira:level_legacy_no_gamemode
andmojira:level_predicate_no_gamemode
.Riding on a minecart for ten blocks while in creative mode will grant
mojira:stats_legacy_gamemode
andmojira:stats_predicate_gamemode
but will not grantmojira:stats_legacy_no_gamemode
andmojira:stats_predicate_no_gamemode
.Unlocking the acacia pressure plate recipe while in creative mode will grant
mojira:recipe_legacy_gamemode
andmojira:recipe_predicate_gamemode
but will not grantmojira:recipe_legacy_no_gamemode
andmojira:recipe_predicate_no_gamemode
.
Attachments
Comments 0
No comments.