package com.projectreddog.machinemod.block; import com.projectreddog.machinemod.creativetab.CreativeTabMachineMod; import com.projectreddog.machinemod.reference.Reference; import net.minecraft.block.Block; import net.minecraft.block.material.Material; public class BlockMachineMod extends Block { protected BlockMachineMod(Material material) { super(material); // can override later ;) this.setCreativeTab(CreativeTabMachineMod.MACHINEMOD_BLOCKS_TAB); } public BlockMachineMod() { // Generic constructor (set to rock by default) this(Material.ROCK); } @Override public String getUnlocalizedName() { return String.format("tile.%s%s", Reference.MOD_ID.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName())); } // 1.8 not needed? // @Override // @SideOnly(Side.CLIENT) // public void registerBlockIcons(IIconRegister iconRegister) // { // blockIcon = // iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".")+1)); // } // protected String getUnwrappedUnlocalizedName(String unlocalizedName) { return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1); } }