From ce393ec0ef3563db15994d314b6e5566e725e28a Mon Sep 17 00:00:00 2001 From: SpaceToad Date: Sun, 16 Feb 2014 09:37:00 +0100 Subject: [PATCH] fixed conversion error, fix #1439 --- common/buildcraft/energy/render/EntityDropParticleFX.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/buildcraft/energy/render/EntityDropParticleFX.java b/common/buildcraft/energy/render/EntityDropParticleFX.java index fa49a890..03fedd30 100644 --- a/common/buildcraft/energy/render/EntityDropParticleFX.java +++ b/common/buildcraft/energy/render/EntityDropParticleFX.java @@ -16,6 +16,7 @@ import net.minecraft.block.material.Material; import net.minecraft.util.MathHelper; import net.minecraft.world.World; import net.minecraftforge.fluids.BlockFluidBase; +import net.minecraftforge.fluids.IFluidBlock; @SideOnly(Side.CLIENT) public class EntityDropParticleFX extends EntityFX { @@ -96,8 +97,8 @@ public class EntityDropParticleFX extends EntityFX { Material material = block.getMaterial(); - if (material.isLiquid() || material.isSolid()) { - double d0 = (double) ((float) (MathHelper.floor_double(this.posY) + 1) - ((BlockFluidBase) block) + if ((material.isLiquid() || material.isSolid()) && block instanceof IFluidBlock) { + double d0 = (double) ((float) (MathHelper.floor_double(this.posY) + 1) - ((IFluidBlock) block) .getFilledPercentage(worldObj, x, y, z)); if (this.posY < d0) {