From 883bfe57abe8564af948b23a6b8a3a52e134b826 Mon Sep 17 00:00:00 2001 From: RainWarrior Date: Sun, 5 Jun 2016 11:15:05 +0300 Subject: [PATCH] Fixes #1984. --- .../java/net/minecraftforge/fluids/BlockFluidBase.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java b/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java index 136589f5c..2276bba3c 100644 --- a/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java +++ b/src/main/java/net/minecraftforge/fluids/BlockFluidBase.java @@ -4,6 +4,7 @@ import java.util.Map; import java.util.Random; import net.minecraft.block.Block; +import net.minecraft.block.BlockLiquid; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyInteger; @@ -529,9 +530,10 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock for (int i = 0; i < flow.length; i++) { - if (flow[i] >= 0.875F && end != 1F) + if (flow[i] >= 14f / 16) { - end = flow[i]; + total += flow[i] * 10; + count += 10; } if (flow[i] >= 0) @@ -563,6 +565,10 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock return 0.875F; } } + if (here.getBlock() instanceof BlockLiquid) + { + return Math.min(1 - BlockLiquid.getLiquidHeightPercent(here.getValue(BlockLiquid.LEVEL)), 14f / 16); + } return !here.getMaterial().isSolid() && up.getBlock() == this ? 1 : this.getQuantaPercentage(world, pos) * 0.875F; }