extra check to make sure pipes don't place fluids they shouldn't

This commit is contained in:
IThundxr 2024-08-24 10:46:45 -04:00
parent 522dbc7f37
commit 08f8d3b0f5
No known key found for this signature in database
GPG Key ID: E291EC97BAF935E6

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;