Last active
August 29, 2015 14:06
-
-
Save Cazzar/cdce34b3d3e04722688c to your computer and use it in GitHub Desktop.
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
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