diff options
Diffstat (limited to 'src/main/java/lv/enes/mc/eris_alchemy/recipe/CovalenceRepair.java')
| -rw-r--r-- | src/main/java/lv/enes/mc/eris_alchemy/recipe/CovalenceRepair.java | 15 |
1 files changed, 10 insertions, 5 deletions
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; | |||
| 5 | import com.google.gson.JsonObject; | 5 | import com.google.gson.JsonObject; |
| 6 | import com.google.gson.JsonSyntaxException; | 6 | import com.google.gson.JsonSyntaxException; |
| 7 | import jakarta.annotation.Nonnull; | 7 | import jakarta.annotation.Nonnull; |
| 8 | import lv.enes.mc.eris_alchemy.ErisAlchemyRegistry; | ||
| 8 | import net.minecraft.core.RegistryAccess; | 9 | import net.minecraft.core.RegistryAccess; |
| 9 | import net.minecraft.network.FriendlyByteBuf; | 10 | import net.minecraft.network.FriendlyByteBuf; |
| 10 | import net.minecraft.resources.ResourceLocation; | 11 | import net.minecraft.resources.ResourceLocation; |
| @@ -21,7 +22,7 @@ import java.util.ArrayList; | |||
| 21 | import java.util.Arrays; | 22 | import java.util.Arrays; |
| 22 | 23 | ||
| 23 | public class CovalenceRepair extends CustomRecipe { | 24 | public class CovalenceRepair extends CustomRecipe { |
| 24 | static class Serializer implements QuiltRecipeSerializer<CovalenceRepair> { | 25 | public static class Serializer implements QuiltRecipeSerializer<CovalenceRepair> { |
| 25 | private static class Json { | 26 | private static class Json { |
| 26 | CraftingBookCategory category = CraftingBookCategory.MISC; | 27 | CraftingBookCategory category = CraftingBookCategory.MISC; |
| 27 | JsonElement dust; | 28 | JsonElement dust; |
| @@ -29,8 +30,6 @@ public class CovalenceRepair extends CustomRecipe { | |||
| 29 | JsonElement tools = new JsonObject(); | 30 | JsonElement tools = new JsonObject(); |
| 30 | } | 31 | } |
| 31 | 32 | ||
| 32 | Serializer() {} | ||
| 33 | |||
| 34 | @Override | 33 | @Override |
| 35 | public JsonObject toJson(CovalenceRepair recipe) { | 34 | public JsonObject toJson(CovalenceRepair recipe) { |
| 36 | var res = new JsonObject(); | 35 | var res = new JsonObject(); |
| @@ -86,7 +85,13 @@ public class CovalenceRepair extends CustomRecipe { | |||
| 86 | /** What tools can this dust repair. */ | 85 | /** What tools can this dust repair. */ |
| 87 | private final Ingredient tools; | 86 | private final Ingredient tools; |
| 88 | 87 | ||
| 89 | public CovalenceRepair(ResourceLocation id, CraftingBookCategory category, Ingredient dust, Ingredient materials, Ingredient tools) { | 88 | public CovalenceRepair( |
| 89 | ResourceLocation id, | ||
| 90 | CraftingBookCategory category, | ||
| 91 | Ingredient dust, | ||
| 92 | Ingredient materials, | ||
| 93 | Ingredient tools | ||
| 94 | ) { | ||
| 90 | super(id, category); | 95 | super(id, category); |
| 91 | 96 | ||
| 92 | this.dust = dust; | 97 | this.dust = dust; |
| @@ -121,7 +126,7 @@ public class CovalenceRepair extends CustomRecipe { | |||
| 121 | @Nonnull | 126 | @Nonnull |
| 122 | @Override | 127 | @Override |
| 123 | public RecipeSerializer<CovalenceRepair> getSerializer() { | 128 | public RecipeSerializer<CovalenceRepair> getSerializer() { |
| 124 | return ErisAlchemyRecipeSerializers.COVALENCE_REPAIR; | 129 | return ErisAlchemyRegistry.RecipeSerializers.COVALENCE_REPAIR; |
| 125 | } | 130 | } |
| 126 | 131 | ||
| 127 | private boolean isTool(ItemStack stack) { | 132 | private boolean isTool(ItemStack stack) { |