protected void updateFallState(double par1, boolean par3)
    {
        if (par3)
        {
            if (this.fallDistance > 0.0F)
            {
                if (this instanceof EntityLiving)
                {
                    int var4 = MathHelper.floor_double(this.posX);
                    int var5 = MathHelper.floor_double(this.posY - 0.20000000298023224D - (double)this.yOffset);
                    int var6 = MathHelper.floor_double(this.posZ);
                    int var7 = this.worldObj.getBlockId(var4, var5, var6);

                    if (var7 == 0 && this.worldObj.getBlockId(var4, var5 - 1, var6) == Block.fence.blockID)
                    {
                        var7 = this.worldObj.getBlockId(var4, var5 - 1, var6);
                    }

                    if (var7 > 0)
                    {
                        Block.blocksList[var7].onFallenUpon(this.worldObj, var4, var5, var6, this, this.fallDistance);
                    }
                }

                this.fall(this.fallDistance);
                this.fallDistance = 0.0F;
            }
        }
        else if (par1 < 0.0D)
        {
            this.fallDistance = (float)((double)this.fallDistance - par1);
        }
    }