From 9e732ee9356daa0843d1265b447806ba046c3d2d Mon Sep 17 00:00:00 2001 From: tommy1019 Date: Thu, 8 Aug 2013 18:38:46 -0500 Subject: [PATCH 1/3] Fixed Fluid Non-Solid Block Duplication --- .../minecraftforge/fluids/BlockFluidBase.java | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/common/net/minecraftforge/fluids/BlockFluidBase.java b/common/net/minecraftforge/fluids/BlockFluidBase.java index 826ec6c07b..d96a47e2f6 100644 --- a/common/net/minecraftforge/fluids/BlockFluidBase.java +++ b/common/net/minecraftforge/fluids/BlockFluidBase.java @@ -1,4 +1,3 @@ - package net.minecraftforge.fluids; import java.util.HashMap; @@ -130,7 +129,13 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock return false; } - if (this.density > getDensity(world, x, y, z)) + int density = getDensity(world, x, y, z); + if (density == Integer.MAX_VALUE) + { + return true; + } + + if (this.density > density) { return true; } @@ -173,7 +178,14 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock } Block.blocksList[bId].dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0); - if (this.density > getDensity(world, x, y, z)) + int density = getDensity(world, x, y, z); + if (density == Integer.MAX_VALUE) + { + Block.blocksList[bId].dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0); + return true; + } + + if (this.density > density) { return true; } From aab3385c2d91e64ba4a17e8b321d9f8ed9603d19 Mon Sep 17 00:00:00 2001 From: tommy1019 Date: Fri, 9 Aug 2013 12:23:05 -0500 Subject: [PATCH 2/3] Fixed Double Item Drop --- common/net/minecraftforge/fluids/BlockFluidBase.java | 1 - 1 file changed, 1 deletion(-) diff --git a/common/net/minecraftforge/fluids/BlockFluidBase.java b/common/net/minecraftforge/fluids/BlockFluidBase.java index d96a47e2f6..5ec9f92343 100644 --- a/common/net/minecraftforge/fluids/BlockFluidBase.java +++ b/common/net/minecraftforge/fluids/BlockFluidBase.java @@ -176,7 +176,6 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock { return false; } - Block.blocksList[bId].dropBlockAsItem(world, x, y, z, world.getBlockMetadata(x, y, z), 0); int density = getDensity(world, x, y, z); if (density == Integer.MAX_VALUE) From efb27ed1ea547b6ec2869beefd42ffe99f38ca1a Mon Sep 17 00:00:00 2001 From: tommy1019 Date: Fri, 9 Aug 2013 12:25:56 -0500 Subject: [PATCH 3/3] Fixed Classic Checking --- .../net/minecraftforge/fluids/BlockFluidClassic.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/common/net/minecraftforge/fluids/BlockFluidClassic.java b/common/net/minecraftforge/fluids/BlockFluidClassic.java index b5349ca6f1..5af4160ec6 100644 --- a/common/net/minecraftforge/fluids/BlockFluidClassic.java +++ b/common/net/minecraftforge/fluids/BlockFluidClassic.java @@ -1,4 +1,3 @@ - package net.minecraftforge.fluids; import java.util.Random; @@ -304,9 +303,15 @@ public class BlockFluidClassic extends BlockFluidBase return false; } - if (this.density > getDensity(world, x, y, z)) + int density = getDensity(world, x, y, z); + if (density == Integer.MAX_VALUE) { - return true; + return true; + } + + if (this.density > density) + { + return true; } else {