package net.tropicraft.block; import net.minecraft.block.Block; import net.minecraft.block.BlockStairs; import net.tropicraft.info.TCInfo; import net.tropicraft.registry.TCCreativeTabRegistry; public class BlockTropicraftStairs extends BlockStairs { public BlockTropicraftStairs(String name, Block block, int meta) { super(block, meta); this.setBlockName(name); this.setCreativeTab(TCCreativeTabRegistry.tabBlock); } /** * @return The unlocalized block name */ @Override public String getUnlocalizedName() { return String.format("tile.%s%s", TCInfo.ICON_LOCATION, getActualName(super.getUnlocalizedName())); } /** * Get the true name of the block * @param unlocalizedName tile.%truename% * @return The actual name of the block, rather than tile.%truename% */ protected String getActualName(String unlocalizedName) { return unlocalizedName.substring(unlocalizedName.indexOf('.') + 1); } }