diff options
Diffstat (limited to 'src/main/java/lv/enes/mc/eris_alchemy/CovalenceRepair.java')
| -rw-r--r-- | src/main/java/lv/enes/mc/eris_alchemy/CovalenceRepair.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/lv/enes/mc/eris_alchemy/CovalenceRepair.java b/src/main/java/lv/enes/mc/eris_alchemy/CovalenceRepair.java index 2e9da77..f094342 100644 --- a/src/main/java/lv/enes/mc/eris_alchemy/CovalenceRepair.java +++ b/src/main/java/lv/enes/mc/eris_alchemy/CovalenceRepair.java | |||
| @@ -4,6 +4,7 @@ import com.google.gson.Gson; | |||
| 4 | import com.google.gson.JsonElement; | 4 | 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 net.minecraft.core.RegistryAccess; | 8 | import net.minecraft.core.RegistryAccess; |
| 8 | import net.minecraft.network.FriendlyByteBuf; | 9 | import net.minecraft.network.FriendlyByteBuf; |
| 9 | import net.minecraft.resources.ResourceLocation; | 10 | import net.minecraft.resources.ResourceLocation; |
| @@ -43,6 +44,7 @@ public class CovalenceRepair extends CustomRecipe { | |||
| 43 | return res; | 44 | return res; |
| 44 | } | 45 | } |
| 45 | 46 | ||
| 47 | @Nonnull | ||
| 46 | @Override | 48 | @Override |
| 47 | public CovalenceRepair fromJson(ResourceLocation id, JsonObject json) { | 49 | public CovalenceRepair fromJson(ResourceLocation id, JsonObject json) { |
| 48 | var recipeJson = new Gson().fromJson(json, Json.class); | 50 | var recipeJson = new Gson().fromJson(json, Json.class); |
| @@ -65,6 +67,7 @@ public class CovalenceRepair extends CustomRecipe { | |||
| 65 | recipe.tools.toNetwork(buf); | 67 | recipe.tools.toNetwork(buf); |
| 66 | } | 68 | } |
| 67 | 69 | ||
| 70 | @Nonnull | ||
| 68 | @Override | 71 | @Override |
| 69 | public CovalenceRepair fromNetwork(ResourceLocation id, FriendlyByteBuf buf) { | 72 | public CovalenceRepair fromNetwork(ResourceLocation id, FriendlyByteBuf buf) { |
| 70 | var category = buf.readEnum(CraftingBookCategory.class); | 73 | var category = buf.readEnum(CraftingBookCategory.class); |
| @@ -104,6 +107,7 @@ public class CovalenceRepair extends CustomRecipe { | |||
| 104 | return getInputs(inventory) != null; | 107 | return getInputs(inventory) != null; |
| 105 | } | 108 | } |
| 106 | 109 | ||
| 110 | @Nonnull | ||
| 107 | @Override | 111 | @Override |
| 108 | public ItemStack assemble(CraftingContainer inventory, RegistryAccess registryManager) { | 112 | public ItemStack assemble(CraftingContainer inventory, RegistryAccess registryManager) { |
| 109 | var inputs = getInputs(inventory); | 113 | var inputs = getInputs(inventory); |
| @@ -117,8 +121,9 @@ public class CovalenceRepair extends CustomRecipe { | |||
| 117 | return newToolStack; | 121 | return newToolStack; |
| 118 | } | 122 | } |
| 119 | 123 | ||
| 124 | @Nonnull | ||
| 120 | @Override | 125 | @Override |
| 121 | public RecipeSerializer<?> getSerializer() { | 126 | public RecipeSerializer<CovalenceRepair> getSerializer() { |
| 122 | return Serializer.INSTANCE; | 127 | return Serializer.INSTANCE; |
| 123 | } | 128 | } |
| 124 | 129 | ||