mojira.dev
MC-115819

Cannot re-obtain a taken recipe by receiving the item

The bug

When you get a recipe either by crafting or obtaining an item, and then remove the recipe using /recipe take, the recipe will no longer be learned if you obtain the item without crafting, To re-obtain the recipe, you have to craft it.

How to reproduce

  1. Create a new world (obtaining recipe by receiving the item only works once)

  2. /give @p planks

  3. /give @p log
    (used to prevent more recipes from obtaining later)

  4. /clear @p planks

  5. /clear @p log

  6. /recipe take @p *

  7. /give @p planks
    → You do not get a recipe notification

  8. /give @p log

  9. Craft a plank
    → The recipe is now given

Linked issues

Comments 6

Can confirm (17w15a)

Probably because the advancement that looks for wood in your inventory has already been achieved and the reward given.

Would it make more sense for the advancement to reward you every time you fulfill it? Perhaps, but then you'd get spammed with other potential rewards too. A "re-earnable" flag for advancements might help remedy this.

Can someone explain why this is WAI? To me it clearly sounds like a bug, not a design choice.

Surely revoking a recipe should have the same result as having never earned the recipe?

Because there are recipes and advancements that unlock recipes.

  1. /recipe only affects recipes themselves, not advancements that unlocked them (you have another command for it, /advancement)

  2. If you already got an advancement, you can't get it again, unless you revoke it

  3. Giving a recipe grants you according advancement because advancement files for recipes were written that way

So, when you take a recipe, you don't reset it (1), only remove it from the list of things you can craft via recipe book; because you already earned that recipe, you can't earn it again (2); and if you already have a recipe, then it was already earned (3) (so, you don't have other options)

Is there a work around using /advancemt? Something like

/advancement revoke @s only minecraft:recipes/*

or

/advancement revoke @s under minecraft:recipes

Or maybe, since /recipe grants recipe advancements when giving recipes, it should also revoke them when taking recipes?

Since the 1.12-pre5 you can use

/advancement revoke @s from minecraft:recipes/root

onnowhere

(Unassigned)

Confirmed

/recipe, crafting, item, recipe, recipe-book

Minecraft 17w15a, Minecraft 17w16a

Retrieved