summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2024-01-05 22:25:44 +0100
committerGravatar Uko Kokņevičs2024-01-05 22:25:44 +0100
commit345035887fa01e804b2829a87358bca661221185 (patch)
tree9d8542bd73b33fb1421c5e0d5cf81960e1defe4a /src
parentCleanup imports (diff)
downloadmc-eris-alchemy-345035887fa01e804b2829a87358bca661221185.tar.gz
mc-eris-alchemy-345035887fa01e804b2829a87358bca661221185.tar.xz
mc-eris-alchemy-345035887fa01e804b2829a87358bca661221185.zip
Add jakarta NonNull annotations
Diffstat (limited to 'src')
-rw-r--r--src/main/java/lv/enes/mc/eris_alchemy/CovalenceRepair.java7
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;
4import com.google.gson.JsonElement; 4import com.google.gson.JsonElement;
5import com.google.gson.JsonObject; 5import com.google.gson.JsonObject;
6import com.google.gson.JsonSyntaxException; 6import com.google.gson.JsonSyntaxException;
7import jakarta.annotation.Nonnull;
7import net.minecraft.core.RegistryAccess; 8import net.minecraft.core.RegistryAccess;
8import net.minecraft.network.FriendlyByteBuf; 9import net.minecraft.network.FriendlyByteBuf;
9import net.minecraft.resources.ResourceLocation; 10import 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