public interface ISubtypeRegistry
Some items have subtypes, most of them use meta values for this and JEI handles them by default. If your item has subtypes that depend on NBT or capabilities instead of meta, use this interface so JEI can tell those subtypes apart.
Note: JEI has built-in support for differentiating items that implement CapabilityFluidHandler
,
adding a subtype interpreter here will override that functionality.
Get the instance by implementing IModPlugin.registerItemSubtypes(ISubtypeRegistry)
.
Modifier and Type | Interface and Description |
---|---|
static interface |
ISubtypeRegistry.ISubtypeInterpreter |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getSubtypeInfo(net.minecraft.item.ItemStack itemStack)
Get the data from an itemStack that is relevant to comparing and telling subtypes apart.
|
boolean |
hasSubtypeInterpreter(net.minecraft.item.ItemStack itemStack)
Returns whether an
ISubtypeRegistry.ISubtypeInterpreter has been registered for this item. |
void |
registerNbtInterpreter(net.minecraft.item.Item item,
ISubtypeRegistry.ISubtypeInterpreter interpreter)
Deprecated.
since JEI 3.13.5. This is being renamed to
registerSubtypeInterpreter(Item, ISubtypeInterpreter) |
void |
registerSubtypeInterpreter(net.minecraft.item.Item item,
ISubtypeRegistry.ISubtypeInterpreter interpreter)
Add an interpreter to compare item subtypes.
|
void |
useNbtForSubtypes(net.minecraft.item.Item... items)
Tells JEI to treat all NBT as relevant to these items' subtypes.
|
void useNbtForSubtypes(net.minecraft.item.Item... items)
@Deprecated void registerNbtInterpreter(net.minecraft.item.Item item, ISubtypeRegistry.ISubtypeInterpreter interpreter)
registerSubtypeInterpreter(Item, ISubtypeInterpreter)
item
- the item that has subtypes.interpreter
- the interpreter for the item.void registerSubtypeInterpreter(net.minecraft.item.Item item, ISubtypeRegistry.ISubtypeInterpreter interpreter)
item
- the item that has subtypes.interpreter
- the interpreter for the item.@Nullable java.lang.String getSubtypeInfo(net.minecraft.item.ItemStack itemStack)
boolean hasSubtypeInterpreter(net.minecraft.item.ItemStack itemStack)
ISubtypeRegistry.ISubtypeInterpreter
has been registered for this item.