loot_table condition for player_generates_container_loot trigger is not optional
The bug
The loot_table condition used by the player_generates_container_loot advancement trigger is required and non optional. This is inconsistent with other advancement conditions, which are all optional. It also means that you cannot detect when the player generates any loot.
How to reproduce
- Create the following advancement in a data pack
{ "criteria": { "requirement": { "trigger": "minecraft:player_generates_container_loot" } } } - Reload the game
The advancement did not load and there is an error in the log
Parsing error loading custom advancement test:gen_loot: Missing loot_table, expected to find a string
Linked Issues
Created Issue:
loot_table condition for player_generates_container_loot trigger is not optional
The bug
The loot_table condition used by the player_generates_container_loot advancement trigger is required and non optional. This is inconsistent with other advancement conditions, which are all optional. It also means that you cannot detect when the player generates any loot.
How to reproduce
- Create the following advancement in a data pack
{ "criteria": { "requirement": { "trigger": "minecraft:player_generates_container_loot" } } }- Reload the game
The advancement did not load and there is an error in the log
Parsing error loading custom advancement test:gen_loot: Missing loot_table, expected to find a string
relates to
The recipe condition for the recipe_unlocked advancement trigger is required, not optional.
How to reproduce:
- In the launcher, go to the settings and enable "Open output log when Minecraft: Java Edition starts."
- Launch a modern enough version of Minecraft.
- Go to the world creation menu.
- Add the attached datapack to the world.
- Create the world and look at the log. You will find the error message "Parsing error loading custom advancement manossef:recipe_unlocked: Missing recipe, expected to find a string."
What I expected to happen was:
I could make an advancement that triggers when I get any recipe at all.
What actually happened was:
The recipe condition is required, so the game threw an error in the log when I tried to do that.
Relates to MC-186503.
The recipe_id condition for the recipe_crafted advancement trigger is required, not optional.
How to reproduce:
- In the launcher, go to the settings and enable "Open output log when Minecraft: Java Edition starts."
- Launch 23w16a or newer.
- Go to the world creation menu.
- Add the attached datapack to the world.
- Create the world and look at the log. You will find the error message "Parsing error loading custom advancement manossef:recipe_crafted: Missing recipe_id, expected to find a string."
What I expected to happen was:
I could make an advancement that triggers when I craft any recipe at all.
What actually happened was:
The recipe_id condition is required, so the game threw an error in the log when I tried to do that.
Not sure if it's intended though, as the recipe property for the recipe_unlocked trigger is also required.
Confirmed in 1.16 Pre-release 2.
Confirmed in 1.16 Pre-release 4.
Affects 1.18.1
Can confirm in 23w16a.
Can confirm in 1.20-pre2.
Can confirm in 1.20.
Can confirm in 1.20.1.
Can confirm in 23w32a.