001 package net.minecraft.src;
002
003 import cpw.mods.fml.common.Side;
004 import cpw.mods.fml.common.asm.SideOnly;
005 import java.util.Random;
006
007 public class BlockGlass extends BlockBreakable
008 {
009 public BlockGlass(int par1, int par2, Material par3Material, boolean par4)
010 {
011 super(par1, par2, par3Material, par4);
012 this.setCreativeTab(CreativeTabs.tabBlock);
013 }
014
015 /**
016 * Returns the quantity of items to drop on block destruction.
017 */
018 public int quantityDropped(Random par1Random)
019 {
020 return 0;
021 }
022
023 @SideOnly(Side.CLIENT)
024
025 /**
026 * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha
027 */
028 public int getRenderBlockPass()
029 {
030 return 0;
031 }
032
033 /**
034 * Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two
035 * adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
036 */
037 public boolean isOpaqueCube()
038 {
039 return false;
040 }
041
042 /**
043 * If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
044 */
045 public boolean renderAsNormalBlock()
046 {
047 return false;
048 }
049
050 /**
051 * Return true if a player with Silk Touch can harvest this block directly, and not its normal drops.
052 */
053 protected boolean canSilkHarvest()
054 {
055 return true;
056 }
057 }