/BlockStainedFragileGlass Secret
Created
February 13, 2015 15:03
Block is partially transparent in world; opaque in hand
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BlockStainedFragileGlass extends BlockFragileGlass | |
{ | |
public IIcon[] icons = new IIcon[16]; | |
@Override | |
public int damageDropped (int metadata) | |
{ | |
return metadata; | |
} | |
@SideOnly(Side.CLIENT) | |
@Override | |
public void getSubBlocks(Item i, CreativeTabs tab, List subItems) | |
{ | |
for (int x = 0; x < 16; x++) | |
{ | |
subItems.add(new ItemStack(this, 1, x)); | |
} | |
} | |
/** | |
* Gets the block's texture. Args: side, meta | |
*/ | |
@SideOnly(Side.CLIENT) | |
public IIcon getIcon(int p_149691_1_, int meta) | |
{ | |
return this.icons[meta]; | |
} | |
@Override | |
@SideOnly(Side.CLIENT) | |
public void registerBlockIcons(IIconRegister p_149651_1_) | |
{ | |
for (int i = 0; i < 16; ++i) | |
{ | |
this.icons[i] = p_149651_1_.registerIcon("minecraft:glass_" + ItemDye.field_150921_b[i]); | |
} | |
} | |
/** | |
* Returns which pass should this block be rendered on. 0 for solids and 1 for alpha | |
*/ | |
@SideOnly(Side.CLIENT) | |
public int getRenderBlockPass() | |
{ | |
return 1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment