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
Failed to generate hash of commit
3 changed files with 7 additions and 5 deletions

View file

@ -219,7 +219,7 @@ public class OpenEndedPipe extends FlowSource {
return true;
}
if (!AllConfigs.server().fluids.placeFluidSourceBlocks.get())
if (!AllConfigs.server().fluids.pipesPlaceFluidSourceBlocks.get())
return true;
world.setBlock(outputPos, fluid.getFluid()

View file

@ -137,7 +137,7 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour {
int maxBlocks = maxBlocks();
boolean evaporate = world.dimensionType()
.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) {
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",
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
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 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.";
}
}