From d16b3ebe348c1150a9bc7c57fbcd2a55052150d4 Mon Sep 17 00:00:00 2001 From: attackeight <71084901+Attack8@users.noreply.github.com> Date: Mon, 3 Jul 2023 12:04:57 -0400 Subject: [PATCH] Separate config options for placing source blocks (#5035) --- .../com/simibubi/create/content/fluids/OpenEndedPipe.java | 2 +- .../content/fluids/transfer/FluidFillingBehaviour.java | 4 ++-- .../com/simibubi/create/infrastructure/config/CFluids.java | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/fluids/OpenEndedPipe.java b/src/main/java/com/simibubi/create/content/fluids/OpenEndedPipe.java index d2bea4eb2..ba9e3b3ff 100644 --- a/src/main/java/com/simibubi/create/content/fluids/OpenEndedPipe.java +++ b/src/main/java/com/simibubi/create/content/fluids/OpenEndedPipe.java @@ -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() diff --git a/src/main/java/com/simibubi/create/content/fluids/transfer/FluidFillingBehaviour.java b/src/main/java/com/simibubi/create/content/fluids/transfer/FluidFillingBehaviour.java index 398619387..5122acdfc 100644 --- a/src/main/java/com/simibubi/create/content/fluids/transfer/FluidFillingBehaviour.java +++ b/src/main/java/com/simibubi/create/content/fluids/transfer/FluidFillingBehaviour.java @@ -80,7 +80,7 @@ public class FluidFillingBehaviour extends FluidManipulationBehaviour { setLongValidationTimer(); return; } - + int maxBlocks = maxBlocks(); if (infinityCheckVisited.size() > maxBlocks && maxBlocks != -1 && !fillInfinite()) { @@ -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); diff --git a/src/main/java/com/simibubi/create/infrastructure/config/CFluids.java b/src/main/java/com/simibubi/create/infrastructure/config/CFluids.java index 0a8d82cd0..93e8fc2b3 100644 --- a/src/main/java/com/simibubi/create/infrastructure/config/CFluids.java +++ b/src/main/java/com/simibubi/create/infrastructure/config/CFluids.java @@ -17,7 +17,8 @@ public class CFluids extends ConfigBase { public final ConfigEnum 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."; } }