diff --git a/common/src/main/java/net/blay09/mods/balm/api/recipe/BalmRecipes.java b/common/src/main/java/net/blay09/mods/balm/api/recipe/BalmRecipes.java index 3ea0ae30..3e579310 100644 --- a/common/src/main/java/net/blay09/mods/balm/api/recipe/BalmRecipes.java +++ b/common/src/main/java/net/blay09/mods/balm/api/recipe/BalmRecipes.java @@ -7,11 +7,16 @@ import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.item.crafting.display.RecipeDisplay; +import net.minecraft.world.item.crafting.display.SlotDisplay; import java.util.function.Supplier; public interface BalmRecipes { > DeferredObject> registerRecipeType(Supplier> typeSupplier, Supplier> serializerSupplier, ResourceLocation identifier); + > DeferredObject registerRecipeDisplayType(Supplier supplier, ResourceLocation identifier); + + > DeferredObject registerSlotDisplayType(Supplier supplier, ResourceLocation identifier); + DeferredObject registerRecipeBookCategory(Supplier supplier, ResourceLocation identifier); } diff --git a/fabric/src/main/java/net/blay09/mods/balm/fabric/recipe/FabricBalmRecipes.java b/fabric/src/main/java/net/blay09/mods/balm/fabric/recipe/FabricBalmRecipes.java index f341d6f6..c4038062 100644 --- a/fabric/src/main/java/net/blay09/mods/balm/fabric/recipe/FabricBalmRecipes.java +++ b/fabric/src/main/java/net/blay09/mods/balm/fabric/recipe/FabricBalmRecipes.java @@ -10,6 +10,7 @@ import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.item.crafting.display.RecipeDisplay; +import net.minecraft.world.item.crafting.display.SlotDisplay; import java.util.function.Supplier; @@ -27,11 +28,17 @@ public > DeferredObject> registerRecipeType(Su @Override public DeferredObject registerRecipeBookCategory(Supplier supplier, ResourceLocation identifier) { - return new DeferredObject<>(identifier, () -> Registry.register(BuiltInRegistries.RECIPE_BOOK_CATEGORY, identifier, supplier.get())).resolveImmediately(); + return new DeferredObject<>(identifier, + () -> Registry.register(BuiltInRegistries.RECIPE_BOOK_CATEGORY, identifier, supplier.get())).resolveImmediately(); } @Override public > DeferredObject registerRecipeDisplayType(Supplier supplier, ResourceLocation identifier) { return new DeferredObject<>(identifier, () -> Registry.register(BuiltInRegistries.RECIPE_DISPLAY, identifier, supplier.get())).resolveImmediately(); } + + @Override + public > DeferredObject registerSlotDisplayType(Supplier supplier, ResourceLocation identifier) { + return new DeferredObject<>(identifier, () -> Registry.register(BuiltInRegistries.SLOT_DISPLAY, identifier, supplier.get())).resolveImmediately(); + } }