From d0c004e85ff85e2b3e5a027da109c9e732dfd569 Mon Sep 17 00:00:00 2001 From: Tom Prince Date: Sun, 12 Jan 2025 14:00:26 -0700 Subject: [PATCH] s/dampingWhenWaiting/regressWhenWaiting/ --- .../gtceu/api/machine/SimpleGeneratorMachine.java | 2 +- .../gtceu/api/machine/feature/IRecipeLogicMachine.java | 2 +- .../gregtechceu/gtceu/api/machine/trait/RecipeLogic.java | 6 +++--- .../api/registry/registrate/MultiblockMachineBuilder.java | 4 ++-- .../gtceu/common/machine/electric/AirScrubberMachine.java | 2 +- .../electric/research/ResearchStationMachine.java | 2 +- .../multiblock/generator/LargeCombustionEngineMachine.java | 2 +- .../machine/multiblock/generator/LargeTurbineMachine.java | 2 +- .../gtceu/common/machine/trait/CleanroomLogic.java | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/gregtechceu/gtceu/api/machine/SimpleGeneratorMachine.java b/src/main/java/com/gregtechceu/gtceu/api/machine/SimpleGeneratorMachine.java index 92b78a8ccd..0213008fb7 100644 --- a/src/main/java/com/gregtechceu/gtceu/api/machine/SimpleGeneratorMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/api/machine/SimpleGeneratorMachine.java @@ -122,7 +122,7 @@ public static ModifierFunction recipeModifier(@NotNull MetaMachine machine, @Not } @Override - public boolean dampingWhenWaiting() { + public boolean regressWhenWaiting() { return false; } diff --git a/src/main/java/com/gregtechceu/gtceu/api/machine/feature/IRecipeLogicMachine.java b/src/main/java/com/gregtechceu/gtceu/api/machine/feature/IRecipeLogicMachine.java index e3b85abe06..b6a670e90f 100644 --- a/src/main/java/com/gregtechceu/gtceu/api/machine/feature/IRecipeLogicMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/api/machine/feature/IRecipeLogicMachine.java @@ -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(); } diff --git a/src/main/java/com/gregtechceu/gtceu/api/machine/trait/RecipeLogic.java b/src/main/java/com/gregtechceu/gtceu/api/machine/trait/RecipeLogic.java index 11040a748d..b4a9a77f5b 100644 --- a/src/main/java/com/gregtechceu/gtceu/api/machine/trait/RecipeLogic.java +++ b/src/main/java/com/gregtechceu/gtceu/api/machine/trait/RecipeLogic.java @@ -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); @@ -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 { diff --git a/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/MultiblockMachineBuilder.java b/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/MultiblockMachineBuilder.java index 85216242c7..708509cf6f 100644 --- a/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/MultiblockMachineBuilder.java +++ b/src/main/java/com/gregtechceu/gtceu/api/registry/registrate/MultiblockMachineBuilder.java @@ -369,8 +369,8 @@ public MultiblockMachineBuilder afterWorking(Consumer after } @Override - public MultiblockMachineBuilder regressWhenWaiting(boolean dampingWhenWaiting) { - return (MultiblockMachineBuilder) super.regressWhenWaiting(dampingWhenWaiting); + public MultiblockMachineBuilder regressWhenWaiting(boolean regressWhenWaiting) { + return (MultiblockMachineBuilder) super.regressWhenWaiting(regressWhenWaiting); } @Override diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/AirScrubberMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/AirScrubberMachine.java index 620c31e7f6..844a879b34 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/electric/AirScrubberMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/electric/AirScrubberMachine.java @@ -46,7 +46,7 @@ public AirScrubberMachine(IMachineBlockEntity holder, int tier, Object... args) } @Override - public boolean dampingWhenWaiting() { + public boolean regressWhenWaiting() { return false; } diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/research/ResearchStationMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/research/ResearchStationMachine.java index da8cc09883..dcdce3fa6d 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/research/ResearchStationMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/electric/research/ResearchStationMachine.java @@ -102,7 +102,7 @@ public void onStructureInvalid() { } @Override - public boolean dampingWhenWaiting() { + public boolean regressWhenWaiting() { return false; } diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/generator/LargeCombustionEngineMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/generator/LargeCombustionEngineMachine.java index 21cd9eafd4..bcdc7a388c 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/generator/LargeCombustionEngineMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/generator/LargeCombustionEngineMachine.java @@ -181,7 +181,7 @@ public boolean onWorking() { } @Override - public boolean dampingWhenWaiting() { + public boolean regressWhenWaiting() { return false; } diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/generator/LargeTurbineMachine.java b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/generator/LargeTurbineMachine.java index 62d6ffca69..7c2eb20929 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/generator/LargeTurbineMachine.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/generator/LargeTurbineMachine.java @@ -127,7 +127,7 @@ public static ModifierFunction recipeModifier(@NotNull MetaMachine machine, @Not } @Override - public boolean dampingWhenWaiting() { + public boolean regressWhenWaiting() { return false; } diff --git a/src/main/java/com/gregtechceu/gtceu/common/machine/trait/CleanroomLogic.java b/src/main/java/com/gregtechceu/gtceu/common/machine/trait/CleanroomLogic.java index f5eec60abb..e12299ede6 100644 --- a/src/main/java/com/gregtechceu/gtceu/common/machine/trait/CleanroomLogic.java +++ b/src/main/java/com/gregtechceu/gtceu/common/machine/trait/CleanroomLogic.java @@ -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 {