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 BlockBreakable extends Block
009 {
010 private boolean localFlag;
011
012 protected BlockBreakable(int par1, int par2, Material par3Material, boolean par4)
013 {
014 super(par1, par2, par3Material);
015 this.localFlag = par4;
016 }
017
018 /**
019 * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
020 * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
021 */
022 public boolean isOpaqueCube()
023 {
024 return false;
025 }
026
027 @SideOnly(Side.CLIENT)
028
029 /**
030 * Returns true if the given side of this block type should be rendered, if the adjacent block is at the given
031 * coordinates. Args: blockAccess, x, y, z, side
032 */
033 public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5)
034 {
035 int var6 = par1IBlockAccess.getBlockId(par2, par3, par4);
036 return !this.localFlag && var6 == this.blockID ? false : super.shouldSideBeRendered(par1IBlockAccess, par2, par3, par4, par5);
037 }
038 }