/recipe command doesn't work properly when executed from advancement reward function
I used recipe and advancement to add new item:
(RECIPE) recipe.json:
{
"type": "crafting_shaped",
"pattern": [
"###",
"###",
"###"
],
"key": {
"#": {
"item": "knowledge_book"
}
},
"result": {
"item": "command_block"
},
"show_notification":"false"
}
(ADVANCEMENT) used_book.json:
{
"criteria": {
"requirement": {
"trigger": "recipe_unlocked",
"conditions": {
"recipe": "recipe"
}
}
},
"rewards": {
"function": "used_book"
}
}
(FUNCTION) used_book.mcfunction:
# Take all recipes. Now you can easily find broken recipe recipe take @s * advancement revoke @s only used_book advancement revoke @s from recipes/root
After using Knowledge Book Recipe is still in the recipe book.
After re-joining world recipe is no more in the recipe book
It also breaks all recipes after next steps
1. Enter command: /recipe give @s *
2. Use book
3. Open recipe book(recipes still here)
4. Re-join
5. Recipes are no more in the book(Only Crafting Table is still here, but it's not issue)
(FUNCTION) give_book.mcfunction
give @s knowledge_book{Recipes:["recipe"]}
Created Issue:
/recipe command works wrong when executed from advancement reward function
I used recipe with advancement for adding new item:
(RECIPE) recipe.json:
{ "type": "crafting_shaped", "pattern": [ "###", "###", "###" ], "key": { "#": { "item": "knowledge_book" } }, "result": { "item": "command_block" }, "show_notification":"false" }(ADVANCEMENT) used_book.json:
{ "criteria": { "requirement": { "trigger": "recipe_unlocked", "conditions": { "recipe": "recipe" } } }, "rewards": { "function": "used_book" } }(FUNCTION) used_book.mcfunction:
# Take all recipes. Now you can easily find broken recipe recipe take @s * advancement revoke @s only used_book advancement revoke @s from recipes/rootRecipe still in the recipe book.
After re-joinig world recipe is no more in the recipe bookIt also breaks all recipes after next steps
1. Enter command: "/recipe give @s *"
2. Use book
3. Open recipe book(recipes still here)
4. Re-join
5. Recipes are no more in the book(Only Crafting table still here, but it's not issue)(FUNCTION) give_book.mcfunction
give @s knowledge_book{Recipes:["recipe"]}
I used recipe with advancement for adding new item:
(RECIPE) recipe.json:
{ "type": "crafting_shaped", "pattern": [ "###", "###", "###" ], "key": { "#": { "item": "knowledge_book" } }, "result": { "item": "command_block" }, "show_notification":"false" }(ADVANCEMENT) used_book.json:
{ "criteria": { "requirement": { "trigger": "recipe_unlocked", "conditions": { "recipe": "recipe" } } }, "rewards": { "function": "used_book" } }(FUNCTION) used_book.mcfunction:
# Take all recipes. Now you can easily find broken recipe recipe take @s * advancement revoke @s only used_book advancement revoke @s from recipes/rootAfter using Knowledge Book Recipe is still in the recipe book.
After re-joinig world recipe is no more in the recipe bookIt also breaks all recipes after next steps
1. Enter command: "/recipe give @s *"
2. Use book
3. Open recipe book(recipes still here)
4. Re-join
5. Recipes are no more in the book(Only Crafting table still here, but it's not issue)(FUNCTION) give_book.mcfunction
give @s knowledge_book{Recipes:["recipe"]}
I used recipe with advancement for adding new item:
(RECIPE) recipe.json:
{ "type": "crafting_shaped", "pattern": [ "###", "###", "###" ], "key": { "#": { "item": "knowledge_book" } }, "result": { "item": "command_block" }, "show_notification":"false" }(ADVANCEMENT) used_book.json:
{ "criteria": { "requirement": { "trigger": "recipe_unlocked", "conditions": { "recipe": "recipe" } } }, "rewards": { "function": "used_book" } }(FUNCTION) used_book.mcfunction:
# Take all recipes. Now you can easily find broken recipe recipe take @s * advancement revoke @s only used_book advancement revoke @s from recipes/rootAfter using Knowledge Book Recipe is still in the recipe book.
After re-joinig world recipe is no more in the recipe bookIt also breaks all recipes after next steps
1. Enter command:"/recipe give @s *"
2. Use book
3. Open recipe book(recipes still here)
4. Re-join
5. Recipes are no more in the book(Only Craftingtable still here, but it's not issue)(FUNCTION) give_book.mcfunction
give @s knowledge_book{Recipes:["recipe"]}
I used recipe with advancement for adding new item:
(RECIPE) recipe.json:
{ "type": "crafting_shaped", "pattern": [ "###", "###", "###" ], "key": { "#": { "item": "knowledge_book" } }, "result": { "item": "command_block" }, "show_notification":"false" }(ADVANCEMENT) used_book.json:
{ "criteria": { "requirement": { "trigger": "recipe_unlocked", "conditions": { "recipe": "recipe" } } }, "rewards": { "function": "used_book" } }(FUNCTION) used_book.mcfunction:
# Take all recipes. Now you can easily find broken recipe recipe take @s * advancement revoke @s only used_book advancement revoke @s from recipes/rootAfter using Knowledge Book Recipe is still in the recipe book.
After re-joinig world recipe is no more in the recipe bookIt also breaks all recipes after next steps
1. Enter command: /recipe give @s *
2. Use book
3. Open recipe book(recipes still here)
4. Re-join
5. Recipes are no more in the book(Only Crafting Table is still here, but it's not issue)(FUNCTION) give_book.mcfunction
give @s knowledge_book{Recipes:["recipe"]}
I used recipe
withadvancementforaddingnew item:(RECIPE) recipe.json:
{ "type": "crafting_shaped", "pattern": [ "###", "###", "###" ], "key": { "#": { "item": "knowledge_book" } }, "result": { "item": "command_block" }, "show_notification":"false" }(ADVANCEMENT) used_book.json:
{ "criteria": { "requirement": { "trigger": "recipe_unlocked", "conditions": { "recipe": "recipe" } } }, "rewards": { "function": "used_book" } }(FUNCTION) used_book.mcfunction:
# Take all recipes. Now you can easily find broken recipe recipe take @s * advancement revoke @s only used_book advancement revoke @s from recipes/rootAfter using Knowledge Book Recipe is still in the recipe book.
After re-joinig world recipe is no more in the recipe bookIt also breaks all recipes after next steps
1. Enter command: /recipe give @s *
2. Use book
3. Open recipe book(recipes still here)
4. Re-join
5. Recipes are no more in the book(Only Crafting Table is still here, but it's not issue)(FUNCTION) give_book.mcfunction
give @s knowledge_book{Recipes:["recipe"]}
I used recipe and advancement to add new item:
(RECIPE) recipe.json:
{ "type": "crafting_shaped", "pattern": [ "###", "###", "###" ], "key": { "#": { "item": "knowledge_book" } }, "result": { "item": "command_block" }, "show_notification":"false" }(ADVANCEMENT) used_book.json:
{ "criteria": { "requirement": { "trigger": "recipe_unlocked", "conditions": { "recipe": "recipe" } } }, "rewards": { "function": "used_book" } }(FUNCTION) used_book.mcfunction:
# Take all recipes. Now you can easily find broken recipe recipe take @s * advancement revoke @s only used_book advancement revoke @s from recipes/rootAfter using Knowledge Book Recipe is still in the recipe book.
After re-joining world recipe is no more in the recipe bookIt also breaks all recipes after next steps
1. Enter command: /recipe give @s *
2. Use book
3. Open recipe book(recipes still here)
4. Re-join
5. Recipes are no more in the book(Only Crafting Table is still here, but it's not issue)(FUNCTION) give_book.mcfunction
give @s knowledge_book{Recipes:["recipe"]}
/recipe commandworks wrongwhen executed from advancement reward function/recipe command doesn't work properly when executed from advancement reward function
I used recipe and advancement to add new item:
(RECIPE) recipe.json:
{ "type": "crafting_shaped", "pattern": [ "###", "###", "###" ], "key": { "#": { "item": "knowledge_book" } }, "result": { "item": "command_block" }, "show_notification":"false" }(ADVANCEMENT) used_book.json:
{ "criteria": { "requirement": { "trigger": "recipe_unlocked", "conditions": { "recipe": "recipe" } } }, "rewards": { "function": "used_book" } }(FUNCTION) used_book.mcfunction:
# Take all recipes. Now you can easily find broken recipe recipe take @s * advancement revoke @s only used_book advancement revoke @s from recipes/rootAfter using Knowledge Book Recipe is still in the recipe book.
After re-joining world recipe is no more in the recipe bookIt also breaks all recipes after next steps
1. Enter command: /recipe give @s *
2. Use book
3. Open recipe book(recipes still here)
4. Re-join
5. Recipes are no more in the book(Only Crafting Table is still here, but it's not issue)(FUNCTION) give_book.mcfunction
give @s knowledge_book{Recipes:["recipe"]}

Confirmed in 1.21
Confirmed in 1.21.1