use of slimeknights.tconstruct.plugin.jei.partbuilder.PatternIngredientHelper in project TinkersConstruct by SlimeKnights.
the class JEIPlugin method registerIngredients.
@Override
public void registerIngredients(IModIngredientRegistration registration) {
assert Minecraft.getInstance().level != null;
RecipeManager manager = Minecraft.getInstance().level.getRecipeManager();
List<ModifierEntry> modifiers = Collections.emptyList();
if (Config.CLIENT.showModifiersInJEI.get()) {
modifiers = RecipeHelper.getJEIRecipes(manager, RecipeTypes.TINKER_STATION, IDisplayModifierRecipe.class).stream().map(recipe -> recipe.getDisplayResult().getModifier()).distinct().sorted(Comparator.comparing(Modifier::getId)).map(mod -> new ModifierEntry(mod, 1)).collect(Collectors.toList());
}
registration.register(ENTITY_TYPE, Collections.emptyList(), new EntityIngredientHelper(), new EntityIngredientRenderer(16));
registration.register(MODIFIER_TYPE, modifiers, new ModifierIngredientHelper(), ModifierBookmarkIngredientRenderer.INSTANCE);
registration.register(PATTERN_TYPE, Collections.emptyList(), new PatternIngredientHelper(), PatternIngredientRenderer.INSTANCE);
}
Aggregations