From d6fd3fd7fac1ed65992af3b7f7848da13be0461a Mon Sep 17 00:00:00 2001 From: Blood-Asp Date: Fri, 16 Dec 2016 18:34:26 +0100 Subject: [PATCH] Foid invalid steam in turbines --- .../generators/GT_MetaTileEntity_SteamTurbine.java | 13 ++++++++++++- .../multi/GT_MetaTileEntity_LargeTurbine_Steam.java | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java index 90cd729d..78a30e17 100644 --- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java +++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_SteamTurbine.java @@ -56,7 +56,8 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener } public int getFuelValue(FluidStack aLiquid) { - return GT_ModHandler.isSteam(aLiquid) ? 3 : 0; + String fluidName = aLiquid.getFluid().getUnlocalizedName(aLiquid); + return GT_ModHandler.isSteam(aLiquid) || fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name") ? 3 : 0; } public int consumedFluidPerOperation(FluidStack aLiquid) { @@ -109,4 +110,14 @@ public class GT_MetaTileEntity_SteamTurbine extends GT_MetaTileEntity_BasicGener public int getPollution() { return 0; } + + @Override + public boolean isFluidInputAllowed(FluidStack aFluid) { + if(aFluid.getFluid().getUnlocalizedName(aFluid).equals("ic2.fluidSuperheatedSteam")){ + aFluid.amount=0; + aFluid = null; + return false; + } + return super.isFluidInputAllowed(aFluid); + } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java index 1a61941a..7d939fa9 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java @@ -101,6 +101,8 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg } achievement = true; } + }else if(fluidName.equals("ic2.fluidSuperheatedSteam")){ + depleteInput(new FluidStack(aFluids.get(i), aFluids.get(i).amount)); } }