mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-14 14:34:16 +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
@ -127,7 +127,7 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour {
|
|||||||
boolean evaporate = world.dimensionType()
|
boolean evaporate = world.dimensionType()
|
||||||
.ultraWarm() && fluid.is(FluidTags.WATER);
|
.ultraWarm() && fluid.is(FluidTags.WATER);
|
||||||
|
|
||||||
if (infinite || evaporate) {
|
if ((!fillInfinite() && infinite) || evaporate) {
|
||||||
FluidState fluidState = world.getFluidState(rootPos);
|
FluidState fluidState = world.getFluidState(rootPos);
|
||||||
boolean equivalentTo = fluidState.getType()
|
boolean equivalentTo = fluidState.getType()
|
||||||
.isSame(fluid);
|
.isSame(fluid);
|
||||||
|
@ -91,6 +91,10 @@ public abstract class FluidManipulationBehaviour extends TileEntityBehaviour {
|
|||||||
return AllConfigs.SERVER.fluids.hosePulleyBlockThreshold.get();
|
return AllConfigs.SERVER.fluids.hosePulleyBlockThreshold.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean fillInfinite() {
|
||||||
|
return AllConfigs.SERVER.fluids.fillInfinite.get();
|
||||||
|
}
|
||||||
|
|
||||||
public void reset() {
|
public void reset() {
|
||||||
if (affectedArea != null)
|
if (affectedArea != null)
|
||||||
scheduleUpdatesInAffectedArea();
|
scheduleUpdatesInAffectedArea();
|
||||||
|
@ -9,6 +9,7 @@ public class CFluids extends ConfigBase {
|
|||||||
|
|
||||||
public ConfigInt hosePulleyBlockThreshold = i(10000, -1, "hosePulleyBlockThreshold", Comments.blocks,
|
public ConfigInt hosePulleyBlockThreshold = i(10000, -1, "hosePulleyBlockThreshold", Comments.blocks,
|
||||||
Comments.toDisable, Comments.hosePulleyBlockThreshold);
|
Comments.toDisable, Comments.hosePulleyBlockThreshold);
|
||||||
|
public ConfigBool fillInfinite = b(false, "fillInfinite",Comments.fillInfinite);
|
||||||
public ConfigInt hosePulleyRange = i(128, 1, "hosePulleyRange", Comments.blocks, Comments.hosePulleyRange);
|
public ConfigInt hosePulleyRange = i(128, 1, "hosePulleyRange", Comments.blocks, Comments.hosePulleyRange);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -28,6 +29,7 @@ public class CFluids extends ConfigBase {
|
|||||||
static String toDisable = "[-1 to disable this behaviour]";
|
static String toDisable = "[-1 to disable this behaviour]";
|
||||||
static String hosePulleyBlockThreshold =
|
static String hosePulleyBlockThreshold =
|
||||||
"The minimum amount of fluid blocks the hose pulley needs to find before deeming it an infinite source.";
|
"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 New Issue
Block a user