diff --git a/src/main/java/com/simibubi/create/content/fluids/FluidPropagator.java b/src/main/java/com/simibubi/create/content/fluids/FluidPropagator.java index bad5e0007..b5811a2eb 100644 --- a/src/main/java/com/simibubi/create/content/fluids/FluidPropagator.java +++ b/src/main/java/com/simibubi/create/content/fluids/FluidPropagator.java @@ -174,7 +174,7 @@ public class FluidPropagator { if (PumpBlock.isPump(connectedState) && connectedState.getValue(PumpBlock.FACING) .getAxis() == side.getAxis()) return false; - if (VanillaFluidTargets.shouldPipesConnectTo(connectedState)) + if (VanillaFluidTargets.canProvideFluidWithoutCapability(connectedState)) return true; if (BlockHelper.hasBlockSolidSide(connectedState, reader, connectedPos, side.getOpposite()) && !AllBlockTags.FAN_TRANSPARENT.matches(connectedState)) diff --git a/src/main/java/com/simibubi/create/content/fluids/pipes/FluidPipeBlock.java b/src/main/java/com/simibubi/create/content/fluids/pipes/FluidPipeBlock.java index 17a3b5280..c505b3c71 100644 --- a/src/main/java/com/simibubi/create/content/fluids/pipes/FluidPipeBlock.java +++ b/src/main/java/com/simibubi/create/content/fluids/pipes/FluidPipeBlock.java @@ -183,7 +183,7 @@ public class FluidPipeBlock extends PipeBlock implements SimpleWaterloggedBlock, Direction direction) { if (FluidPropagator.hasFluidCapability(world, neighbourPos, direction.getOpposite())) return true; - if (VanillaFluidTargets.shouldPipesConnectTo(neighbour)) + if (VanillaFluidTargets.canProvideFluidWithoutCapability(neighbour)) return true; FluidTransportBehaviour transport = BlockEntityBehaviour.get(world, neighbourPos, FluidTransportBehaviour.TYPE); BracketedBlockEntityBehaviour bracket = diff --git a/src/main/java/com/simibubi/create/content/fluids/pipes/VanillaFluidTargets.java b/src/main/java/com/simibubi/create/content/fluids/pipes/VanillaFluidTargets.java index d971b9b66..a20a4e786 100644 --- a/src/main/java/com/simibubi/create/content/fluids/pipes/VanillaFluidTargets.java +++ b/src/main/java/com/simibubi/create/content/fluids/pipes/VanillaFluidTargets.java @@ -5,9 +5,9 @@ import static net.minecraft.world.level.block.state.properties.BlockStatePropert import com.simibubi.create.AllFluids; import net.minecraft.core.BlockPos; -import net.minecraft.tags.BlockTags; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.LayeredCauldronBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.material.Fluids; @@ -15,10 +15,14 @@ import net.minecraftforge.fluids.FluidStack; public class VanillaFluidTargets { - public static boolean shouldPipesConnectTo(BlockState state) { + public static boolean canProvideFluidWithoutCapability(BlockState state) { if (state.hasProperty(BlockStateProperties.LEVEL_HONEY)) return true; - if (state.is(BlockTags.CAULDRONS)) + if (state.is(Blocks.CAULDRON)) + return true; + if (state.is(Blocks.LAVA_CAULDRON)) + return true; + if (state.is(Blocks.WATER_CAULDRON)) return true; return false; } @@ -31,13 +35,15 @@ public class VanillaFluidTargets { .getSource(), 250); } - if (state.getBlock() == Blocks.LAVA_CAULDRON) { + if (state.is(Blocks.LAVA_CAULDRON)) { if (!simulate) level.setBlock(pos, Blocks.CAULDRON.defaultBlockState(), 3); return new FluidStack(Fluids.LAVA, 1000); } - if (state.getBlock() == Blocks.WATER_CAULDRON) { + if (state.is(Blocks.WATER_CAULDRON) && state.getBlock() instanceof LayeredCauldronBlock lcb) { + if (!lcb.isFull(state)) + return FluidStack.EMPTY; if (!simulate) level.setBlock(pos, Blocks.CAULDRON.defaultBlockState(), 3); return new FluidStack(Fluids.WATER, 1000);