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

Commit

Permalink
Fix TT extended Multis using wrong exotic energy input hatches list (#…
Browse files Browse the repository at this point in the history
…237)

* fix TT extended Multis using wrong exotic energy input hatches list

* go away from using stream and use addAll
  • Loading branch information
BlueWeabo authored Aug 2, 2023
1 parent 086f7e4 commit 8fcd62b
Showing 1 changed file with 30 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1989,56 +1989,28 @@ public final boolean overclockAndPutValuesIn_EM(long EU, int time) { // TODO rev
return true;
} // Use in EM check recipe return statement if you want overclocking

@Override // same as gt sum of all hatches
public long getMaxInputVoltage() {
return getMaxInputVoltageSum();
}

// same as gt sum of all hatches
/**
* Use {@link #getMaxInputVoltage()}
*/
@Deprecated
public final long getMaxInputVoltageSum() {
long rVoltage = 0;
for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) {
if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {
rVoltage += tHatch.maxEUInput();
}
}
for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : eEnergyMulti) {
if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {
rVoltage += tHatch.maxEUInput();
}
}
return rVoltage;
return getMaxInputVoltage();
}

// new Method
/**
* Use {@link #getMaxInputEu()}
*/
@Deprecated
public final long getMaxInputEnergy() {
long energy = 0;
for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) {
if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {
energy += tHatch.maxEUInput() * tHatch.maxAmperesIn();
}
}
for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : eEnergyMulti) {
if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {
energy += tHatch.maxEUInput() * tHatch.maxAmperesIn();
}
}
return energy;
return getMaxInputEu();
}

/**
* Use {@link #getMaxInputEu()}
*/
@Deprecated
public final long getMaxInputEnergy_EM() {
long energy = 0;
for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches) {
if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {
energy += tHatch.maxEUInput();
}
}
for (GT_MetaTileEntity_Hatch_EnergyMulti tHatch : eEnergyMulti) {
if (GT_MetaTileEntity_MultiBlockBase.isValidMetaTileEntity(tHatch)) {
energy += tHatch.maxEUInput() * tHatch.Amperes;
}
}
return energy;
return getMaxInputEu();
}

// new Method
Expand All @@ -2055,6 +2027,21 @@ public final long getMaxAmpereFlowAtMinTierOfEnergyHatches() {
return eAmpereFlow;
}

@Override
public List<GT_MetaTileEntity_Hatch> getExoticAndNormalEnergyHatchList() {
List<GT_MetaTileEntity_Hatch> list = new ArrayList<>();
list.addAll(mEnergyHatches);
list.addAll(eEnergyMulti);
return list;
}

@Override
public List<GT_MetaTileEntity_Hatch> getExoticEnergyHatches() {
List<GT_MetaTileEntity_Hatch> list = new ArrayList<>();
list.addAll(eEnergyMulti);
return list;
}

// endregion

// region convenience copies input and output EM
Expand Down

0 comments on commit 8fcd62b

Please sign in to comment.