mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-26 15:06:42 +01:00
Separate config options for placing source blocks (#5035)
This commit is contained in:
parent
28fe2fa148
commit
d16b3ebe34
3 changed files with 7 additions and 5 deletions
|
@ -219,7 +219,7 @@ public class OpenEndedPipe extends FlowSource {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!AllConfigs.server().fluids.placeFluidSourceBlocks.get())
|
if (!AllConfigs.server().fluids.pipesPlaceFluidSourceBlocks.get())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
world.setBlock(outputPos, fluid.getFluid()
|
world.setBlock(outputPos, fluid.getFluid()
|
||||||
|
|
|
@ -137,7 +137,7 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour {
|
||||||
int maxBlocks = maxBlocks();
|
int maxBlocks = maxBlocks();
|
||||||
boolean evaporate = world.dimensionType()
|
boolean evaporate = world.dimensionType()
|
||||||
.ultraWarm() && FluidHelper.isTag(fluid, FluidTags.WATER);
|
.ultraWarm() && FluidHelper.isTag(fluid, FluidTags.WATER);
|
||||||
boolean canPlaceSources = AllConfigs.server().fluids.placeFluidSourceBlocks.get();
|
boolean canPlaceSources = AllConfigs.server().fluids.fluidFillPlaceFluidSourceBlocks.get();
|
||||||
|
|
||||||
if ((!fillInfinite() && infinite) || evaporate || !canPlaceSources) {
|
if ((!fillInfinite() && infinite) || evaporate || !canPlaceSources) {
|
||||||
FluidState fluidState = world.getFluidState(rootPos);
|
FluidState fluidState = world.getFluidState(rootPos);
|
||||||
|
|
|
@ -17,7 +17,8 @@ public class CFluids extends ConfigBase {
|
||||||
public final ConfigEnum<BottomlessFluidMode> bottomlessFluidMode = e(BottomlessFluidMode.ALLOW_BY_TAG, "bottomlessFluidMode",
|
public final ConfigEnum<BottomlessFluidMode> bottomlessFluidMode = e(BottomlessFluidMode.ALLOW_BY_TAG, "bottomlessFluidMode",
|
||||||
Comments.bottomlessFluidMode);
|
Comments.bottomlessFluidMode);
|
||||||
|
|
||||||
public ConfigBool placeFluidSourceBlocks = b(true, "placeFluidSourceBlocks", Comments.placeFluidSourceBlocks);
|
public ConfigBool fluidFillPlaceFluidSourceBlocks = b(true, "fluidFillPlaceFluidSourceBlocks", Comments.fluidFillPlaceFluidSourceBlocks);
|
||||||
|
public ConfigBool pipesPlaceFluidSourceBlocks = b(true, "pipesPlaceFluidSourceBlocks", Comments.pipesPlaceFluidSourceBlocks);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
@ -40,7 +41,8 @@ public class CFluids extends ConfigBase {
|
||||||
static String fillInfinite = "Whether hose pulleys should continue filling up above-threshold sources.";
|
static String fillInfinite = "Whether hose pulleys should continue filling up above-threshold sources.";
|
||||||
static String bottomlessFluidMode = "Configure which fluids can be drained infinitely.";
|
static String bottomlessFluidMode = "Configure which fluids can be drained infinitely.";
|
||||||
|
|
||||||
static String placeFluidSourceBlocks = "Whether open-ended pipes and hose pulleys should be allowed to place fluid sources.";
|
static String fluidFillPlaceFluidSourceBlocks = "Whether hose pulleys should be allowed to place fluid sources.";
|
||||||
|
static String pipesPlaceFluidSourceBlocks = "Whether open-ended pipes should be allowed to place fluid sources.";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue