Skip to content

Commit

Permalink
s/dampingWhenWaiting/regressWhenWaiting/
Browse files Browse the repository at this point in the history
  • Loading branch information
tomprince committed Jan 12, 2025
1 parent e24d925 commit d0c004e
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public static ModifierFunction recipeModifier(@NotNull MetaMachine machine, @Not
}

@Override
public boolean dampingWhenWaiting() {
public boolean regressWhenWaiting() {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ default void afterWorking() {
/**
* Whether progress decrease when machine is waiting for pertick ingredients. (e.g. lack of EU)
*/
default boolean dampingWhenWaiting() {
default boolean regressWhenWaiting() {
return self().getDefinition().isRegressWhenWaiting();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public void handleRecipeWorking() {
setWaiting(result.reason().get());
}
if (isWaiting()) {
doDamping();
doRegressing();
}
if (last == Status.WORKING && getStatus() != Status.WORKING) {
lastRecipe.postWorking(machine);
Expand All @@ -279,8 +279,8 @@ public void handleRecipeWorking() {
}
}

protected void doDamping() {
if (progress > 0 && machine.dampingWhenWaiting()) {
protected void doRegressing() {
if (progress > 0 && machine.regressWhenWaiting()) {
if (ConfigHolder.INSTANCE.machines.recipeProgressLowEnergy) {
this.progress = 1;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@ public MultiblockMachineBuilder afterWorking(Consumer<IRecipeLogicMachine> after
}

@Override
public MultiblockMachineBuilder regressWhenWaiting(boolean dampingWhenWaiting) {
return (MultiblockMachineBuilder) super.regressWhenWaiting(dampingWhenWaiting);
public MultiblockMachineBuilder regressWhenWaiting(boolean regressWhenWaiting) {
return (MultiblockMachineBuilder) super.regressWhenWaiting(regressWhenWaiting);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public AirScrubberMachine(IMachineBlockEntity holder, int tier, Object... args)
}

@Override
public boolean dampingWhenWaiting() {
public boolean regressWhenWaiting() {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void onStructureInvalid() {
}

@Override
public boolean dampingWhenWaiting() {
public boolean regressWhenWaiting() {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public boolean onWorking() {
}

@Override
public boolean dampingWhenWaiting() {
public boolean regressWhenWaiting() {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public static ModifierFunction recipeModifier(@NotNull MetaMachine machine, @Not
}

@Override
public boolean dampingWhenWaiting() {
public boolean regressWhenWaiting() {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void serverTick() {
if (maintenanceMachine == null || maintenanceMachine.getNumMaintenanceProblems() < 6 || zone != null) {
// drain the energy
if (!consumeEnergy()) {
if (progress > 0 && machine.dampingWhenWaiting()) {
if (progress > 0 && machine.regressWhenWaiting()) {
if (ConfigHolder.INSTANCE.machines.recipeProgressLowEnergy) {
this.progress = 1;
} else {
Expand Down

0 comments on commit d0c004e

Please sign in to comment.