Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HoleFish authored Dec 5, 2023
1 parent a63cbb5 commit d930635
Showing 1 changed file with 13 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,39 +271,26 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
}
if (mStartUpCheck < 0) {
if (mMachine) {
long mStoredEUt = aBaseMetaTileEntity.getStoredEU();
long energyToMove = getSingleHatchPower();
if (this.mEnergyHatches != null) {
for (GT_MetaTileEntity_Hatch_Energy tHatch : filterValidMTEs(mEnergyHatches)) {
if (aBaseMetaTileEntity.getStoredEU()
+ (2048L * tierOverclock() * getMaxPara() * extraPara(100)) < maxEUStore()
&& tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(
2048L * tierOverclock() * getMaxPara() * extraPara(100),
false)) {
aBaseMetaTileEntity.increaseStoredEnergyUnits(
2048L * tierOverclock() * getMaxPara() * extraPara(100),
true);
} else if (aBaseMetaTileEntity.getStoredEU() + (2048L * tierOverclock()) < maxEUStore()
&& tHatch.getBaseMetaTileEntity()
.decreaseStoredEnergyUnits(2048L * tierOverclock(), false)) {
aBaseMetaTileEntity
.increaseStoredEnergyUnits(2048L * tierOverclock(), true);
}
if (aBaseMetaTileEntity.getStoredEU() + energyToMove < maxEUStore()
&& tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(energyToMove, false)) {
aBaseMetaTileEntity.increaseStoredEnergyUnits(energyToMove, true);
}
}
}
if (this.eEnergyMulti != null) {
for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : filterValidMTEs(eEnergyMulti)) {
if (aBaseMetaTileEntity.getStoredEU() + getSingleHatchPower() < maxEUStore() && tHatch
.getBaseMetaTileEntity().decreaseStoredEnergyUnits(getSingleHatchPower(), false)) {
aBaseMetaTileEntity.increaseStoredEnergyUnits(getSingleHatchPower(), true);
} else if (aBaseMetaTileEntity.getStoredEU() + (2048L * tierOverclock()) < maxEUStore()
&& tHatch.getBaseMetaTileEntity()
.decreaseStoredEnergyUnits(2048L * tierOverclock(), false)) {
aBaseMetaTileEntity
.increaseStoredEnergyUnits(2048L * tierOverclock(), true);
}
if (aBaseMetaTileEntity.getStoredEU() + energyToMove < maxEUStore()
&& tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(energyToMove, false)) {
aBaseMetaTileEntity.increaseStoredEnergyUnits(energyToMove, true);
}
}
}
if (aBaseMetaTileEntity.getStoredEU() <= 0 && mMaxProgresstime > 0) {
stopMachine();
if (mStoredEUt <= 0 && mMaxProgresstime > 0) {
criticalStopMachine();
}
if (mMaxProgresstime > 0) {
this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(-lEUt, true);
Expand Down Expand Up @@ -582,9 +569,7 @@ public String[] getInfoData() {
default -> EnumChatFormatting.GOLD + "V" + EnumChatFormatting.RESET;
};
float plasmaOut = 0;
int powerRequired = 0;
if (this.mLastRecipe != null) {
powerRequired = this.mLastRecipe.mEUt * this.para * overclock(this.mLastRecipe.mSpecialValue);
if (this.mLastRecipe.getFluidOutput(0) != null) {
plasmaOut = (float) this.mLastRecipe.getFluidOutput(0).amount / (float) this.mLastRecipe.mDuration
* this.para;
Expand All @@ -598,7 +583,7 @@ public String[] getInfoData() {
+ EnumChatFormatting.RESET,
StatCollector.translateToLocal("GT5U.fusion.req") + ": "
+ EnumChatFormatting.RED
+ GT_Utility.formatNumbers(powerRequired)
+ GT_Utility.formatNumbers(-lEUt)
+ EnumChatFormatting.RESET
+ "EU/t",
StatCollector.translateToLocal("GT5U.multiblock.energy") + ": "
Expand Down

0 comments on commit d930635

Please sign in to comment.