diff options
Diffstat (limited to 'src/main/java/tectech/thing/metaTileEntity/multi/base')
-rw-r--r-- | src/main/java/tectech/thing/metaTileEntity/multi/base/TTMultiblockBase.java | 80 |
1 files changed, 7 insertions, 73 deletions
diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/base/TTMultiblockBase.java b/src/main/java/tectech/thing/metaTileEntity/multi/base/TTMultiblockBase.java index 2a0c10f303..fdc3f9f826 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/base/TTMultiblockBase.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/base/TTMultiblockBase.java @@ -33,7 +33,6 @@ import net.minecraftforge.fluids.FluidStack; import org.jetbrains.annotations.NotNull; import org.lwjgl.opengl.GL11; -import com.google.common.collect.Iterables; import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.IAlignment; import com.gtnewhorizon.structurelib.alignment.IAlignmentProvider; @@ -69,7 +68,6 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.modularui.IBindPlayerInventoryUI; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.BaseTileEntity; -import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.MTEExtendedPowerMultiBlockBase; import gregtech.api.metatileentity.implementations.MTEHatch; import gregtech.api.metatileentity.implementations.MTEHatchDynamo; @@ -89,11 +87,10 @@ import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.shutdown.ShutDownReason; import gregtech.api.util.shutdown.ShutDownReasonRegistry; import gregtech.api.util.shutdown.SimpleShutDownReason; -import gregtech.common.Pollution; import gregtech.common.tileentities.machines.IDualInputHatch; import tectech.Reference; import tectech.TecTech; -import tectech.loader.TecTechConfig; +import tectech.loader.ConfigHandler; import tectech.thing.gui.TecTechUITextures; import tectech.thing.metaTileEntity.hatch.MTEHatchDataConnector; import tectech.thing.metaTileEntity.hatch.MTEHatchDataInput; @@ -566,7 +563,7 @@ public abstract class TTMultiblockBase extends MTEExtendedPowerMultiBlockBase<TT explodeMultiblock(); } } catch (Exception e) { - if (TecTechConfig.DEBUG_MODE) { + if (ConfigHandler.debug.DEBUG_MODE) { e.printStackTrace(); } } @@ -1490,9 +1487,6 @@ public abstract class TTMultiblockBase extends MTEExtendedPowerMultiBlockBase<TT if (allowProduction && euFlow > 0) { addEnergyOutput_EM(getPowerFlow() * (long) mEfficiency / getMaxEfficiency(aStack), eAmpereFlow); } else if (euFlow < 0) { - if (TecTechConfig.POWERLESS_MODE) { - return true; - } if (!drainEnergyInput_EM( getPowerFlow(), getPowerFlow() * getMaxEfficiency(aStack) / Math.max(1000L, mEfficiency), @@ -1509,9 +1503,6 @@ public abstract class TTMultiblockBase extends MTEExtendedPowerMultiBlockBase<TT if (allowProduction && euFlow > 0) { addEnergyOutput_EM(getPowerFlow() * (long) mEfficiency / getMaxEfficiency(aStack), eAmpereFlow); } else if (euFlow < 0) { - if (TecTechConfig.POWERLESS_MODE) { - return true; - } if (!drainEnergyInput( getPowerFlow() * getMaxEfficiency(aStack) / Math.max(1000L, mEfficiency), eAmpereFlow)) { @@ -1625,7 +1616,7 @@ public abstract class TTMultiblockBase extends MTEExtendedPowerMultiBlockBase<TT // - 1) / maxEUinputMin // + 1 = 1! //if // not too much A - if (TecTechConfig.DEBUG_MODE) { + if (ConfigHandler.debug.DEBUG_MODE) { TecTech.LOGGER.debug("L1 " + EUuse + ' ' + getEUVar() + ' ' + (EUuse > getEUVar())); TecTech.LOGGER.debug("L2 " + EUtEffective + ' ' + maxEUinputMax + ' ' + (EUtEffective > maxEUinputMax)); TecTech.LOGGER.debug("L3 " + Amperes + ' ' + getMaxInputEnergy()); @@ -1748,70 +1739,13 @@ public abstract class TTMultiblockBase extends MTEExtendedPowerMultiBlockBase<TT return false; } + // empty body to prevent any explosion @Override - public final void explodeMultiblock() { - if (explodedThisTick) { - return; - } - explodedThisTick = true; - if (!TecTech.configTecTech.BOOM_ENABLE) { - TecTech.proxy.broadcast( - "Multi Explode BOOM! " + getBaseMetaTileEntity().getXCoord() - + ' ' - + getBaseMetaTileEntity().getYCoord() - + ' ' - + getBaseMetaTileEntity().getZCoord()); - StackTraceElement[] ste = Thread.currentThread() - .getStackTrace(); - TecTech.proxy.broadcast("Multi Explode BOOM! " + ste[2].toString()); - return; - } - extraExplosions_EM(); - Pollution.addPollution(getBaseMetaTileEntity(), 600000); - mInventory[1] = null; - @SuppressWarnings("unchecked") - Iterable<MetaTileEntity> allHatches = Iterables.concat( - mInputBusses, - mOutputBusses, - mInputHatches, - mOutputHatches, - mDynamoHatches, - mMufflerHatches, - mEnergyHatches, - mMaintenanceHatches, - eParamHatches, - eEnergyMulti, - eUncertainHatches, - eDynamoMulti, - eInputData, - eOutputData); - for (MetaTileEntity tTileEntity : allHatches) { - if (tTileEntity != null && tTileEntity.getBaseMetaTileEntity() != null) { - tTileEntity.getBaseMetaTileEntity() - .doExplosion(V[9]); - } - } - getBaseMetaTileEntity().doExplosion(V[15]); - } + public final void explodeMultiblock() {} + // empty body to prevent any explosion @Override - public void doExplosion(long aExplosionPower) { - if (!TecTech.configTecTech.BOOM_ENABLE) { - TecTech.proxy.broadcast( - "Multi DoExplosion BOOM! " + getBaseMetaTileEntity().getXCoord() - + ' ' - + getBaseMetaTileEntity().getYCoord() - + ' ' - + getBaseMetaTileEntity().getZCoord()); - StackTraceElement[] ste = Thread.currentThread() - .getStackTrace(); - TecTech.proxy.broadcast("Multi DoExplosion BOOM! " + ste[2].toString()); - return; - } - explodeMultiblock(); - super.doExplosion(aExplosionPower); - } // Redirecting to explodemultiblock - // endregion + public void doExplosion(long aExplosionPower) {} // region adder methods @Override |