Skip to content

Commit

Permalink
java doc work
Browse files Browse the repository at this point in the history
  • Loading branch information
YoungOnionMC committed Dec 11, 2024
1 parent c37a0ad commit 5a6c471
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,12 @@ static OverclockingLogic create(double durationFactor, double voltageFactor, boo
}

/**
* Determines the maximum number of overclocks that can be performed for a recipe.
* Then performs overclocking on the Recipe.
* Determines the maximum number of overclocks that can be performed for a recipe and applies them.
*
* @param EUt voltage of the recipe
* @param duration duration of the recipe
* @param maxOverclockVoltage max voltage of the machine running
* @return the result of the overclock
*/
default OCResult performOverclocking(long EUt, int duration, long maxOverclockVoltage, int maxParallels) {
int recipeTier = GTUtil.getTierByVoltage(EUt);
Expand All @@ -101,10 +105,10 @@ default OCResult performOverclocking(long EUt, int duration, long maxOverclockVo
* <li>Limit {@code duration} to {@code 1} tick, and stop overclocking early if needed
*
* @param params the overclocking parameters
* @param result the result of the overclock
* @param maxVoltage the maximum voltage allowed to be overclocked to
* @param durationFactor the factor to multiply duration by
* @param voltageFactor the factor to multiply voltage by
* @return the result of the overclock
*/
static OCResult standardOverclockingLogic(@NotNull OCParams params, long maxVoltage, double durationFactor,
double voltageFactor) {
Expand Down Expand Up @@ -147,10 +151,10 @@ static OCResult standardOverclockingLogic(@NotNull OCParams params, long maxVolt
* overclocks that would have {@code duration < 1}
*
* @param params the overclocking parameters
* @param result the result of the overclock
* @param maxVoltage the maximum voltage allowed to be overclocked to
* @param durationFactor the factor to multiply duration by
* @param voltageFactor the factor to multiply voltage by
* @return the result of the overclock
*/
static OCResult subTickNonParallelOC(@NotNull OCParams params, long maxVoltage, double durationFactor,
double voltageFactor) {
Expand Down Expand Up @@ -194,10 +198,10 @@ static OCResult subTickNonParallelOC(@NotNull OCParams params, long maxVoltage,
* <li>Parallel amount per overclock is {@code 1 / durationFactor}
*
* @param params the overclocking parameters
* @param result the result of the overclock
* @param maxVoltage the maximum voltage allowed to be overclocked to
* @param durationFactor the factor to multiply duration by
* @param voltageFactor the factor to multiply voltage by
* @return the result of the overclock
*/
static OCResult subTickParallelOC(@NotNull OCParams params, long maxVoltage, double durationFactor,
double voltageFactor) {
Expand Down Expand Up @@ -308,6 +312,8 @@ static OCResult heatingCoilOC(@NotNull OCParams params, long maxVoltage, int rec
}

/**
* Finds the coil discount amount based on the recipe temp.
*
* @param recipeTemp the required temperature of the recipe
* @param machineTemp the temperature provided by the machine
* @return the amount of EU/t discounts to apply
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,3 @@ public RecipeModifierList(RecipeModifier... modifiers) {
return result;
}
}
//
// if (modifiedRecipe != null && result.getDuration() != 0) {
// if (modifiedRecipe.data.getBoolean("duration_is_total_cwu")) {
// modifiedRecipe.duration = (int) (modifiedRecipe.duration * (1.f - .025f * result.getOcLevel()));
// } else {
// modifiedRecipe.duration = result.getDuration();
// }
// if (result.getEut() > 0) {
// modifiedRecipe.tickInputs.put(EURecipeCapability.CAP, List.of(new Content(result.getEut(),
// ChanceLogic.getMaxChancedValue(), ChanceLogic.getMaxChancedValue(), 0, null, null)));
// } else if (result.getEut() < 0) {
// modifiedRecipe.tickOutputs.put(EURecipeCapability.CAP, List.of(new Content(-result.getEut(),
// ChanceLogic.getMaxChancedValue(), ChanceLogic.getMaxChancedValue(), 0, null, null)));
// }
//
// if (result.getParallel() > 1) {
// modifiedRecipe = ParallelLogic.applyParallel(machine, modifiedRecipe, result.getParallel(), false)
// .getFirst();
// }
// modifiedRecipe.ocLevel = result.getOcLevel();
// }
// result.reset();

0 comments on commit 5a6c471

Please sign in to comment.