Search in sources :

Example 1 with KnappingRecipeWrapper

use of net.dries007.tfc.compat.jei.wrappers.KnappingRecipeWrapper in project firmalife by eerussianguy.

the class JEIPluginFL method register.

@Override
public void register(IModRegistry registry) {
    REGISTRY = registry;
    List<SimpleRecipeWrapper> ovenList = RegistriesFL.OVEN.getValuesCollection().stream().map(OvenRecipeWrapper::new).collect(Collectors.toList());
    registry.addRecipes(ovenList, OVEN_ID);
    registry.addRecipeCatalyst(new ItemStack(BlocksFL.OVEN), OVEN_ID);
    List<SimpleRecipeWrapper> dryList = RegistriesFL.DRYING.getValuesCollection().stream().map(DryingRecipeWrapper::new).collect(Collectors.toList());
    registry.addRecipes(dryList, DRY_ID);
    registry.addRecipeCatalyst(new ItemStack(BlocksFL.LEAF_MAT, 1), DRY_ID);
    registry.addIngredientInfo(new ItemStack(ItemsFL.FRUIT_LEAF, 1), VanillaTypes.ITEM, new TextComponentTranslation("jei.tooltip.firmalife.fruit_leaf").getFormattedText());
    registry.addIngredientInfo(new ItemStack(ItemsFL.COCOA_POWDER, 1), VanillaTypes.ITEM, new TextComponentTranslation("jei.tooltip.firmalife.cocoa_powder").getFormattedText());
    registry.addIngredientInfo(new ItemStack(ItemsFL.getFood(FoodFL.PINEAPPLE_CHUNKS), 1), VanillaTypes.ITEM, new TextComponentTranslation("jei.tooltip.firmalife.pineapple_chunks").getFormattedText());
    // Pumpkin Knapping
    List<KnappingRecipeWrapper> pumpkinknapRecipes = TFCRegistries.KNAPPING.getValuesCollection().stream().filter(recipe -> recipe.getType() == KnappingFL.PUMPKIN).map(recipe -> new KnappingRecipeWrapperFL(recipe, registry.getJeiHelpers().getGuiHelper())).collect(Collectors.toList());
    // Molds
    List<UnmoldRecipeWrapperFL> moldRecipes = TFCRegistries.METALS.getValuesCollection().stream().filter(metal -> metal.isToolMetal() && metal.getTier().isAtMost(Metal.Tier.TIER_II)).map(metal -> new UnmoldRecipeWrapperFL(metal, "mallet")).collect(Collectors.toList());
    // Casts
    List<CastingRecipeWrapperFL> castRecipes = TFCRegistries.METALS.getValuesCollection().stream().filter(metal -> metal.isToolMetal() && metal.getTier().isAtMost(Metal.Tier.TIER_II)).map(metal -> new CastingRecipeWrapperFL(metal, "mallet")).collect(Collectors.toList());
    registry.addRecipes(moldRecipes, "minecraft.crafting");
    registry.addRecipes(castRecipes, CASTING_UID);
    registry.addRecipeCatalyst(new ItemStack(BlocksTFC.CRUCIBLE), CASTING_UID);
    registry.addRecipeCatalyst(new ItemStack(ItemsTFC.FIRED_VESSEL), CASTING_UID);
    registry.addRecipes(pumpkinknapRecipes, KNAP_PUMPKIN_UID);
    registry.addRecipeCatalyst(new ItemStack(Item.getItemFromBlock(BlocksFL.PUMPKIN_FRUIT)), KNAP_PUMPKIN_UID);
}
Also used : JEIPlugin(mezz.jei.api.JEIPlugin) IModRegistry(mezz.jei.api.IModRegistry) SimpleRecipeWrapper(net.dries007.tfc.compat.jei.wrappers.SimpleRecipeWrapper) Item(net.minecraft.item.Item) DryingRecipeCategory(com.eerussianguy.firmalife.compat.jei.category.DryingRecipeCategory) ItemsTFC(net.dries007.tfc.objects.items.ItemsTFC) BlocksTFC(net.dries007.tfc.objects.blocks.BlocksTFC) IRecipeCategoryRegistration(mezz.jei.api.recipe.IRecipeCategoryRegistration) TextComponentTranslation(net.minecraft.util.text.TextComponentTranslation) IModPlugin(mezz.jei.api.IModPlugin) ItemStack(net.minecraft.item.ItemStack) KnappingFL(com.eerussianguy.firmalife.init.KnappingFL) Metal(net.dries007.tfc.api.types.Metal) TFCRegistries(net.dries007.tfc.api.registries.TFCRegistries) ItemsFL(com.eerussianguy.firmalife.registry.ItemsFL) FoodFL(com.eerussianguy.firmalife.init.FoodFL) BlocksFL(com.eerussianguy.firmalife.registry.BlocksFL) OvenRecipeCategory(com.eerussianguy.firmalife.compat.jei.category.OvenRecipeCategory) KnappingRecipeWrapper(net.dries007.tfc.compat.jei.wrappers.KnappingRecipeWrapper) Collectors(java.util.stream.Collectors) com.eerussianguy.firmalife.compat.jei.wrapper(com.eerussianguy.firmalife.compat.jei.wrapper) List(java.util.List) KnappingCategory(net.dries007.tfc.compat.jei.categories.KnappingCategory) VanillaTypes(mezz.jei.api.ingredients.VanillaTypes) MOD_ID(com.eerussianguy.firmalife.FirmaLife.MOD_ID) RegistriesFL(com.eerussianguy.firmalife.init.RegistriesFL) CastingCategoryFL(com.eerussianguy.firmalife.compat.jei.category.CastingCategoryFL) SimpleRecipeWrapper(net.dries007.tfc.compat.jei.wrappers.SimpleRecipeWrapper) TextComponentTranslation(net.minecraft.util.text.TextComponentTranslation) ItemStack(net.minecraft.item.ItemStack) KnappingRecipeWrapper(net.dries007.tfc.compat.jei.wrappers.KnappingRecipeWrapper)

Aggregations

MOD_ID (com.eerussianguy.firmalife.FirmaLife.MOD_ID)1 CastingCategoryFL (com.eerussianguy.firmalife.compat.jei.category.CastingCategoryFL)1 DryingRecipeCategory (com.eerussianguy.firmalife.compat.jei.category.DryingRecipeCategory)1 OvenRecipeCategory (com.eerussianguy.firmalife.compat.jei.category.OvenRecipeCategory)1 com.eerussianguy.firmalife.compat.jei.wrapper (com.eerussianguy.firmalife.compat.jei.wrapper)1 FoodFL (com.eerussianguy.firmalife.init.FoodFL)1 KnappingFL (com.eerussianguy.firmalife.init.KnappingFL)1 RegistriesFL (com.eerussianguy.firmalife.init.RegistriesFL)1 BlocksFL (com.eerussianguy.firmalife.registry.BlocksFL)1 ItemsFL (com.eerussianguy.firmalife.registry.ItemsFL)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1 IModPlugin (mezz.jei.api.IModPlugin)1 IModRegistry (mezz.jei.api.IModRegistry)1 JEIPlugin (mezz.jei.api.JEIPlugin)1 VanillaTypes (mezz.jei.api.ingredients.VanillaTypes)1 IRecipeCategoryRegistration (mezz.jei.api.recipe.IRecipeCategoryRegistration)1 TFCRegistries (net.dries007.tfc.api.registries.TFCRegistries)1 Metal (net.dries007.tfc.api.types.Metal)1 KnappingCategory (net.dries007.tfc.compat.jei.categories.KnappingCategory)1