Recipes
Adding a custom recipe to RecipeLoader
RecipeLoader.registerHandler("myplugin:custom", data -> {
MyCustomRecipe r = MyCustomRecipe.getCodec.decode(YamlOps.INSTANCE, data);
if (r != null) MyCustomRegistry.register(r.getId().toString(), r);
});
The above code assumes you have extended CustomRecipe or have a getId() and getCodec() method.
03 October 2025