use of mezz.jei.api.ingredients.subtypes.ISubtypeInterpreter in project SophisticatedBackpacks by P3pp3rF1y.
the class SBPPlugin method registerItemSubtypes.
@Override
public void registerItemSubtypes(ISubtypeRegistration registration) {
ISubtypeInterpreter backpackNbtInterpreter = itemStack -> itemStack.getCapability(CapabilityBackpackWrapper.getCapabilityInstance()).map(wrapper -> "{clothColor:" + wrapper.getClothColor() + ",borderColor:" + wrapper.getBorderColor() + "}").orElse("");
registration.registerSubtypeInterpreter(ModItems.BACKPACK.get(), backpackNbtInterpreter);
registration.registerSubtypeInterpreter(ModItems.IRON_BACKPACK.get(), backpackNbtInterpreter);
registration.registerSubtypeInterpreter(ModItems.GOLD_BACKPACK.get(), backpackNbtInterpreter);
registration.registerSubtypeInterpreter(ModItems.DIAMOND_BACKPACK.get(), backpackNbtInterpreter);
registration.registerSubtypeInterpreter(ModItems.NETHERITE_BACKPACK.get(), backpackNbtInterpreter);
}
use of mezz.jei.api.ingredients.subtypes.ISubtypeInterpreter in project Ceramics by KnightMiner.
the class JEIPlugin method registerItemSubtypes.
@Override
public void registerItemSubtypes(ISubtypeRegistration registration) {
ISubtypeInterpreter bucketInterpreter = BaseClayBucketItem::getSubtype;
registration.registerSubtypeInterpreter(Registration.CLAY_BUCKET.get(), bucketInterpreter);
registration.registerSubtypeInterpreter(Registration.CRACKED_CLAY_BUCKET.get(), bucketInterpreter);
// separate different states of crackable clay
ISubtypeInterpreter crackableClay = stack -> CrackableBlockItem.getCracks(stack) > 0 ? "cracked" : "";
registration.registerSubtypeInterpreter(Registration.TERRACOTTA_CISTERN.asItem(), crackableClay);
Registration.COLORED_CISTERN.forEach(block -> registration.registerSubtypeInterpreter(block.asItem(), crackableClay));
registration.registerSubtypeInterpreter(Registration.TERRACOTTA_FAUCET.asItem(), crackableClay);
registration.registerSubtypeInterpreter(Registration.TERRACOTTA_CHANNEL.asItem(), crackableClay);
}
Aggregations