Data generator can incorrectly override recipe IDs
Juuxel opened this issue ยท 3 comments
FabricRecipeProvider.getRecipeIdentifier
replaces the namespace of the recipe with the mod id of the data generator:
This can easily lead to invalid recipe advancements where the advancement's default has_the_recipe
criterion still references the original namespace.
I think the proper fix is to remove getRecipeIndentifier
entirely, and inject into offerTo(Consumer, String)
to make it use the modid of the current running FabricRecipeProvider
instead of minecraft
(accessed via ThreadLocal
).
Since this is a breaking change (but necessary due to an unfixable oversight in the API, imo), we should only do this in 1.20. The behavior will remain broken in older versions.
@FabricMC/fabric-triage thoughts?
The current implementation allows you to overwrite vanilla recipes, which is a common request. With the removal of FabricRecipeProvider::getRecipeIdentifier
this will no longer be possible