From 982f0bbbd7564b6f292a0890dd862149d9f710a9 Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Wed, 10 Jan 2024 00:26:04 +0100 Subject: Some refactoring --- .../lv/enes/mc/eris_alchemy/recipe/CovalenceRepair.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/main/java/lv/enes/mc/eris_alchemy/recipe/CovalenceRepair.java') diff --git a/src/main/java/lv/enes/mc/eris_alchemy/recipe/CovalenceRepair.java b/src/main/java/lv/enes/mc/eris_alchemy/recipe/CovalenceRepair.java index dca464a..7fbdc17 100644 --- a/src/main/java/lv/enes/mc/eris_alchemy/recipe/CovalenceRepair.java +++ b/src/main/java/lv/enes/mc/eris_alchemy/recipe/CovalenceRepair.java @@ -5,6 +5,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonSyntaxException; import jakarta.annotation.Nonnull; +import lv.enes.mc.eris_alchemy.ErisAlchemyRegistry; import net.minecraft.core.RegistryAccess; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; @@ -21,7 +22,7 @@ import java.util.ArrayList; import java.util.Arrays; public class CovalenceRepair extends CustomRecipe { - static class Serializer implements QuiltRecipeSerializer { + public static class Serializer implements QuiltRecipeSerializer { private static class Json { CraftingBookCategory category = CraftingBookCategory.MISC; JsonElement dust; @@ -29,8 +30,6 @@ public class CovalenceRepair extends CustomRecipe { JsonElement tools = new JsonObject(); } - Serializer() {} - @Override public JsonObject toJson(CovalenceRepair recipe) { var res = new JsonObject(); @@ -86,7 +85,13 @@ public class CovalenceRepair extends CustomRecipe { /** What tools can this dust repair. */ private final Ingredient tools; - public CovalenceRepair(ResourceLocation id, CraftingBookCategory category, Ingredient dust, Ingredient materials, Ingredient tools) { + public CovalenceRepair( + ResourceLocation id, + CraftingBookCategory category, + Ingredient dust, + Ingredient materials, + Ingredient tools + ) { super(id, category); this.dust = dust; @@ -121,7 +126,7 @@ public class CovalenceRepair extends CustomRecipe { @Nonnull @Override public RecipeSerializer getSerializer() { - return ErisAlchemyRecipeSerializers.COVALENCE_REPAIR; + return ErisAlchemyRegistry.RecipeSerializers.COVALENCE_REPAIR; } private boolean isTool(ItemStack stack) { -- cgit v1.2.3