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