diff options
author | basdxz <tudurap.com@gmail.com> | 2020-08-05 00:14:42 +0100 |
---|---|---|
committer | basdxz <tudurap.com@gmail.com> | 2020-08-05 00:14:42 +0100 |
commit | 23e8843b01ec3ff95123e6472656c61632c1c598 (patch) | |
tree | 928d310b5c71bbe03c269e593fa5251bb94f98d6 /src | |
parent | 18ec8a9bc25aed92dda52334c4fff5b39f1dc010 (diff) | |
download | GT5-Unofficial-23e8843b01ec3ff95123e6472656c61632c1c598.tar.gz GT5-Unofficial-23e8843b01ec3ff95123e6472656c61632c1c598.tar.bz2 GT5-Unofficial-23e8843b01ec3ff95123e6472656c61632c1c598.zip |
Fix Tesla draining energy when disabled
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java index 729b73044e..93f6e50c5a 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java @@ -619,12 +619,15 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public long maxEUStore() { - return energyCapacity * 2; + //Setting the power here so that the tower looses all it's charge once disabled + //This also stops it from exploding + return getBaseMetaTileEntity().isActive() ? energyCapacity * 2 : 0; } @Override public long getEUVar() { - return getBaseMetaTileEntity().isActive() ? super.getEUVar() : 0; + //Same reason as maxEUStore, set to 1 instead of zero so it doesn't drain constantly + return getBaseMetaTileEntity().isActive() ? super.getEUVar() : 1; } private boolean addCapacitorToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { |