diff options
author | Maxim <maxim235@gmx.de> | 2023-01-07 13:09:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-07 13:09:22 +0100 |
commit | 105bd9f4d65b750804a7a1f45badf9f99dcd45e1 (patch) | |
tree | 96138c760dd3f5df26200372a4f64e513ce3e035 /src/main | |
parent | 04a4aa4ca39fa1bdf64923a515e00acefa732b3c (diff) | |
download | GT5-Unofficial-105bd9f4d65b750804a7a1f45badf9f99dcd45e1.tar.gz GT5-Unofficial-105bd9f4d65b750804a7a1f45badf9f99dcd45e1.tar.bz2 GT5-Unofficial-105bd9f4d65b750804a7a1f45badf9f99dcd45e1.zip |
Use long MB base (#482)
* Use long MB base
* Added some more casts
* Replaced all occurences of mEUt with lEUt
Diffstat (limited to 'src/main')
32 files changed, 219 insertions, 214 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java index 29868f4617..2c04c75fe3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java @@ -153,13 +153,18 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { } public void damageTurbine(int aEUt, int damageFactorLow, float damageFactorHigh) { + damageTurbine((long) aEUt, damageFactorLow, damageFactorHigh); + } + + public void damageTurbine(long aEUt, int damageFactorLow, float damageFactorHigh) { if (hasTurbine() && MathUtils.randInt(0, 1) == 0) { ItemStack aTurbine = getTurbine(); ((GT_MetaGenerated_Tool) aTurbine.getItem()) .doDamage( aTurbine, (long) getDamageToComponent(aTurbine) - * (long) Math.min(aEUt / damageFactorLow, Math.pow(aEUt, damageFactorHigh))); + * (long) Math.min( + (float) aEUt / (float) damageFactorLow, Math.pow(aEUt, damageFactorHigh))); } } @@ -207,7 +212,7 @@ public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { GregtechMetaTileEntity_LargerTurbineBase x = getController(); if (x != null) { // Logger.INFO("Checking Status of Controller. Running? "+(x.mEUt > 0)); - return x.mEUt > 0; + return x.lEUt > 0; } // Logger.INFO("Status of Controller failed, controller is null."); return false; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index 3ab92abf4d..7cfe59fa06 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -85,8 +85,8 @@ import org.apache.commons.lang3.ArrayUtils; // so any method in GregtechMetaTileEntity_IndustrialDehydrator would see generic field declared in // GregtechMeta_MultiBlockBase without generic parameter -public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_EnhancedMultiBlockBase<T>> - extends GT_MetaTileEntity_EnhancedMultiBlockBase<T> { +public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_ExtendedPowerMultiBlockBase<T>> + extends GT_MetaTileEntity_ExtendedPowerMultiBlockBase<T> { public static final boolean DEBUG_DISABLE_CORES_TEMPORARILY = true; @@ -237,14 +237,14 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En + EnumChatFormatting.RESET + " EU")); } - if (-mEUt > 0) { + if (-lEUt > 0) { mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.usage") + ":"); mInfo.add(StatCollector.translateToLocal( - "" + EnumChatFormatting.RED + Integer.toString(-mEUt) + EnumChatFormatting.RESET + " EU/t")); + "" + EnumChatFormatting.RED + (-lEUt) + EnumChatFormatting.RESET + " EU/t")); } else { mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.generation") + ":"); mInfo.add(StatCollector.translateToLocal( - "" + EnumChatFormatting.GREEN + Integer.toString(mEUt) + EnumChatFormatting.RESET + " EU/t")); + "" + EnumChatFormatting.GREEN + lEUt + EnumChatFormatting.RESET + " EU/t")); } mInfo.add(StatCollector.translateToLocal("GTPP.multiblock.problems") + ": " + EnumChatFormatting.RED @@ -718,7 +718,7 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En * log("Control core found."); } * * - * // Reset outputs and progress stats this.mEUt = 0; this.mMaxProgresstime = 0; + * // Reset outputs and progress stats this.lEUt = 0; this.mMaxProgresstime = 0; * this.mOutputItems = new ItemStack[]{}; this.mOutputFluids = new * FluidStack[]{}; * @@ -776,19 +776,19 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En * tTimeFactor * 10000); * * int aTempEu = (int) Math.floor(tTotalEUt); log("EU4: "+aTempEu); - * this.mEUt = (int) aTempEu; + * this.lEUt = (long) aTempEu; * * * this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); * this.mEfficiencyIncrease = 10000; * - * // Overclock if (this.mEUt <= 16) { this.mEUt = (this.mEUt * (1 << tTier - 1) + * // Overclock if (this.lEUt <= 16) { this.lEUt = (this.lEUt * (1 << tTier - 1) * * (1 << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << - * tTier - 1)); } else { while (this.mEUt <= - * gregtech.api.enums.GT_Values.V[(tTier - 1)]) { this.mEUt *= 4; + * tTier - 1)); } else { while (this.lEUt <= + * gregtech.api.enums.GT_Values.V[(tTier - 1)]) { this.lEUt *= 4; * this.mMaxProgresstime /= 2; } } * - * if (this.mEUt > 0) { this.mEUt = (-this.mEUt); } + * if (this.lEUt > 0) { this.lEUt = (-this.lEUt); } * * this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); * @@ -864,7 +864,7 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En // Based on the Processing Array. A bit overkill, but very flexible. // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -975,18 +975,18 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); - this.mEUt = (int) Math.ceil(tTotalEUt); + this.lEUt = (long) Math.ceil(tTotalEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1L << tTier - 1) * (1L << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; if (hasPerfectOverclock()) { this.mMaxProgresstime /= 4; } else { @@ -995,8 +995,8 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); @@ -1285,24 +1285,24 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); - this.mEUt = (int) Math.ceil(tTotalEUt); + this.lEUt = (long) Math.ceil(tTotalEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1L << tTier - 1) * (1L << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= 2; } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java index d077c8ed78..6aaa37f4ac 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java @@ -101,7 +101,7 @@ public abstract class GregtechMeta_SteamMultiBase<T extends GregtechMeta_SteamMu int aOutputChanceRoll = 10000; // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -151,15 +151,15 @@ public abstract class GregtechMeta_SteamMultiBase<T extends GregtechMeta_SteamMu float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor * 1.5f); - this.mEUt = (int) Math.ceil(tTotalEUt * 1.33f); + this.lEUt = (long) Math.ceil(tTotalEUt * 1.33f); // this.mEUt = (3 * tRecipe.mEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); @@ -267,8 +267,8 @@ public abstract class GregtechMeta_SteamMultiBase<T extends GregtechMeta_SteamMu */ public boolean onRunningTick(ItemStack aStack) { fixAllMaintenanceIssue(); - if (mEUt < 0) { - long aSteamVal = (((long) -mEUt * 10000) / Math.max(1000, mEfficiency)); + if (lEUt < 0) { + long aSteamVal = ((-lEUt * 10000) / Math.max(1000, mEfficiency)); // Logger.INFO("Trying to drain "+aSteamVal+" steam per tick."); if (!tryConsumeSteam((int) aSteamVal)) { stopMachine(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java index 4030f7cc11..64ff058568 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java @@ -189,7 +189,7 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase<GMTE_Amazon if (tOutputStack != null && this.allowPutStack(tOutputStack, schematicStack)) { final ItemStack input = inputStack; --input.stackSize; - this.mEUt = 32 * (1 << this.mTier - 1) * (1 << this.mTier - 1); + this.lEUt = 32 * (1L << this.mTier - 1) * (1L << this.mTier - 1); // this.mMaxProgresstime = 16 / (1 << this.mTier - 1); this.mMaxProgresstime = 2; this.addOutput(tOutputStack); @@ -203,7 +203,7 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase<GMTE_Amazon if (tOutputStack != null && this.allowPutStack(tOutputStack, schematicStack)) { final ItemStack input2 = inputStack; input2.stackSize -= 4; - this.mEUt = 32 * (1 << this.mTier - 1) * (1 << this.mTier - 1); + this.lEUt = 32 * (1L << this.mTier - 1) * (1L << this.mTier - 1); // this.mMaxProgresstime = 32 / (1 << this.mTier - 1); this.mMaxProgresstime = 4; this.addOutput(tOutputStack); @@ -226,7 +226,7 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase<GMTE_Amazon if (tOutputStack != null && this.allowPutStack(tOutputStack, schematicStack)) { final ItemStack input3 = inputStack; input3.stackSize -= 9; - this.mEUt = 32 * (1 << this.mTier - 1) * (1 << this.mTier - 1); + this.lEUt = 32 * (1L << this.mTier - 1) * (1L << this.mTier - 1); // this.mMaxProgresstime = 64 / (1 << this.mTier - 1); this.mMaxProgresstime = 6; this.addOutput(tOutputStack); @@ -251,7 +251,7 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase<GMTE_Amazon // Based on the Processing Array. A bit overkill, but very flexible. // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -318,25 +318,25 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase<GMTE_Amazon float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); - this.mEUt = (int) Math.ceil(tTotalEUt); + this.lEUt = (long) Math.ceil(tTotalEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1L << tTier - 1) * (1L << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; if (this.hasPerfectOverclock()) this.mMaxProgresstime /= 4; else this.mMaxProgresstime /= 2; } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java index 2100ec132a..6b6eb30594 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java @@ -221,7 +221,7 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter // Based on the Processing Array. A bit overkill, but very flexible. // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -286,23 +286,23 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); int rInt = 2; - this.mEUt = (int) Math.max(Math.ceil(tTotalEUt), 1); + this.lEUt = (long) Math.max(Math.ceil(tTotalEUt), 1); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1L << tTier - 1) * (1L << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= (tHeatCapacityDivTiers >= rInt ? 4 : 2); } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialChisel.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialChisel.java index 1f12e10fca..6250d34dab 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialChisel.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialChisel.java @@ -243,7 +243,7 @@ public class GregtechMetaTileEntity_IndustrialChisel FluidStack[] aFluidInputs = new FluidStack[] {}; // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -306,24 +306,24 @@ public class GregtechMetaTileEntity_IndustrialChisel float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); - this.mEUt = (int) Math.ceil(tTotalEUt); + this.lEUt = (long) Math.ceil(tTotalEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1L << tTier - 1) * (1L << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= 2; } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java index d29c9d13e8..320ff62f29 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java @@ -198,7 +198,7 @@ public class GregtechMetaTileEntity_IndustrialDehydrator // Based on the Processing Array. A bit overkill, but very flexible. // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -263,27 +263,27 @@ public class GregtechMetaTileEntity_IndustrialDehydrator this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); int rInt = 2; - this.mEUt = (int) Math.ceil(tTotalEUt); + this.lEUt = (long) Math.ceil(tTotalEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1L << tTier - 1) * (1L << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= (tHeatCapacityDivTiers >= rInt ? 4 : 2); } } if (tHeatCapacityDivTiers > 0) { - this.mEUt = (int) (this.mEUt * (Math.pow(0.95, tHeatCapacityDivTiers))); + this.lEUt = (long) (this.lEUt * (Math.pow(0.95, tHeatCapacityDivTiers))); } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java index 10567f817e..8045f703ef 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java @@ -328,7 +328,7 @@ public class GregtechMetaTileEntity_IndustrialMultiMachine Logger.MACHINE_INFO("Mode: " + tCircuitID); // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -404,24 +404,24 @@ public class GregtechMetaTileEntity_IndustrialMultiMachine float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); - this.mEUt = (int) Math.ceil(tTotalEUt); + this.lEUt = (long) Math.ceil(tTotalEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1L << tTier - 1) * (1L << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= 2; } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java index d887e64579..931621cdde 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java @@ -511,7 +511,7 @@ public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase< // Based on the Processing Array. A bit overkill, but very flexible. // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -588,24 +588,24 @@ public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase< float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); - this.mEUt = (int) Math.ceil(tTotalEUt); + this.lEUt = (long) Math.ceil(tTotalEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1L << tTier - 1) * (1L << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= 4; } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java index 09a2fdf83d..1934a8e610 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java @@ -210,7 +210,7 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB this.mEfficiencyIncrease = 10000; // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mProgresstime = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; @@ -232,7 +232,7 @@ public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockB Logger.INFO("Did not find recipe!"); } } - this.mEUt = 0; + this.lEUt = 0; this.mEfficiency = 0; Logger.INFO("Did not find recipe! (2)"); return false; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java index df3990530f..ff9c20b08d 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_AssemblyLine.java @@ -204,7 +204,7 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine if (mMaxProgresstime <= 0) continue; if (!tTag.hasKey("eu")) continue; - mEUt = tTag.getInteger("eu"); + lEUt = tTag.getLong("eu"); if (GT_Values.D1) System.out.println("Find avaiable recipe"); findRecipe = true; @@ -231,17 +231,17 @@ public class GregtechMetaTileEntity_Adv_AssemblyLine byte tTier = (byte) Math.max(1, GT_Utility.getTier(getMaxInputVoltage())); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; - if (mEUt <= 16) { - this.mEUt = (mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (lEUt <= 16) { + this.lEUt = (lEUt * (1 << tTier - 1) * (1 << tTier - 1)); this.mMaxProgresstime = (mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= 2; } } - if (this.mEUt > 0) { - this.mEUt = -this.mEUt; + if (this.lEUt > 0) { + this.lEUt = -this.lEUt; } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); updateSlots(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java index bafcc83cd0..4e1844f539 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java @@ -272,7 +272,7 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase< // Based on the Processing Array. A bit overkill, but very flexible. // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -338,18 +338,18 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase< this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); int tHalfHeatCapacityDivTiers = tHeatCapacityDivTiers / 2; - this.mEUt = (int) Math.ceil(tTotalEUt); + this.lEUt = (long) Math.ceil(tTotalEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1 << tTier - 1) * (1 << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; if (tHalfHeatCapacityDivTiers > 0) { this.mMaxProgresstime = mMaxProgresstime / 4; tHalfHeatCapacityDivTiers--; @@ -361,8 +361,8 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase< } } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_HeatExchanger.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_HeatExchanger.java index 553a6a965c..00cd8e9c1f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_HeatExchanger.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_HeatExchanger.java @@ -225,7 +225,7 @@ public class GregtechMetaTileEntity_Adv_HeatExchanger superheated_threshold * 2); // Don't consume too much hot fluid per second, maximum is 2x SH threshold. mInputHotFluidHatch.drain(fluidAmountToConsume, true); this.mMaxProgresstime = 20; - this.mEUt = (int) (fluidAmountToConsume * steam_output_multiplier * efficiency); + this.lEUt = (long) (fluidAmountToConsume * steam_output_multiplier * efficiency); if (do_lava) { mOutputColdFluidHatch.fill(FluidRegistry.getFluidStack("ic2pahoehoelava", fluidAmountToConsume), true); } else { @@ -244,9 +244,9 @@ public class GregtechMetaTileEntity_Adv_HeatExchanger @Override public boolean onRunningTick(ItemStack aStack) { - if (this.mEUt > 0) { + if (this.lEUt > 0) { int tGeneratedEU = - (int) (this.mEUt * 2L * this.mEfficiency / 10000L); // APPROXIMATELY how much steam to generate. + (int) (this.lEUt * 2L * this.mEfficiency / 10000L); // APPROXIMATELY how much steam to generate. if (tGeneratedEU > 0) { if (superheated) tGeneratedEU /= 2; // We produce half as much superheated steam if necessary @@ -351,7 +351,7 @@ public class GregtechMetaTileEntity_Adv_HeatExchanger StatCollector.translateToLocal("GT5U.multiblock.usage") + " " + StatCollector.translateToLocal("GT5U.LHE.steam") + ": " + (superheated ? EnumChatFormatting.RED : EnumChatFormatting.YELLOW) - + GT_Utility.formatNumbers(superheated ? -2 * mEUt : -mEUt) + EnumChatFormatting.RESET + " EU/t", + + GT_Utility.formatNumbers(superheated ? -2 * lEUt : -lEUt) + EnumChatFormatting.RESET + " EU/t", StatCollector.translateToLocal("GT5U.multiblock.problems") + ": " + EnumChatFormatting.RED + (getIdealStatus() - getRepairStatus()) + EnumChatFormatting.RESET + " " + StatCollector.translateToLocal("GT5U.multiblock.efficiency") diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java index f701b23e92..cf69ce12cd 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java @@ -389,7 +389,7 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity if (tNBT != null) { tNBT = tNBT.getCompoundTag("GT.CraftingComponents"); if (tNBT != null) { - this.mEUt = 16 * (1 << this.mTier - 1) * (1 << this.mTier - 1); + this.lEUt = 16 * (1L << this.mTier - 1) * (1L << this.mTier - 1); this.mMaxProgresstime = (100 - (8 * this.mTier)); for (int i = 0; i < this.mOutputItems.length; ++i) { if (this.getBaseMetaTileEntity().getRandomNumber(100) < 60 + 12 * this.mTier) { @@ -403,7 +403,7 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase<GT4Entity if (this.mTier > 5) { this.mMaxProgresstime >>= this.mTier - 5; } - if (this.mEUt > 0) this.mEUt = (-this.mEUt); + if (this.lEUt > 0) this.lEUt = (-this.lEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; inputItem.stackSize--; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java index 952cb0954f..4ba92f8f7e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java @@ -105,7 +105,7 @@ public class GT4Entity_ThermalBoiler extends GregtechMeta_MultiBlockBase<GT4Enti if (tFluid.getFluid() == mLava || tFluid.getFluid() == mPahoehoe) { if (depleteInput(tFluid)) { this.mMaxProgresstime = Math.max(1, runtimeBoost(tRecipe.mSpecialValue * 2)); - this.mEUt = getEUt(); + this.lEUt = getEUt(); this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease()); int loot_MAXCHANCE = 100000; @@ -154,7 +154,7 @@ public class GT4Entity_ThermalBoiler extends GregtechMeta_MultiBlockBase<GT4Enti } else if (tFluid.getFluid() == mSolarSaltHot) { if (depleteInput(tFluid)) { this.mMaxProgresstime = tRecipe.mDuration; - this.mEUt = 0; + this.lEUt = 0; this.mEfficiency = 10000; for (FluidStack aOutput : tRecipe.mFluidOutputs) { this.addOutput(FluidUtils.getFluidStack(aOutput, aOutput.amount)); @@ -165,7 +165,7 @@ public class GT4Entity_ThermalBoiler extends GregtechMeta_MultiBlockBase<GT4Enti } } this.mMaxProgresstime = 0; - this.mEUt = 0; + this.lEUt = 0; return false; } @@ -181,11 +181,11 @@ public class GT4Entity_ThermalBoiler extends GregtechMeta_MultiBlockBase<GT4Enti @Override public boolean onRunningTick(ItemStack aStack) { - if (this.mEUt > 0) { + if (this.lEUt > 0) { if (this.mSuperEfficencyIncrease > 0) { this.mEfficiency = Math.min(10000, this.mEfficiency + this.mSuperEfficencyIncrease); } - int tGeneratedEU = (int) (this.mEUt * 2L * this.mEfficiency / 10000L); + int tGeneratedEU = (int) (this.lEUt * 2L * this.mEfficiency / 10000L); if (tGeneratedEU > 0) { long amount = (tGeneratedEU + 160) / 160; if (depleteInput(Materials.Water.getFluid(amount)) @@ -342,7 +342,7 @@ public class GT4Entity_ThermalBoiler extends GregtechMeta_MultiBlockBase<GT4Enti } } - if (this.mEUt > 0) { + if (this.lEUt > 0) { if (aTick % 600L == 0L) { damageFilter(); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java index c5e700d711..144aa90cdb 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java @@ -338,7 +338,7 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase // Based on the Processing Array. A bit overkill, but very flexible. // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -453,24 +453,24 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); - this.mEUt = (int) Math.ceil(tTotalEUt); + this.lEUt = (long) Math.ceil(tTotalEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1 << tTier - 1) * (1 << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= 4; } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java index d7abb28977..3fdf0a9651 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java @@ -213,7 +213,7 @@ public class GregtechMTE_FrothFlotationCell extends GregtechMeta_MultiBlockBase< // Based on the Processing Array. A bit overkill, but very flexible. // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -317,24 +317,24 @@ public class GregtechMTE_FrothFlotationCell extends GregtechMeta_MultiBlockBase< float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); - this.mEUt = (int) Math.ceil(tTotalEUt); + this.lEUt = (long) Math.ceil(tTotalEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1 << tTier - 1) * (1 << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= 4; } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java index 6cc8d4fc11..d71e4d7933 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java @@ -107,7 +107,7 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase<Greg "Liquid Fluoride Thorium Reactor", tRunning, tMaintainance, - "Current Output: " + this.mEUt + " EU/t", + "Current Output: " + this.lEUt + " EU/t", "Fuel Remaining: " + this.mFuelRemaining + " Litres", "Current Efficiency: " + (this.mEfficiency / 5) + "%", "Current Efficiency (Raw): " + (this.mEfficiency), @@ -424,7 +424,7 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase<Greg } } // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -439,8 +439,8 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase<Greg } // -- Try not to fail after this point - inputs have already been consumed! -- this.mMaxProgresstime = (int) (aFuelProcessing.mDuration); - this.mEUt = aFuelProcessing.mSpecialValue * 4; - Logger.WARNING("Outputting " + this.mEUt + "eu/t"); + this.lEUt = aFuelProcessing.mSpecialValue * 4L; + Logger.WARNING("Outputting " + this.lEUt + "eu/t"); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); @@ -452,7 +452,7 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase<Greg Logger.WARNING("Recipe Good!"); return true; } - this.mEUt = 0; + this.lEUt = 0; this.mEfficiency = 0; Logger.WARNING("Recipe Bad!"); return false; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java index 340139c51c..0eef97a5a4 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java @@ -193,13 +193,13 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase< this.mOutputItems = toOutput; this.mMaxProgresstime = TICKS_PER_OPERATION; - this.mEUt = MaterialUtils.getVoltageForTier(tTier); + this.lEUt = MaterialUtils.getVoltageForTier(tTier); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.tryDamageTool(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java index b30f0c0625..bc20e09090 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java @@ -263,18 +263,18 @@ public class GregtechMetaTileEntity_AlloyBlastSmelter this.mEfficiency = (10000 - ((this.getIdealStatus() - this.getRepairStatus()) * 1000)); this.mEfficiencyIncrease = 10000; if (tRecipe.mEUt <= 16) { - this.mEUt = (tRecipe.mEUt * (1 << (tTier - 1)) * (1 << (tTier - 1))); + this.lEUt = (tRecipe.mEUt * (1L << (tTier - 1)) * (1L << (tTier - 1))); this.mMaxProgresstime = (tRecipe.mDuration / (1 << (tTier - 1))); } else { - this.mEUt = tRecipe.mEUt; + this.lEUt = tRecipe.mEUt; this.mMaxProgresstime = tRecipe.mDuration; - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= 2; } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); this.mOutputFluids = new FluidStack[] {tRecipe.getFluidOutput(0)}; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java index 86fd24f682..52c8919691 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java @@ -263,16 +263,16 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas this.mEfficiency = (10000 - ((getIdealStatus() - getRepairStatus()) * 1000)); this.mEfficiencyIncrease = 10000; - this.mEUt = tRecipe.mEUt; + this.lEUt = tRecipe.mEUt; this.mMaxProgresstime = tRecipe.mDuration; - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= 2; } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java index 8fcecf8721..2919ecd5fe 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java @@ -500,7 +500,7 @@ public class GregtechMetaTileEntity_IndustrialFishingPond } // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -576,7 +576,7 @@ public class GregtechMetaTileEntity_IndustrialFishingPond float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); this.mMaxProgresstime = (int) (20 * tTimeFactor * 4); - this.mEUt = (int) Math.ceil(tTotalEUt); + this.lEUt = (long) Math.ceil(tTotalEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; @@ -586,18 +586,18 @@ public class GregtechMetaTileEntity_IndustrialFishingPond tTier = CORE.ConfigSwitches.requireControlCores ? (byte) aControlCoreTier : tTierOld; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1L << tTier - 1) * (1L << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= 2; } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialRockBreaker.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialRockBreaker.java index fcd7f5b452..44ba0c347c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialRockBreaker.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialRockBreaker.java @@ -307,7 +307,7 @@ public class GregtechMetaTileEntity_IndustrialRockBreaker FluidStack[] aFluidInputs = new FluidStack[] {}; // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -374,24 +374,24 @@ public class GregtechMetaTileEntity_IndustrialRockBreaker float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); - this.mEUt = (int) Math.ceil(tTotalEUt); + this.lEUt = (long) Math.ceil(tTotalEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1L << tTier - 1) * (1L << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= 2; } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java index cf28aaf456..d5a7316b28 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java @@ -312,7 +312,7 @@ public class GregtechMetaTileEntity_LargeRocketEngine } this.fuelValue = aFuel.mSpecialValue * 3; this.fuelRemaining = hatchFluid1.amount; - this.mEUt = (int) ((this.mEfficiency < 2000) ? 0 : GT_Values.V[5] << 1); + this.lEUt = ((this.mEfficiency < 2000) ? 0 : GT_Values.V[5] << 1); this.mProgresstime = 1; this.mMaxProgresstime = 1; this.mEfficiencyIncrease = this.euProduction / 2000; @@ -322,14 +322,14 @@ public class GregtechMetaTileEntity_LargeRocketEngine } else { this.mEfficiencyIncrease = this.euProduction / 2000; this.freeFuelTicks--; - this.mEUt = (int) ((this.mEfficiency < 1000) ? 0 : GT_Values.V[5] << 1); + this.lEUt = ((this.mEfficiency < 1000) ? 0 : GT_Values.V[5] << 1); this.mProgresstime = 1; this.mMaxProgresstime = 1; return true; } } } - this.mEUt = 0; + this.lEUt = 0; this.mEfficiency = 0; this.freeFuelTicks = 0; log("Bad Return 3"); @@ -558,7 +558,7 @@ public class GregtechMetaTileEntity_LargeRocketEngine "Current Air: " + getAir(), "Current Pollution: " + getPollutionPerTick(null), "Time until next fuel consumption: " + this.freeFuelTicks, - "Current Output: " + this.mEUt * this.mEfficiency / 10000 + " EU/t", + "Current Output: " + this.lEUt * this.mEfficiency / 10000 + " EU/t", "Fuel Consumption: " + (this.fuelConsumption) + "L/s", "Fuel Value: " + this.fuelValue + " EU/L", "Fuel Remaining: " + this.fuelRemaining + " Litres", diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java index 523560871f..cdeebe7f40 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java @@ -149,7 +149,7 @@ public class GregtechMetaTileEntity_LargeSemifluidGenerator fuelValue = aFuel.mSpecialValue; fuelRemaining = hatchFluid.amount; // Record available fuel - this.mEUt = mEfficiency < 2000 ? 0 : newEUt; // Output 0 if startup is less than 20% + this.lEUt = mEfficiency < 2000 ? 0 : newEUt; // Output 0 if startup is less than 20% this.mProgresstime = 1; this.mMaxProgresstime = 1; this.mEfficiencyIncrease = 15; @@ -157,7 +157,7 @@ public class GregtechMetaTileEntity_LargeSemifluidGenerator } } - this.mEUt = 0; + this.lEUt = 0; this.mEfficiency = 0; return false; } @@ -299,7 +299,7 @@ public class GregtechMetaTileEntity_LargeSemifluidGenerator public String[] getExtraInfoData() { return new String[] { "Large Semifluid Generator", - "Current Output: " + mEUt * mEfficiency / 10000 + " EU/t", + "Current Output: " + lEUt * mEfficiency / 10000 + " EU/t", "Fuel Consumption: " + fuelConsumption + "L/t", "Fuel Value: " + fuelValue + " EU/L", "Fuel Remaining: " + fuelRemaining + " Litres", diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java index 58ef8e52f7..78b8c64ab3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java @@ -338,21 +338,21 @@ public class GregtechMetaTileEntity_MassFabricator aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent); float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); - this.mEUt = (int) Math.ceil(tTotalEUt); + this.lEUt = (long) Math.ceil(tTotalEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1 << tTier - 1) * (1 << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= 4; } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); // Collect output item types @@ -421,7 +421,7 @@ public class GregtechMetaTileEntity_MassFabricator // Based on the Processing Array. A bit overkill, but very flexible. // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -488,24 +488,24 @@ public class GregtechMetaTileEntity_MassFabricator float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); - this.mEUt = (int) Math.ceil(tTotalEUt); + this.lEUt = (long) Math.ceil(tTotalEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1L << tTier - 1) * (1L << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= 4; } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java index bf1b923a81..536f87f06e 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java @@ -376,7 +376,7 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<Gregt } // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -404,7 +404,7 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase<Gregt // -- Try not to fail after this point - inputs have already been consumed! -- this.mMaxProgresstime = (int) (tRecipe.mDuration); - this.mEUt = 0; + this.lEUt = 0; this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; Logger.INFO("Recipe time: " + this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java index fd7ebd6044..f64f0feab7 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java @@ -139,7 +139,7 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G } } - this.mEUt = -8000; + this.lEUt = -8000; this.mMaxProgresstime = 1; this.mEfficiencyIncrease = 10000; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java index 145e3c09e9..da8804072c 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java @@ -627,7 +627,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt // Based on the Processing Array. A bit overkill, but very flexible. // Reset outputs and progress stats - this.mEUt = 0; + this.lEUt = 0; this.mMaxProgresstime = 0; this.mOutputItems = new ItemStack[] {}; this.mOutputFluids = new FluidStack[] {}; @@ -736,24 +736,24 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase<Gregt float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent); this.mMaxProgresstime = (int) (tRecipe.mDuration * tTimeFactor); - this.mEUt = (int) Math.ceil(tTotalEUt); + this.lEUt = (long) Math.ceil(tTotalEUt); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; // Overclock - if (this.mEUt <= 16) { - this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1)); + if (this.lEUt <= 16) { + this.lEUt = (this.lEUt * (1 << tTier - 1) * (1 << tTier - 1)); this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1)); } else { - while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { - this.mEUt *= 4; + while (this.lEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { + this.lEUt *= 4; this.mMaxProgresstime /= 2; } } - if (this.mEUt > 0) { - this.mEUt = (-this.mEUt); + if (this.lEUt > 0) { + this.lEUt = (-this.lEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java index cb011118b8..b55d61baab 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Plasma.java @@ -148,7 +148,7 @@ public class GT_MTE_LargeTurbine_Plasma extends GregtechMetaTileEntity_LargerTur // How much the turbine should be producing with this flow int newPower = fluidIntoPower(tFluids, optFlow, baseEff, flowMultipliers); - int difference = newPower - this.mEUt; // difference between current output and new output + long difference = newPower - this.lEUt; // difference between current output and new output // Magic numbers: can always change by at least 10 eu/t, but otherwise by at most 1 percent of the // difference in power level (per tick) // This is how much the turbine can actually change during this tick @@ -157,12 +157,12 @@ public class GT_MTE_LargeTurbine_Plasma extends GregtechMetaTileEntity_LargerTur if (Math.abs(difference) > maxChangeAllowed) { // If this difference is too big, use the maximum allowed change int change = maxChangeAllowed * (difference > 0 ? 1 : -1); // Make the change positive or negative. - this.mEUt += change; // Apply the change + this.lEUt += change; // Apply the change } else { - this.mEUt = newPower; + this.lEUt = newPower; } - if (this.mEUt <= 0) { - this.mEUt = 0; + if (this.lEUt <= 0) { + this.lEUt = 0; this.mEfficiency = 0; log("Running checkRecipeGeneric(bad-2)"); return false; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java index 68c513f30e..d6ce8e4bb2 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java @@ -513,7 +513,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase int newPower = fluidIntoPower(tFluids, optFlow, baseEff, flowMultipliers); // log("Bumped newPower to "+newPower); // log("New Power: "+newPower); - int difference = newPower - this.mEUt; // difference between current output and new output + long difference = newPower - this.lEUt; // difference between current output and new output // log("diff: "+difference); // Magic numbers: can always change by at least 10 eu/t, but otherwise by at most 1 percent of the @@ -525,14 +525,14 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase if (Math.abs(difference) > maxChangeAllowed) { // If this difference is too big, use the maximum allowed change int change = maxChangeAllowed * (difference > 0 ? 1 : -1); // Make the change positive or negative. - this.mEUt += change; // Apply the change + this.lEUt += change; // Apply the change // log("Applied power change."); } else { - this.mEUt = newPower; + this.lEUt = newPower; // log("Using same value."); } - if (this.mEUt <= 0) { - this.mEUt = 0; + if (this.lEUt <= 0) { + this.lEUt = 0; this.mEfficiency = 0; log("Running checkRecipeGeneric(bad-2)"); // stopMachine(); @@ -588,7 +588,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase // In XL turbines, durability loss is around 5.2-5.3x faster than in singles // To compensate for that, the mEU/t scaling is divided by 5 to make it only slightly faster for (int i = 0; i < getTurbineDamageMultiplier(); i++) { - aHatch.damageTurbine(mEUt / 5, damageFactorLow, damageFactorHigh); + aHatch.damageTurbine(lEUt / 5, damageFactorLow, damageFactorHigh); } } } @@ -668,7 +668,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase String[] ret = new String[] { // 8 Lines available for information panels - tRunning + ": " + EnumChatFormatting.RED + (((long) mEUt * mEfficiency) / 10000) + EnumChatFormatting.RESET + tRunning + ": " + EnumChatFormatting.RED + ((lEUt * mEfficiency) / 10000) + EnumChatFormatting.RESET + " EU/t", tMaintainance, StatCollector.translateToLocal("GT5U.turbine.efficiency") + ": " + EnumChatFormatting.YELLOW @@ -861,8 +861,8 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase * Called every tick the Machine runs */ public boolean onRunningTick(ItemStack aStack) { - if (mEUt > 0) { - addEnergyOutput(((long) mEUt * mEfficiency) / 10000); + if (lEUt > 0) { + addEnergyOutput((lEUt * mEfficiency) / 10000); return true; } return false; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java index 4a02190bf5..07518b7ea9 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java @@ -565,7 +565,7 @@ public class GregtechMetaTileEntity_PowerSubStationController public boolean checkRecipe(final ItemStack aStack) { this.mProgresstime = 0; this.mMaxProgresstime = 200; - this.mEUt = 0; + this.lEUt = 0; this.mEfficiencyIncrease = 10000; this.fixAllMaintenanceIssue(); return true; |