diff options
3 files changed, 38 insertions, 12 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index cf460ca084..aa7422a79b 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -582,6 +582,18 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_Ex && (this.getPollutionPerSecond(null) > 0 ? !mMufflerHatches.isEmpty() : true); } + @Override + public void clearHatches() { + super.clearHatches(); + this.mChargeHatches.clear(); + this.mDischargeHatches.clear(); + this.mAirIntakes.clear(); + this.mTecTechEnergyHatches.clear(); + this.mTecTechDynamoHatches.clear(); + this.mAllEnergyHatches.clear(); + this.mAllDynamoHatches.clear(); + } + public <E> boolean addToMachineListInternal(ArrayList<E> aList, final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { return addToMachineListInternal(aList, getMetaTileEntity(aTileEntity), aBaseCasingIndex); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java index 13b879dd00..7b88f718b5 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java @@ -24,6 +24,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_HatchElementBuilder; +import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Utility; import gregtech.api.util.IGT_HatchAdder; import gtPlusPlus.core.util.minecraft.FluidUtils; @@ -307,6 +308,25 @@ public abstract class GregtechMeta_SteamMultiBase<T extends GregtechMeta_SteamMu return false; } + @Override + public void clearHatches() { + super.clearHatches(); + mSteamInputFluids.clear(); + mSteamInputs.clear(); + mSteamOutputs.clear(); + } + + @Override + public boolean resetRecipeMapForAllInputHatches(GT_Recipe.GT_Recipe_Map aMap) { + boolean ret = super.resetRecipeMapForAllInputHatches(aMap); + for (GT_MetaTileEntity_Hatch_Steam_BusInput hatch : mSteamInputs) { + if (resetRecipeMapForHatch(hatch, aMap)) { + ret = true; + } + } + return ret; + } + protected static <T extends GregtechMeta_SteamMultiBase<T>> GT_HatchElementBuilder<T> buildSteamInput( Class<T> typeToken) { return buildHatchAdder(typeToken).adder(GregtechMeta_SteamMultiBase::addToMachineList).hatchIds(31040) diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java index 389e267545..dc793a9282 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java @@ -204,19 +204,13 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends } @Override + public void clearHatches() { + super.clearHatches(); + mTurbineRotorHatches.clear(); + } + + @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { - this.mDynamoHatches.clear(); - this.mTecTechDynamoHatches.clear(); - this.mTurbineRotorHatches.clear(); - this.mMaintenanceHatches.clear(); - if (requiresMufflers()) { - this.mMufflerHatches.clear(); - } - this.mInputBusses.clear(); - this.mInputHatches.clear(); - if (requiresOutputHatch()) { - this.mOutputHatches.clear(); - } // we do not check for casing count here. the bare minimal is 372 but we only require 360 boolean aStructure = checkPiece(STRUCTURE_PIECE_MAIN, 3, 3, 0); log("Structure Check: " + aStructure); |