2013-05-03 13:00:44 +00:00
|
|
|
package biomesoplenty.blocks;
|
|
|
|
|
|
|
|
import biomesoplenty.BiomesOPlenty;
|
|
|
|
|
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.block.BlockStairs;
|
|
|
|
import net.minecraft.client.renderer.texture.IconRegister;
|
|
|
|
import net.minecraft.util.Icon;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
|
|
|
|
|
|
public class BlockBOPStairs extends BlockStairs
|
|
|
|
{
|
|
|
|
public static enum Category
|
|
|
|
{
|
2013-05-12 12:38:39 +00:00
|
|
|
ACACIA, CHERRY, DARK, FIR, HOLY, MAGIC, MANGROVE, PALM, REDWOOD, WILLOW, RED_COBBLE, RED_BRICKS, MUD_BRICKS, HOLY_COBBLE, HOLY_BRICKS;
|
2013-05-03 13:00:44 +00:00
|
|
|
}
|
|
|
|
|
2013-05-12 12:38:39 +00:00
|
|
|
private static final String[] types = new String[] {"acacia", "cherry", "dark", "fir", "holy", "magic", "mangrove", "palm", "redwood", "willow", "redcobble", "redbrick", "mudbrick", "holycobble", "holybrick"};
|
2013-05-03 13:00:44 +00:00
|
|
|
private Icon[] textures;
|
|
|
|
private final Category category;
|
|
|
|
|
|
|
|
public BlockBOPStairs(int blockID, Block model, Category cat)
|
|
|
|
{
|
|
|
|
super(blockID, model, 0);
|
|
|
|
category = cat;
|
|
|
|
setBurnProperties(this.blockID, 5, 20);
|
|
|
|
this.setLightOpacity(0);
|
|
|
|
this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void registerIcons(IconRegister iconRegister)
|
|
|
|
{
|
|
|
|
textures = new Icon[types.length];
|
|
|
|
|
|
|
|
for (int i = 0; i < types.length; ++i)
|
2013-05-12 13:06:54 +00:00
|
|
|
if (i < types.length - 5)
|
2013-05-03 13:00:44 +00:00
|
|
|
textures[i] = iconRegister.registerIcon("BiomesOPlenty:plank_"+types[i]);
|
|
|
|
else
|
|
|
|
textures[i] = iconRegister.registerIcon("BiomesOPlenty:"+types[i]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public Icon getIcon(int side, int meta)
|
|
|
|
{
|
|
|
|
return textures[category.ordinal()];
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int damageDropped(int meta)
|
|
|
|
{
|
|
|
|
return meta;
|
|
|
|
}
|
|
|
|
}
|