From b46a466878c07f8343894899304dce605b6b1d44 Mon Sep 17 00:00:00 2001 From: Dimach Date: Sun, 7 Oct 2018 19:04:47 +0300 Subject: [PATCH] Fixed bug in macerator recipes. (#1468) --- .../machines/steam/GT_MetaTileEntity_Macerator_Bronze.java | 4 +++- .../machines/steam/GT_MetaTileEntity_Macerator_Steel.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java index 2ed8d7a6..95d18522 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Bronze.java @@ -13,6 +13,7 @@ import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; import java.util.Random; @@ -58,10 +59,11 @@ public class GT_MetaTileEntity_Macerator_Bronze mOutputBlocked++; return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; } + if (!tRecipe.isRecipeInputEqual(true, new FluidStack[]{getFillableStack()}, getAllInputs())) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; if (tRecipe.getOutput(0) != null) mOutputItems[0] = tRecipe.getOutput(0); this.mEUt = tRecipe.mEUt; this.mMaxProgresstime = (tRecipe.mDuration * 2); - getInputAt(0).stackSize -= tRecipe.mInputs[0].stackSize; return FOUND_AND_SUCCESSFULLY_USED_RECIPE; } diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java index 987d3156..0f7d98f7 100644 --- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java +++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_Macerator_Steel.java @@ -13,6 +13,7 @@ import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; import java.util.Random; @@ -58,10 +59,11 @@ public class GT_MetaTileEntity_Macerator_Steel mOutputBlocked++; return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; } + if (!tRecipe.isRecipeInputEqual(true, new FluidStack[]{getFillableStack()}, getAllInputs())) + return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS; if (tRecipe.getOutput(0) != null) mOutputItems[0] = tRecipe.getOutput(0); this.mEUt = (3 * tRecipe.mEUt); this.mMaxProgresstime = tRecipe.mDuration; - getInputAt(0).stackSize -= tRecipe.mInputs[0].stackSize; return FOUND_AND_SUCCESSFULLY_USED_RECIPE; }