diff options
| -rw-r--r-- | build.gradle | 2 | ||||
| -rw-r--r-- | gradle.properties | 4 | ||||
| -rw-r--r-- | src/main/java/lv/enes/mc/eris_alchemy/CovalenceRepair.java | 7 |
3 files changed, 11 insertions, 2 deletions
diff --git a/build.gradle b/build.gradle index 29c2585..2c618b9 100644 --- a/build.gradle +++ b/build.gradle | |||
| @@ -39,6 +39,8 @@ dependencies { | |||
| 39 | modImplementation("vazkii.patchouli:Patchouli:${patchouli_version}") { | 39 | modImplementation("vazkii.patchouli:Patchouli:${patchouli_version}") { |
| 40 | exclude group: "net.fabricmc", module: "fabric-loader" | 40 | exclude group: "net.fabricmc", module: "fabric-loader" |
| 41 | } | 41 | } |
| 42 | |||
| 43 | compileOnly "jakarta.annotation:jakarta.annotation-api:${jakarta_annotation_version}" | ||
| 42 | } | 44 | } |
| 43 | 45 | ||
| 44 | processResources { | 46 | processResources { |
diff --git a/gradle.properties b/gradle.properties index a78fc4a..6dc6f57 100644 --- a/gradle.properties +++ b/gradle.properties | |||
| @@ -9,4 +9,6 @@ quilt_mappings = 23 | |||
| 9 | loader_version = 0.23.0 | 9 | loader_version = 0.23.0 |
| 10 | quilted_fabric_api_version = 7.4.0+0.90.0 | 10 | quilted_fabric_api_version = 7.4.0+0.90.0 |
| 11 | 11 | ||
| 12 | patchouli_version = 1.20.1-84-FABRIC \ No newline at end of file | 12 | patchouli_version = 1.20.1-84-FABRIC |
| 13 | |||
| 14 | jakarta_annotation_version = 2.1.1 \ No newline at end of file | ||
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 | ||