diff --git a/src/main/java/mekanism/common/recipe/serializer/ChemicalChemicalToChemicalRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/ChemicalChemicalToChemicalRecipeSerializer.java index 898419b1c9c..39c8b1fcdfe 100644 --- a/src/main/java/mekanism/common/recipe/serializer/ChemicalChemicalToChemicalRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/ChemicalChemicalToChemicalRecipeSerializer.java @@ -45,16 +45,16 @@ public RECIPE fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject j if (output.isEmpty()) { throw new JsonSyntaxException("Recipe output must not be empty."); } - return this.factory.create(recipeId, leftInput, rightInput, output); + return this.factory.create(leftInput, rightInput, output); } @Override - public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyByteBuf buffer) { + public RECIPE fromNetwork(@NotNull FriendlyByteBuf buffer) { try { INGREDIENT leftInput = getDeserializer().read(buffer); INGREDIENT rightInput = getDeserializer().read(buffer); STACK output = fromBuffer(buffer); - return this.factory.create(recipeId, leftInput, rightInput, output); + return this.factory.create(leftInput, rightInput, output); } catch (Exception e) { Mekanism.logger.error("Error reading chemical chemical to chemical recipe from packet.", e); throw e; @@ -75,6 +75,6 @@ public void toNetwork(@NotNull FriendlyByteBuf buffer, @NotNull RECIPE recipe) { public interface IFactory, STACK extends ChemicalStack, INGREDIENT extends ChemicalStackIngredient, RECIPE extends ChemicalChemicalToChemicalRecipe> { - RECIPE create(ResourceLocation id, INGREDIENT leftInput, INGREDIENT rightInput, STACK output); + RECIPE create(INGREDIENT leftInput, INGREDIENT rightInput, STACK output); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/recipe/serializer/ChemicalCrystallizerRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/ChemicalCrystallizerRecipeSerializer.java index 8a049f46e88..f3cefc0c74c 100644 --- a/src/main/java/mekanism/common/recipe/serializer/ChemicalCrystallizerRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/ChemicalCrystallizerRecipeSerializer.java @@ -40,12 +40,12 @@ public RECIPE fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject j } @Override - public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyByteBuf buffer) { + public RECIPE fromNetwork(@NotNull FriendlyByteBuf buffer) { try { ChemicalType chemicalType = buffer.readEnum(ChemicalType.class); ChemicalStackIngredient inputIngredient = IngredientCreatorAccess.getCreatorForType(chemicalType).read(buffer); ItemStack output = buffer.readItem(); - return this.factory.create(recipeId, inputIngredient, output); + return this.factory.create(inputIngredient, output); } catch (Exception e) { Mekanism.logger.error("Error reading boxed chemical to itemstack recipe from packet.", e); throw e; @@ -65,6 +65,6 @@ public void toNetwork(@NotNull FriendlyByteBuf buffer, @NotNull RECIPE recipe) { @FunctionalInterface public interface IFactory { - RECIPE create(ResourceLocation id, ChemicalStackIngredient input, ItemStack output); + RECIPE create(ChemicalStackIngredient input, ItemStack output); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/recipe/serializer/ChemicalDissolutionRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/ChemicalDissolutionRecipeSerializer.java index ff4d62742dd..66ffa64cd40 100644 --- a/src/main/java/mekanism/common/recipe/serializer/ChemicalDissolutionRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/ChemicalDissolutionRecipeSerializer.java @@ -47,7 +47,7 @@ public RECIPE fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject j } @Override - public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyByteBuf buffer) { + public RECIPE fromNetwork(@NotNull FriendlyByteBuf buffer) { try { ItemStackIngredient itemInput = IngredientCreatorAccess.item().read(buffer); GasStackIngredient gasInput = IngredientCreatorAccess.gas().read(buffer); @@ -58,7 +58,7 @@ public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyB case PIGMENT -> PigmentStack.readFromPacket(buffer); case SLURRY -> SlurryStack.readFromPacket(buffer); }; - return this.factory.create(recipeId, itemInput, gasInput, output); + return this.factory.create(itemInput, gasInput, output); } catch (Exception e) { Mekanism.logger.error("Error reading itemstack gas to gas recipe from packet.", e); throw e; @@ -78,6 +78,6 @@ public void toNetwork(@NotNull FriendlyByteBuf buffer, @NotNull RECIPE recipe) { @FunctionalInterface public interface IFactory { - RECIPE create(ResourceLocation id, ItemStackIngredient itemInput, GasStackIngredient gasInput, ChemicalStack output); + RECIPE create(ItemStackIngredient itemInput, GasStackIngredient gasInput, ChemicalStack output); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/recipe/serializer/CombinerRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/CombinerRecipeSerializer.java index 5f2ad312b6f..324dda8bf3f 100644 --- a/src/main/java/mekanism/common/recipe/serializer/CombinerRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/CombinerRecipeSerializer.java @@ -41,12 +41,12 @@ public RECIPE fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject j } @Override - public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyByteBuf buffer) { + public RECIPE fromNetwork(@NotNull FriendlyByteBuf buffer) { try { ItemStackIngredient mainInput = IngredientCreatorAccess.item().read(buffer); ItemStackIngredient extraInput = IngredientCreatorAccess.item().read(buffer); ItemStack output = buffer.readItem(); - return this.factory.create(recipeId, mainInput, extraInput, output); + return this.factory.create(mainInput, extraInput, output); } catch (Exception e) { Mekanism.logger.error("Error reading combiner recipe from packet.", e); throw e; @@ -66,6 +66,6 @@ public void toNetwork(@NotNull FriendlyByteBuf buffer, @NotNull RECIPE recipe) { @FunctionalInterface public interface IFactory { - RECIPE create(ResourceLocation id, ItemStackIngredient mainInput, ItemStackIngredient extraInput, ItemStack output); + RECIPE create(ItemStackIngredient mainInput, ItemStackIngredient extraInput, ItemStack output); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/recipe/serializer/ElectrolysisRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/ElectrolysisRecipeSerializer.java index c9a4f994fcf..d0639ef42ae 100644 --- a/src/main/java/mekanism/common/recipe/serializer/ElectrolysisRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/ElectrolysisRecipeSerializer.java @@ -47,13 +47,13 @@ public RECIPE fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject j } @Override - public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyByteBuf buffer) { + public RECIPE fromNetwork(@NotNull FriendlyByteBuf buffer) { try { FluidStackIngredient input = IngredientCreatorAccess.fluid().read(buffer); FloatingLong energyMultiplier = FloatingLong.readFromBuffer(buffer); GasStack leftGasOutput = GasStack.readFromPacket(buffer); GasStack rightGasOutput = GasStack.readFromPacket(buffer); - return this.factory.create(recipeId, input, energyMultiplier, leftGasOutput, rightGasOutput); + return this.factory.create(input, energyMultiplier, leftGasOutput, rightGasOutput); } catch (Exception e) { Mekanism.logger.error("Error reading electrolysis recipe from packet.", e); throw e; @@ -73,6 +73,6 @@ public void toNetwork(@NotNull FriendlyByteBuf buffer, @NotNull RECIPE recipe) { @FunctionalInterface public interface IFactory { - RECIPE create(ResourceLocation id, FluidStackIngredient input, FloatingLong energyMultiplier, GasStack leftGasOutput, GasStack rightGasOutput); + RECIPE create(FluidStackIngredient input, FloatingLong energyMultiplier, GasStack leftGasOutput, GasStack rightGasOutput); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/recipe/serializer/FluidSlurryToSlurryRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/FluidSlurryToSlurryRecipeSerializer.java index 83becd485d8..933c91fb968 100644 --- a/src/main/java/mekanism/common/recipe/serializer/FluidSlurryToSlurryRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/FluidSlurryToSlurryRecipeSerializer.java @@ -42,12 +42,12 @@ public RECIPE fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject j } @Override - public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyByteBuf buffer) { + public RECIPE fromNetwork(@NotNull FriendlyByteBuf buffer) { try { FluidStackIngredient fluidInput = IngredientCreatorAccess.fluid().read(buffer); SlurryStackIngredient slurryInput = IngredientCreatorAccess.slurry().read(buffer); SlurryStack output = SlurryStack.readFromPacket(buffer); - return this.factory.create(recipeId, fluidInput, slurryInput, output); + return this.factory.create(fluidInput, slurryInput, output); } catch (Exception e) { Mekanism.logger.error("Error reading fluid slurry to slurry recipe from packet.", e); throw e; @@ -67,6 +67,6 @@ public void toNetwork(@NotNull FriendlyByteBuf buffer, @NotNull RECIPE recipe) { @FunctionalInterface public interface IFactory { - RECIPE create(ResourceLocation id, FluidStackIngredient fluidInput, SlurryStackIngredient slurryInput, SlurryStack output); + RECIPE create(FluidStackIngredient fluidInput, SlurryStackIngredient slurryInput, SlurryStack output); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/recipe/serializer/FluidToFluidRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/FluidToFluidRecipeSerializer.java index 5bba2ad20b3..11deff144fb 100644 --- a/src/main/java/mekanism/common/recipe/serializer/FluidToFluidRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/FluidToFluidRecipeSerializer.java @@ -38,11 +38,11 @@ public RECIPE fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject j } @Override - public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyByteBuf buffer) { + public RECIPE fromNetwork(@NotNull FriendlyByteBuf buffer) { try { FluidStackIngredient inputIngredient = IngredientCreatorAccess.fluid().read(buffer); FluidStack output = FluidStack.readFromPacket(buffer); - return this.factory.create(recipeId, inputIngredient, output); + return this.factory.create(inputIngredient, output); } catch (Exception e) { Mekanism.logger.error("Error reading fluid to fluid recipe from packet.", e); throw e; @@ -62,6 +62,6 @@ public void toNetwork(@NotNull FriendlyByteBuf buffer, @NotNull RECIPE recipe) { @FunctionalInterface public interface IFactory { - RECIPE create(ResourceLocation id, FluidStackIngredient input, FluidStack output); + RECIPE create(FluidStackIngredient input, FluidStack output); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/recipe/serializer/GasToGasRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/GasToGasRecipeSerializer.java index e15206bc23c..7b3bb2f9b23 100644 --- a/src/main/java/mekanism/common/recipe/serializer/GasToGasRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/GasToGasRecipeSerializer.java @@ -38,11 +38,11 @@ public RECIPE fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject j } @Override - public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyByteBuf buffer) { + public RECIPE fromNetwork(@NotNull FriendlyByteBuf buffer) { try { GasStackIngredient inputIngredient = IngredientCreatorAccess.gas().read(buffer); GasStack output = GasStack.readFromPacket(buffer); - return this.factory.create(recipeId, inputIngredient, output); + return this.factory.create(inputIngredient, output); } catch (Exception e) { Mekanism.logger.error("Error reading gas to gas recipe from packet.", e); throw e; @@ -62,6 +62,6 @@ public void toNetwork(@NotNull FriendlyByteBuf buffer, @NotNull RECIPE recipe) { @FunctionalInterface public interface IFactory { - RECIPE create(ResourceLocation id, GasStackIngredient input, GasStack output); + RECIPE create(GasStackIngredient input, GasStack output); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/recipe/serializer/ItemStackChemicalToItemStackRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/ItemStackChemicalToItemStackRecipeSerializer.java index d5ef250fb20..463aa28448a 100644 --- a/src/main/java/mekanism/common/recipe/serializer/ItemStackChemicalToItemStackRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/ItemStackChemicalToItemStackRecipeSerializer.java @@ -49,12 +49,12 @@ public RECIPE fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject j } @Override - public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyByteBuf buffer) { + public RECIPE fromNetwork(@NotNull FriendlyByteBuf buffer) { try { ItemStackIngredient itemInput = IngredientCreatorAccess.item().read(buffer); INGREDIENT chemicalInput = getDeserializer().read(buffer); ItemStack output = buffer.readItem(); - return this.factory.create(recipeId, itemInput, chemicalInput, output); + return this.factory.create(itemInput, chemicalInput, output); } catch (Exception e) { Mekanism.logger.error("Error reading itemstack chemical to itemstack recipe from packet.", e); throw e; @@ -75,6 +75,6 @@ public void toNetwork(@NotNull FriendlyByteBuf buffer, @NotNull RECIPE recipe) { public interface IFactory, STACK extends ChemicalStack, INGREDIENT extends ChemicalStackIngredient, RECIPE extends ItemStackChemicalToItemStackRecipe> { - RECIPE create(ResourceLocation id, ItemStackIngredient itemInput, INGREDIENT chemicalInput, ItemStack output); + RECIPE create(ItemStackIngredient itemInput, INGREDIENT chemicalInput, ItemStack output); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/recipe/serializer/ItemStackToChemicalRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/ItemStackToChemicalRecipeSerializer.java index c43ac88d7b2..8928c2bf394 100644 --- a/src/main/java/mekanism/common/recipe/serializer/ItemStackToChemicalRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/ItemStackToChemicalRecipeSerializer.java @@ -25,9 +25,9 @@ protected ItemStackToChemicalRecipeSerializer(IFactory this.factory = factory; } - protected abstract STACK fromJson(@NotNull JsonObject json, @NotNull String key); + protected abstract STACK stackFromJson(@NotNull JsonObject json, @NotNull String key); - protected abstract STACK fromBuffer(@NotNull FriendlyByteBuf buffer); + protected abstract STACK stackFromBuffer(@NotNull FriendlyByteBuf buffer); @NotNull @Override @@ -35,7 +35,7 @@ public RECIPE fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject j JsonElement input = GsonHelper.isArrayNode(json, JsonConstants.INPUT) ? GsonHelper.getAsJsonArray(json, JsonConstants.INPUT) : GsonHelper.getAsJsonObject(json, JsonConstants.INPUT); ItemStackIngredient inputIngredient = IngredientCreatorAccess.item().deserialize(input); - STACK output = fromJson(json, JsonConstants.OUTPUT); + STACK output = stackFromJson(json, JsonConstants.OUTPUT); if (output.isEmpty()) { throw new JsonSyntaxException("Recipe output must not be empty."); } @@ -43,10 +43,10 @@ public RECIPE fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject j } @Override - public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyByteBuf buffer) { + public RECIPE fromNetwork(@NotNull FriendlyByteBuf buffer) { try { ItemStackIngredient inputIngredient = IngredientCreatorAccess.item().read(buffer); - STACK output = fromBuffer(buffer); + STACK output = stackFromBuffer(buffer); return this.factory.create(recipeId, inputIngredient, output); } catch (Exception e) { Mekanism.logger.error("Error reading itemstack to chemical recipe from packet.", e); diff --git a/src/main/java/mekanism/common/recipe/serializer/ItemStackToEnergyRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/ItemStackToEnergyRecipeSerializer.java index b1baad871c8..04c144bd98f 100644 --- a/src/main/java/mekanism/common/recipe/serializer/ItemStackToEnergyRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/ItemStackToEnergyRecipeSerializer.java @@ -38,11 +38,11 @@ public RECIPE fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject j } @Override - public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyByteBuf buffer) { + public RECIPE fromNetwork(@NotNull FriendlyByteBuf buffer) { try { ItemStackIngredient inputIngredient = IngredientCreatorAccess.item().read(buffer); FloatingLong output = FloatingLong.readFromBuffer(buffer); - return this.factory.create(recipeId, inputIngredient, output); + return this.factory.create(inputIngredient, output); } catch (Exception e) { Mekanism.logger.error("Error reading itemstack to energy recipe from packet.", e); throw e; @@ -62,6 +62,6 @@ public void toNetwork(@NotNull FriendlyByteBuf buffer, @NotNull RECIPE recipe) { @FunctionalInterface public interface IFactory { - RECIPE create(ResourceLocation id, ItemStackIngredient input, FloatingLong output); + RECIPE create(ItemStackIngredient input, FloatingLong output); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/recipe/serializer/ItemStackToGasRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/ItemStackToGasRecipeSerializer.java index d90b1c98c48..6188c2aee6b 100644 --- a/src/main/java/mekanism/common/recipe/serializer/ItemStackToGasRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/ItemStackToGasRecipeSerializer.java @@ -15,12 +15,12 @@ public ItemStackToGasRecipeSerializer(IFactory factory) { } @Override - protected GasStack fromJson(@NotNull JsonObject json, @NotNull String key) { + protected GasStack stackFromJson(@NotNull JsonObject json, @NotNull String key) { return SerializerHelper.getGasStack(json, key); } @Override - protected GasStack fromBuffer(@NotNull FriendlyByteBuf buffer) { + protected GasStack stackFromBuffer(@NotNull FriendlyByteBuf buffer) { return GasStack.readFromPacket(buffer); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/recipe/serializer/ItemStackToInfuseTypeRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/ItemStackToInfuseTypeRecipeSerializer.java index 9fb2aa1624f..79c796be152 100644 --- a/src/main/java/mekanism/common/recipe/serializer/ItemStackToInfuseTypeRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/ItemStackToInfuseTypeRecipeSerializer.java @@ -15,12 +15,12 @@ public ItemStackToInfuseTypeRecipeSerializer(IFactory { - RECIPE create(ResourceLocation id, ItemStackIngredient input, ItemStack output); + RECIPE create(ItemStackIngredient input, ItemStack output); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/recipe/serializer/ItemStackToPigmentRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/ItemStackToPigmentRecipeSerializer.java index 85ba61b2a91..b3c7480a837 100644 --- a/src/main/java/mekanism/common/recipe/serializer/ItemStackToPigmentRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/ItemStackToPigmentRecipeSerializer.java @@ -15,12 +15,12 @@ public ItemStackToPigmentRecipeSerializer(IFactory { - RECIPE create(ResourceLocation id, ItemStackIngredient itemInput, GasStackIngredient gasInput, ItemStack outputItem, int duration); + RECIPE create(ItemStackIngredient itemInput, GasStackIngredient gasInput, ItemStack outputItem, int duration); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/recipe/serializer/PressurizedReactionRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/PressurizedReactionRecipeSerializer.java index e2d76041e0c..d6cf1dc565e 100644 --- a/src/main/java/mekanism/common/recipe/serializer/PressurizedReactionRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/PressurizedReactionRecipeSerializer.java @@ -78,7 +78,7 @@ public RECIPE fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject j } @Override - public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyByteBuf buffer) { + public RECIPE fromNetwork(@NotNull FriendlyByteBuf buffer) { try { ItemStackIngredient inputSolid = IngredientCreatorAccess.item().read(buffer); FluidStackIngredient inputFluid = IngredientCreatorAccess.fluid().read(buffer); @@ -87,7 +87,7 @@ public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyB int duration = buffer.readVarInt(); ItemStack outputItem = buffer.readItem(); GasStack outputGas = GasStack.readFromPacket(buffer); - return this.factory.create(recipeId, inputSolid, inputFluid, inputGas, energyRequired, duration, outputItem, outputGas); + return this.factory.create(inputSolid, inputFluid, inputGas, energyRequired, duration, outputItem, outputGas); } catch (Exception e) { Mekanism.logger.error("Error reading pressurized reaction recipe from packet.", e); throw e; @@ -107,7 +107,7 @@ public void toNetwork(@NotNull FriendlyByteBuf buffer, @NotNull RECIPE recipe) { @FunctionalInterface public interface IFactory { - RECIPE create(ResourceLocation id, ItemStackIngredient itemInput, FluidStackIngredient fluidInput, GasStackIngredient gasInput, FloatingLong energyRequired, int duration, + RECIPE create(ItemStackIngredient itemInput, FluidStackIngredient fluidInput, GasStackIngredient gasInput, FloatingLong energyRequired, int duration, ItemStack outputItem, GasStack outputGas); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/recipe/serializer/SawmillRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/SawmillRecipeSerializer.java index 766b28c84a5..e294ca33eb5 100644 --- a/src/main/java/mekanism/common/recipe/serializer/SawmillRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/SawmillRecipeSerializer.java @@ -65,13 +65,13 @@ public RECIPE fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject j } @Override - public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyByteBuf buffer) { + public RECIPE fromNetwork(@NotNull FriendlyByteBuf buffer) { try { ItemStackIngredient inputIngredient = IngredientCreatorAccess.item().read(buffer); ItemStack mainOutput = buffer.readItem(); ItemStack secondaryOutput = buffer.readItem(); double secondaryChance = buffer.readDouble(); - return this.factory.create(recipeId, inputIngredient, mainOutput, secondaryOutput, secondaryChance); + return this.factory.create(inputIngredient, mainOutput, secondaryOutput, secondaryChance); } catch (Exception e) { Mekanism.logger.error("Error reading sawmill recipe from packet.", e); throw e; @@ -91,6 +91,6 @@ public void toNetwork(@NotNull FriendlyByteBuf buffer, @NotNull RECIPE recipe) { @FunctionalInterface public interface IFactory { - RECIPE create(ResourceLocation id, ItemStackIngredient input, ItemStack mainOutput, ItemStack secondaryOutput, double secondaryChance); + RECIPE create(ItemStackIngredient input, ItemStack mainOutput, ItemStack secondaryOutput, double secondaryChance); } } \ No newline at end of file diff --git a/src/main/java/mekanism/common/recipe/serializer/WrappedShapedRecipeSerializer.java b/src/main/java/mekanism/common/recipe/serializer/WrappedShapedRecipeSerializer.java index 10f34e5eeb9..78fbe9c7ce9 100644 --- a/src/main/java/mekanism/common/recipe/serializer/WrappedShapedRecipeSerializer.java +++ b/src/main/java/mekanism/common/recipe/serializer/WrappedShapedRecipeSerializer.java @@ -25,9 +25,9 @@ public RECIPE fromJson(@NotNull ResourceLocation recipeId, @NotNull JsonObject j } @Override - public RECIPE fromNetwork(@NotNull ResourceLocation recipeId, @NotNull FriendlyByteBuf buffer) { + public RECIPE fromNetwork(@NotNull FriendlyByteBuf buffer) { try { - return wrapper.apply(RecipeSerializer.SHAPED_RECIPE.fromNetwork(recipeId, buffer)); + return wrapper.apply(RecipeSerializer.SHAPED_RECIPE.fromNetwork(buffer)); } catch (Exception e) { Mekanism.logger.error("Error reading wrapped shaped recipe from packet.", e); throw e;