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

Commit

Permalink
Revert "new oc formula"
Browse files Browse the repository at this point in the history
This reverts commit 921c639.
  • Loading branch information
HoleFish committed Jan 27, 2024
1 parent 5dfa44b commit 933ae2f
Showing 1 changed file with 5 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -824,21 +824,6 @@ private int recipeProcessTimeCalculator(final long recipeTime, final long recipe
return (int) Math.max(recipeTimeDiscounted, 1.0);
}

private void overclockCalculator() {
// Perform 3x -> 3.4x -> 3.8x ... power exponent
double powerMultiplier = 1;
long ocPrecisionMultiplier = (long) pow(5, currentCircuitMultiplier);
for (int i = 0; i < currentCircuitMultiplier; i++) {
powerMultiplier *= 15 + 2 * i;
if (powerMultiplier * (15 + 2 * (i + 1)) > Long.MAX_VALUE) {
usedEU = usedEU.multiply(BigInteger.valueOf((long) powerMultiplier));
powerMultiplier = 1;
}
}
usedEU = usedEU.multiply(BigInteger.valueOf((long) powerMultiplier))
.divide(BigInteger.valueOf(ocPrecisionMultiplier));
}

@Override
public IStructureDefinition<GT_MetaTileEntity_EM_EyeOfHarmony> getStructure_EM() {
return STRUCTURE_DEFINITION;
Expand Down Expand Up @@ -1004,12 +989,8 @@ public GT_Multiblock_Tooltip_Builder createTooltip() {
.addInfo(TOOLTIP_BAR)
.addInfo("This multiblock can be overclocked by placing a programmed circuit into the input bus.")
.addInfo(
"Every OC will add 0.4 to power exponent. E.g. A circuit of 1 will provide 1 OC, 3x EU consumed and")
.addInfo(
"0.5x the time; a circuit of 2 will provide 2 OCs, 10.2x (3 x 3.4) EU consumed and 0.25x the time.")
.addInfo(
"All outputs are equal. All item and fluid output chances & amounts per recipe are unaffected.")
.addInfo(TOOLTIP_BAR)
"E.g. A circuit of 2 will provide 2 OCs, 16x EU consumed and 0.25x the time. All outputs are equal.")
.addInfo("All item and fluid output chances & amounts per recipe are unaffected.").addInfo(TOOLTIP_BAR)
.addInfo(
"If a recipe fails the EOH will output " + GREEN
+ "successChance * "
Expand Down Expand Up @@ -1260,10 +1241,10 @@ && getHydrogenStored() < currentRecipe.getHydrogenRequirement() * parallelAmount
.divide(BigInteger.valueOf(precisionMultiplier));
}
usedEU = BigInteger.valueOf((long) (-startEU * multiplier))
.multiply(BigInteger.valueOf((long) (powerMultiplier * precisionMultiplier)))
.multiply(
BigInteger.valueOf((long) Math.pow(4, currentCircuitMultiplier))
.multiply(BigInteger.valueOf((long) (powerMultiplier * precisionMultiplier))))
.divide(BigInteger.valueOf(precisionMultiplier));
// Calculate OC EU consumption multiplier and change usedEU
overclockCalculator();

// Remove EU from the users network.
if (!addEUToGlobalEnergyMap(userUUID, usedEU)) {
Expand Down

0 comments on commit 933ae2f

Please sign in to comment.