-
Notifications
You must be signed in to change notification settings - Fork 311
Item Subtypes
Items can have unlimited variations by using NBT or capabilities. Not all of the extra information is important for recipes, but some of it necessary to tell items apart.
Example: Your mod has a backpack that holds items, so it has a lot of NBT data. It has an upgrade recipe that only cares about the color of the backpack, but not the contents. How can JEI pay attention to the color but ignore the contents?
The ISubtypeRegistry
allows plugins to tell JEI what makes an item unique, and use that information for comparing and looking up items.
Example: Forestry bees have tons of NBT defining their genetics. The Forestry JEI plugin uses the subtype registry to tell JEI to only look at the bee's species when comparing them and when looking up recipes involving bees.
To register your item's subtypes, first create your plugin, then you are passed the ISubtypeRegistry
in your plugin's registerItemSubtypes
method.
- Setup
- Item Ingredients
- Essential Extras
- Advanced
List of Plugin Implementations
- Setup
- Item Ingredients
- Working with Recipes
- Other