From 7c0de38a9fe24ef60ab328e074432881ce4fbda4 Mon Sep 17 00:00:00 2001 From: Blood Asp Date: Mon, 27 Apr 2015 23:38:12 +0200 Subject: Add and fix More Bugfixes, Soldering Iron and Magic Energy Absorber --- .../implementations/GT_MetaTileEntity_MultiBlockBase.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'main/java/gregtech/api/metatileentity/implementations') diff --git a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index 058a396593..95d8cc19b2 100644 --- a/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -1,6 +1,8 @@ package gregtech.api.metatileentity.implementations; import static gregtech.api.enums.GT_Values.V; +import gregtech.api.GregTech_API; +import gregtech.api.enums.ConfigCategories; import gregtech.api.gui.GT_Container_MultiMachine; import gregtech.api.gui.GT_GUIContainer_MultiMachine; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -25,6 +27,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public int mPollution = 0, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mEfficiencyIncrease = 0, mUpdate = 0, mStartUpCheck = 100, mRuntime = 0, mEfficiency = 0; public ItemStack[] mOutputItems = null; public FluidStack[] mOutputFluids = null; + public static boolean disableMaintenance; public ArrayList mInputHatches = new ArrayList(); public ArrayList mOutputHatches = new ArrayList(); @@ -37,10 +40,12 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public GT_MetaTileEntity_MultiBlockBase(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 2); + this.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); } public GT_MetaTileEntity_MultiBlockBase(String aName) { super(aName, 2); + this.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); } @Override @@ -145,12 +150,20 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { if (mMachine) { for (GT_MetaTileEntity_Hatch_Maintenance tHatch : mMaintenanceHatches) { if (isValidMetaTileEntity(tHatch)) { + if(!this.disableMaintenance){ if (tHatch.mWrench) mWrench = true; if (tHatch.mScrewdriver) mScrewdriver = true; if (tHatch.mSoftHammer) mSoftHammer = true; if (tHatch.mHardHammer) mHardHammer = true; if (tHatch.mSolderingTool) mSolderingTool = true; - if (tHatch.mCrowbar) mCrowbar = true; + if (tHatch.mCrowbar) mCrowbar = true;}else{ + mWrench = true; + mScrewdriver = true; + mSoftHammer = true; + mHardHammer = true; + mSolderingTool = true; + mCrowbar = true; + } tHatch.mWrench = false; tHatch.mScrewdriver = false; -- cgit