Made drain speed configurable for #2863. Thanks to Ayutac.
This commit is contained in:
parent
7f415d3ec9
commit
cfff12afd6
2 changed files with 6 additions and 1 deletions
|
@ -40,6 +40,7 @@ import reborncore.common.fluid.container.FluidInstance;
|
||||||
import reborncore.common.fluid.container.ItemFluidInfo;
|
import reborncore.common.fluid.container.ItemFluidInfo;
|
||||||
import reborncore.common.util.Tank;
|
import reborncore.common.util.Tank;
|
||||||
import techreborn.TechReborn;
|
import techreborn.TechReborn;
|
||||||
|
import techreborn.config.TechRebornConfig;
|
||||||
import techreborn.init.TRBlockEntities;
|
import techreborn.init.TRBlockEntities;
|
||||||
import techreborn.init.TRContent;
|
import techreborn.init.TRContent;
|
||||||
|
|
||||||
|
@ -58,7 +59,8 @@ public class DrainBlockEntity extends MachineBaseBlockEntity implements IToolDro
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (world.getTime() % 10 == 0) {
|
int ticks = TechRebornConfig.ticksUntilNextDrainAttempt;
|
||||||
|
if (ticks > 0 && world.getTime() % ticks == 0) {
|
||||||
|
|
||||||
if (internalTank.isEmpty()) {
|
if (internalTank.isEmpty()) {
|
||||||
tryDrain();
|
tryDrain();
|
||||||
|
|
|
@ -552,6 +552,9 @@ public class TechRebornConfig {
|
||||||
@Config(config = "machines", category = "greenhouse_controller", key = "GreenhouseControllerEnergyPerBonemeal", comment = "Greenhouse Controller Energy usage Per Bonemeal")
|
@Config(config = "machines", category = "greenhouse_controller", key = "GreenhouseControllerEnergyPerBonemeal", comment = "Greenhouse Controller Energy usage Per Bonemeal")
|
||||||
public static int greenhouseControllerEnergyPerBonemeal = 50;
|
public static int greenhouseControllerEnergyPerBonemeal = 50;
|
||||||
|
|
||||||
|
@Config(config = "machines", category = "drain", key = "TicksUntilNextDrainAttempt", comment = "How many ticks should go between two drain attempts. 0 or negative will disable drain.")
|
||||||
|
public static int ticksUntilNextDrainAttempt = 10;
|
||||||
|
|
||||||
// Misc
|
// Misc
|
||||||
@Config(config = "misc", category = "general", key = "IC2TransformersStyle", comment = "Input from dots side, output from other sides, like in IC2.")
|
@Config(config = "misc", category = "general", key = "IC2TransformersStyle", comment = "Input from dots side, output from other sides, like in IC2.")
|
||||||
public static boolean IC2TransformersStyle = true;
|
public static boolean IC2TransformersStyle = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue