    001package net.minecraft.block;
    002
    003import cpw.mods.fml.relauncher.Side;
    004import cpw.mods.fml.relauncher.SideOnly;
    005import net.minecraft.block.material.Material;
    006import net.minecraft.world.IBlockAccess;
    007
    008public class BlockLeavesBase extends Block
    009{
    010    /**
    011     * Used to determine how to display leaves based on the graphics level. May also be used in rendering for
    012     * transparency, not sure.
    013     */
    014    public boolean graphicsLevel;
    015
    016    protected BlockLeavesBase(int par1, Material par2Material, boolean par3)
    017    {
    018        super(par1, par2Material);
    019        this.graphicsLevel = par3;
    020    }
    021
    022    /**
    023     * Is this block (a) opaque and (b) a full 1m cube?  This determines whether or not to render the shared face of two
    024     * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
    025     */
    026    public boolean isOpaqueCube()
    027    {
    028        return false;
    029    }
    030
    031    @SideOnly(Side.CLIENT)
    032
    033    /**
    034     * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
    035     * coordinates.  Args: blockAccess, x, y, z, side
    036     */
    037    public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
    038    {
    039        int i1 = par1IBlockAccess.getBlockId(par2, par3, par4);
    040        return !this.graphicsLevel && i1 == this.blockID ? false : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5);
    041    }
    042}