Separate config options for placing source blocks (#5035)

This commit is contained in:
attackeight 2023-07-03 12:04:57 -04:00 committed by GitHub
parent 28fe2fa148
commit d16b3ebe34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -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()

View File

@ -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);

View File

@ -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.";
} }
} }