Merge pull request #6850 from IThundxr/mc1.18/fluid-fix

Extra check to make sure pipes don't place fluids they shouldn't
This commit is contained in:
simibubi 2024-08-25 11:11:39 +02:00 committed by GitHub
commit 9f6307c355
Failed to generate hash of commit

View file

@ -37,6 +37,7 @@ import net.minecraft.world.level.block.CampfireBlock;
import net.minecraft.world.level.block.LiquidBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.material.FlowingFluid;
import net.minecraft.world.level.material.FluidState;
import net.minecraft.world.level.material.Fluids;
import net.minecraft.world.phys.AABB;
@ -188,6 +189,8 @@ public class OpenEndedPipe extends FlowSource {
return false;
if (fluid.isEmpty())
return false;
if (!(fluid.getFluid() instanceof FlowingFluid))
return false;
if (!FluidHelper.hasBlockState(fluid.getFluid()))
return true;