Posted January 5, 201312 yr So, I added a creative tab. But it seems like it's crashing. This is the crash log that I'm getting: http://pastebin.com/q7F8DJhu I have a repo where you can view the code: https://bitbucket.org/SuitedSlime/morecraft/ Any help would be appreciated, thanks!
January 5, 201312 yr @Override @SideOnly(Side.CLIENT) public ItemStack getIconItemStack() { return new ItemStack(MoreCraft .OBSIDIAN_PEARL); } should fix it.
January 5, 201312 yr Author @Override @SideOnly(Side.CLIENT) public ItemStack getIconItemStack() { return new ItemStack(MoreCraft .OBSIDIAN_PEARL); } should fix it. It won't. public int getTabIconItemIndex() { return ItemIds.OBSIDIAN_PEARL; } The method I want to use just needs the item ID, hence why I'm passing the ID of my custom item. Not saying your way is wrong, just saying it's not the way I want to do it. It should be working, if you look at net.minecraft.creativetab.CreativeTabs; that's how they do it, so I'm a little confused right now
January 5, 201312 yr public int getTabIconItemIndex() { return MoreCraft.OBSIDIAN_PEARL.shiftedIndex; } you need to add the shiftedIndex
January 5, 201312 yr Author public int getTabIconItemIndex() { return MoreCraft.OBSIDIAN_PEARL.shiftedIndex; } you need to add the shiftedIndex Eh? How you figure that one out? It's a int! You can't add shiftedIndex...
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.