Fixed Magic Energy Absorber efficiency calculation

This commit is contained in:
Blood-Asp 2016-06-19 20:23:49 +02:00
parent e340d17337
commit 20201d069a

View file

@ -85,7 +85,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
&& aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()) {
// Dragon Egg
if (hasEgg() && aTick % 10 == 0) {
getBaseMetaTileEntity().increaseStoredEnergyUnits(sDragonEggEnergyPerTick * getEfficiency() * 10, false);
getBaseMetaTileEntity().increaseStoredEnergyUnits(sDragonEggEnergyPerTick * getEfficiency() / 10, false);
if ((mActiveSiphon != this) && (!sAllowMultipleEggs)) {
if ((mActiveSiphon == null) || (mActiveSiphon.getBaseMetaTileEntity() == null)
|| (mActiveSiphon.getBaseMetaTileEntity().isInvalidTileEntity()) || (!mActiveSiphon.hasEgg())) {
@ -165,7 +165,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
AspectList tAspect = ((IEssentiaContainerItem) this.mInventory[0].getItem()).getAspects(this.mInventory[0]);
TC_Aspects tValue = TC_Aspects.valueOf(tAspect.getAspects()[0].getTag().toUpperCase());
int tEU = (tValue.mValue * tAspect.getAmount((Aspect) tValue.mAspect) * 100);
getBaseMetaTileEntity().increaseStoredEnergyUnits(tEU, true);
getBaseMetaTileEntity().increaseStoredEnergyUnits(tEU * getEfficiency() / 100, true);
ItemStack tStack = this.mInventory[0].copy();
tStack.setTagCompound(null);
tStack.setItemDamage(0);
@ -187,7 +187,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
Enchantment tEnchantment = Enchantment.enchantmentsList[tID];
if (tEnchantment != null) {
getBaseMetaTileEntity().increaseStoredEnergyUnits(
1000000 * tLevel / (tEnchantment.getMaxLevel() * tEnchantment.getWeight()), true);
1000000 * getEfficiency() * tLevel / (tEnchantment.getMaxLevel() * tEnchantment.getWeight() * 100), true);
}
}
}