From 6c9ec7b46509a7142edb94c15f9beac5a6153d82 Mon Sep 17 00:00:00 2001 From: Tec Date: Wed, 25 Nov 2020 17:25:05 +0100 Subject: Implement anti-laser target hatches! https://www.livescience.com/anti-laser-wireless-charging.html (cherry picked from commit 0304d1464f38ac75cf338ac470f1cc7228cd6d5c) --- .../multi/base/GT_MetaTileEntity_MultiblockBase_EM.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java index 9af6d40df7..8abb027d3f 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java @@ -1440,7 +1440,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { euVar = tHatch.maxEUOutput(); if (tHatch.getBaseMetaTileEntity().getStoredEU() <= tHatch.maxEUStore() - euVar && - aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.max(euVar >> 7, 1), false)) { + aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.max(euVar / 24576, 1), false)) { tHatch.setEUVar(tHatch.getBaseMetaTileEntity().getStoredEU() + euVar); } } @@ -1449,7 +1449,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM extends GT_MetaTileEnt if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) { euVar = tHatch.maxEUOutput() * tHatch.Amperes; if (tHatch.getBaseMetaTileEntity().getStoredEU() <= tHatch.maxEUStore() - euVar && - aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.max(euVar >> 7, tHatch.Amperes), false)) { + aBaseMetaTileEntity.decreaseStoredEnergyUnits(euVar + Math.max(euVar / 24576, tHatch.Amperes), false)) { tHatch.setEUVar(tHatch.getBaseMetaTileEntity().getStoredEU() + euVar); } } -- cgit