Fixed Magic Energy Absorber efficiency calculation
This commit is contained in:
parent
e340d17337
commit
20201d069a
1 changed files with 3 additions and 3 deletions
|
@ -85,7 +85,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
|
||||||
&& aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()) {
|
&& aBaseMetaTileEntity.getUniversalEnergyStored() < maxEUOutput() + aBaseMetaTileEntity.getEUCapacity()) {
|
||||||
// Dragon Egg
|
// Dragon Egg
|
||||||
if (hasEgg() && aTick % 10 == 0) {
|
if (hasEgg() && aTick % 10 == 0) {
|
||||||
getBaseMetaTileEntity().increaseStoredEnergyUnits(sDragonEggEnergyPerTick * getEfficiency() * 10, false);
|
getBaseMetaTileEntity().increaseStoredEnergyUnits(sDragonEggEnergyPerTick * getEfficiency() / 10, false);
|
||||||
if ((mActiveSiphon != this) && (!sAllowMultipleEggs)) {
|
if ((mActiveSiphon != this) && (!sAllowMultipleEggs)) {
|
||||||
if ((mActiveSiphon == null) || (mActiveSiphon.getBaseMetaTileEntity() == null)
|
if ((mActiveSiphon == null) || (mActiveSiphon.getBaseMetaTileEntity() == null)
|
||||||
|| (mActiveSiphon.getBaseMetaTileEntity().isInvalidTileEntity()) || (!mActiveSiphon.hasEgg())) {
|
|| (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]);
|
AspectList tAspect = ((IEssentiaContainerItem) this.mInventory[0].getItem()).getAspects(this.mInventory[0]);
|
||||||
TC_Aspects tValue = TC_Aspects.valueOf(tAspect.getAspects()[0].getTag().toUpperCase());
|
TC_Aspects tValue = TC_Aspects.valueOf(tAspect.getAspects()[0].getTag().toUpperCase());
|
||||||
int tEU = (tValue.mValue * tAspect.getAmount((Aspect) tValue.mAspect) * 100);
|
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();
|
ItemStack tStack = this.mInventory[0].copy();
|
||||||
tStack.setTagCompound(null);
|
tStack.setTagCompound(null);
|
||||||
tStack.setItemDamage(0);
|
tStack.setItemDamage(0);
|
||||||
|
@ -187,7 +187,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
|
||||||
Enchantment tEnchantment = Enchantment.enchantmentsList[tID];
|
Enchantment tEnchantment = Enchantment.enchantmentsList[tID];
|
||||||
if (tEnchantment != null) {
|
if (tEnchantment != null) {
|
||||||
getBaseMetaTileEntity().increaseStoredEnergyUnits(
|
getBaseMetaTileEntity().increaseStoredEnergyUnits(
|
||||||
1000000 * tLevel / (tEnchantment.getMaxLevel() * tEnchantment.getWeight()), true);
|
1000000 * getEfficiency() * tLevel / (tEnchantment.getMaxLevel() * tEnchantment.getWeight() * 100), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue