Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/27/18 in all areas

  1. No, as I mentioned the vanilla coding is strongly inclined towards and "all or nothing". Basically the Item gets a creative tab and the getSubTypes() populates the list with all the variants. For your own Item classes you have full control over the getSubTypes() but not for the vanilla classes. The only publicly accessible control is at the Item level and even reflection won't help because the return values are coded right in the methods -- there are not fields that can be manipulated.
    1 point
  2. There might be a clever way to do it, but it looks tricky. The key method is actually the getSubItems() method. It takes in a list that is provided by the creative tab gui and populates it with all the variants of the item. I'm not aware of a good Forge hook for it. Basically, Minecraft seems to be strongly coded such that all variants of an item are intended to go on the same creative tab(). I think the "easiest" way is to actually create your own extension of the creative tab GUI and use the GuiOpenEvent to replace the vanilla one with yours. In yours you could filter out the results of the getSubTypes() method in any way you wished.
    1 point
  3. Cool. I think the big learning is having the skills to track down these things yourself. As long as you can observe the execution of a program you can always debug it.
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.