001 package net.minecraft.block; 002 003 import cpw.mods.fml.relauncher.Side; 004 import cpw.mods.fml.relauncher.SideOnly; 005 import net.minecraft.block.material.Material; 006 import net.minecraft.world.IBlockAccess; 007 008 public 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, int par2, Material par3Material, boolean par4) 017 { 018 super(par1, par2, par3Material); 019 this.graphicsLevel = par4; 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 var6 = par1IBlockAccess.getBlockId(par2, par3, par4); 040 return !this.graphicsLevel && var6 == this.blockID ? false : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5); 041 } 042 }