When attempting to replace vanilla recipes, by putting recipes in data/minecraft/recipes/..., it simply doesn't work, unlike loot tables, or advancements, which replace their counterparts when placed in that section. Instead, the recipe is marked as "A duplicate", and it crashes out your game when attempting to load the world with the pack installed.
Encountered an unexpected exception
java.lang.IllegalStateException: Duplicate recipe ignored with ID minecraft:sugar
at aoe.a(SourceFile:70)
at aoe.a(SourceFile:52)
at sd.c(SourceFile:132)
at sd.a(SourceFile:115)
at net.minecraft.server.MinecraftServer.a(SourceFile:1301)
at net.minecraft.server.MinecraftServer.a(SourceFile:330)
at ckz.a(SourceFile:81)
at ckz.d(SourceFile:128)
at net.minecraft.server.MinecraftServer.run(SourceFile:463)
at java.lang.Thread.run(Thread.java:745)
However, when you add in the recipe when you're already in the game, it works fully.
An example data pack is attached, which attempts to replace the sugar cane -> sugar recipe with a diamond -> sugar recipe. (dinnerboneNeedsToAddScoreboardRandomization.zip)
If you load the data pack while already in the world, the recipe works, with an odd error. It'll work, but if you click the recipe in the recipe book, without the diamonds, it shows that you need sugar cane to craft it, while you just replaced the recipe with diamonds.
If you add it in outside the world, the game will crash, but not close.
Possible solutions:
> Only mark recipes that are exact duplicates of the recipe as duplicates.
> Don't trash duplicates, instead, only recognize them if they're in the same "group" as the original recipe, not unlike the iron nuggets -> ingot, and iron blocks -> ingot recipes.
> Simply send an error, and don't load the recipe, instead of freeze-crashing the game.
Linked issues
is duplicated by 1
Attachments
Comments 4
@tryashtar Is that right? That seems rather odd, and probably something they should fix. I really hate it when they don't allow us to customize things, or we can't because of bugs/complexity. Like villager trade tables. Ugh.
Yeah, definitely! Not saying it's intended, but just describing a more "root cause" of the issue someone on a discord server found. Thanks for reporting this.
Apparently, custom recipes fail to load if any data pack exists with a
minecraft
namespace included.