Posted January 30, 201312 yr ive made multiple barks(items) and i have done all the code for the and the textures are working and everything. the only thing is, there is no name for it public class ItemTreeBark extends Item { public static final String[] barkType = new String[] {"Oak", "Spruce", "Birch", "Jungle"}; public ItemTreeBark(int id) { super(id); this.setCreativeTab(SkyCraft.tabSkyCraftItems); this.setMaxDamage(0); this.setHasSubtypes(true); this.setIconCoord(0, 1); this.setItemName("Bark"); } @SideOnly(Side.CLIENT) public int getIconFromDamage(int par1) { int var2 = MathHelper.clamp_int(par1, 0, 3); return this.iconIndex + var2 % 1 * 1 + var2 / 1; } public String getItemNameIS(ItemStack par1ItemStack) { int var2 = MathHelper.clamp_int(par1ItemStack.getItemDamage(), 0, 3); return barkType[var2] + " " + super.getItemName(); } @SideOnly(Side.CLIENT) public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) { for (int var4 = 0; var4 < 4; ++var4) { par3List.add(new ItemStack(par1, 1, var4)); } } public String getTextureFile() { return CommonProxySkyCraft.Items_PNG; } } i think its got something to do with the getItemNameIS() Thanks in advance
January 30, 201312 yr Check out ItemGear and MechergyItems in my repo: https://bitbucket.org/SuitedSlime/mechergy/src/5eba25680db5/suitedslime/mechergy/item?at=master
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.