Posted December 5, 20159 yr I'm new to Java (and subsequently Forge modding), and I'm testing out some basic stuff, including overriding vanilla items. The code in question is here. I'm noticing that whenever I call the setCreativeTab method on an overriden item (overriden via addSubstitutionAlias method), it shows up twice in the creative inventory. If I don't call it at all, however, it doesn't show up at all. setCreativeTab works just fine with my own mod items. (Using Forge version 10.13.4.1558 for Minecraft 1.7.10)
December 7, 20159 yr What happens if you add it to a different CreativeTab rather than the materials tab? Try tabDecorations or something, see if it shows up in both or just decorations. Assuming you haven't already solved this.
December 10, 20159 yr Author I've already tried adding the item to other tabs (and tried overriding items of different IDs - not that I'd expect it to work, but couldn't hurt to try). I've also tried commenting out parts of my code, but it seems the only way to "solve" the issue is to not add it to the creative tab at all or to not override the item at all (adding non-overriden items, i.e. my own items works just fine). Either there's something quirky about setCreativeTab, addSubstitutionAlias, or me just being a noob - I highly doubt it's anything else.
December 10, 20159 yr Have you tried setting some breakpoints to trace the problem in the debugger? The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.
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.