mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 10:03:45 +01:00
Added Option to fill infinite resources (#2071)
- Added fill infinite config option - Option to make hose pulley fill infinite sources
This commit is contained in:
parent
72a8e24cf7
commit
2d3b1e36f9
3 changed files with 8 additions and 2 deletions
|
@ -127,7 +127,7 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour {
|
|||
boolean evaporate = world.dimensionType()
|
||||
.ultraWarm() && fluid.is(FluidTags.WATER);
|
||||
|
||||
if (infinite || evaporate) {
|
||||
if ((!fillInfinite() && infinite) || evaporate) {
|
||||
FluidState fluidState = world.getFluidState(rootPos);
|
||||
boolean equivalentTo = fluidState.getType()
|
||||
.isSame(fluid);
|
||||
|
|
|
@ -90,7 +90,11 @@ public abstract class FluidManipulationBehaviour extends TileEntityBehaviour {
|
|||
protected int maxBlocks() {
|
||||
return AllConfigs.SERVER.fluids.hosePulleyBlockThreshold.get();
|
||||
}
|
||||
|
||||
|
||||
protected boolean fillInfinite() {
|
||||
return AllConfigs.SERVER.fluids.fillInfinite.get();
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
if (affectedArea != null)
|
||||
scheduleUpdatesInAffectedArea();
|
||||
|
|
|
@ -9,6 +9,7 @@ public class CFluids extends ConfigBase {
|
|||
|
||||
public ConfigInt hosePulleyBlockThreshold = i(10000, -1, "hosePulleyBlockThreshold", Comments.blocks,
|
||||
Comments.toDisable, Comments.hosePulleyBlockThreshold);
|
||||
public ConfigBool fillInfinite = b(false, "fillInfinite",Comments.fillInfinite);
|
||||
public ConfigInt hosePulleyRange = i(128, 1, "hosePulleyRange", Comments.blocks, Comments.hosePulleyRange);
|
||||
|
||||
@Override
|
||||
|
@ -28,6 +29,7 @@ public class CFluids extends ConfigBase {
|
|||
static String toDisable = "[-1 to disable this behaviour]";
|
||||
static String hosePulleyBlockThreshold =
|
||||
"The minimum amount of fluid blocks the hose pulley needs to find before deeming it an infinite source.";
|
||||
static String fillInfinite="Does hose pulley poor fluids to the world even if it is an infinite source?";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue