Skip to content

Instantly share code, notes, and snippets.

@Cazzar
Last active August 29, 2015 14:06
Show Gist options
  • Save Cazzar/cdce34b3d3e04722688c to your computer and use it in GitHub Desktop.
Save Cazzar/cdce34b3d3e04722688c to your computer and use it in GitHub Desktop.
package com.pahimar.letsmodreboot.item;
import com.pahimar.letsmodreboot.creativetab.CreativeTabLMRB;
import com.pahimar.letsmodreboot.reference.Reference;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class ItemLMRB extends Item
{
public ItemLMRB()
{
super();
this.setCreativeTab(CreativeTabLMRB.LMRB_TAB);
}
@Override
public String getUnlocalizedName()
{
return String.format("item.%s%s", Reference.MOD_ID.toLowerCase() + ":", this.name);
}
@Override
public String getUnlocalizedName(ItemStack itemStack)
{
return this.getUnlocalizedName()
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
itemIcon = iconRegister.registerIcon(String.format("%s:%s", Reference.MOD_ID.toLowerCase(), this.name));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment