public boolean canBlockBePlacedAt(int par1, int par2, int par3, int par4, boolean par5, int par6)
    {
        int var7 = this.getBlockId(par2, par3, par4);
        Block var8 = Block.blocksList[var7];
        Block var9 = Block.blocksList[par1];
        AxisAlignedBB var10 = var9.getCollisionBoundingBoxFromPool(this, par2, par3, par4);

        if (par5)
        {
            var10 = null;
        }

        if (var10 != null && !this.checkIfAABBIsClear(var10))
        {
            return false;
        }
        else
        {
            if (var8 != null && (var8 == Block.waterMoving || var8 == Block.waterStill || var8 == Block.lavaMoving || var8 == Block.lavaStill || var8 == Block.fire || var8.blockMaterial.isGroundCover()))
            {
                var8 = null;
            }
            if (var8 != null && var8.isBlockReplaceable(this, par2, par3, par4))
            {
                var8 = null;
            }
            return par1 > 0 && var8 == null && var9.canPlaceBlockOnSide(this, par2, par3, par4, par6);
        }
    }