Search in sources :

Example 1 with ImbuingRecipeWrapper

use of lumien.randomthings.handler.compability.jei.imbuing.ImbuingRecipeWrapper in project Random-Things by lumien231.

the class RandomThingsPlugin method register.

@Override
public void register(IModRegistry registry) {
    this.jeiHelpers = registry.getJeiHelpers();
    RandomThingsPlugin.stackHelper = jeiHelpers.getStackHelper();
    IGuiHelper guiHelper = jeiHelpers.getGuiHelper();
    registry.handleRecipes(ImbuingRecipe.class, (recipe) -> (new ImbuingRecipeWrapper(recipe.getIngredients(), recipe.toImbue(), recipe.getResult())), IMBUE_ID);
    registry.addRecipeCatalyst(new ItemStack(ModBlocks.imbuingStation), IMBUE_ID);
    IRecipeTransferRegistry recipeTransferRegistry = registry.getRecipeTransferRegistry();
    recipeTransferRegistry.addRecipeTransferHandler(ContainerImbuingStation.class, IMBUE_ID, 0, 4, 5, 36);
    registry.addRecipes(lumien.randomthings.recipes.imbuing.ImbuingRecipeHandler.imbuingRecipes, IMBUE_ID);
    List<IRecipeWrapper> anvilRecipes = new ArrayList<IRecipeWrapper>();
    for (AnvilRecipe ar : lumien.randomthings.recipes.anvil.AnvilRecipeHandler.getAllRecipes()) {
        anvilRecipes.add(jeiHelpers.getVanillaRecipeFactory().createAnvilRecipe(ar.getFirst(), Lists.newArrayList(ar.getSecond()), Lists.newArrayList(ar.getOutput())));
    }
    registry.addRecipes(anvilRecipes, VanillaRecipeCategoryUid.ANVIL);
    registry.addRecipeClickArea(GuiImbuingStation.class, 99, 54, 22, 16, IMBUE_ID);
    DescriptionHandler.addDescriptions(registry);
}
Also used : IGuiHelper(mezz.jei.api.IGuiHelper) ImbuingRecipeWrapper(lumien.randomthings.handler.compability.jei.imbuing.ImbuingRecipeWrapper) ArrayList(java.util.ArrayList) AnvilRecipe(lumien.randomthings.recipes.anvil.AnvilRecipe) IRecipeWrapper(mezz.jei.api.recipe.IRecipeWrapper) ItemStack(net.minecraft.item.ItemStack) IRecipeTransferRegistry(mezz.jei.api.recipe.transfer.IRecipeTransferRegistry)

Aggregations

ArrayList (java.util.ArrayList)1 ImbuingRecipeWrapper (lumien.randomthings.handler.compability.jei.imbuing.ImbuingRecipeWrapper)1 AnvilRecipe (lumien.randomthings.recipes.anvil.AnvilRecipe)1 IGuiHelper (mezz.jei.api.IGuiHelper)1 IRecipeWrapper (mezz.jei.api.recipe.IRecipeWrapper)1 IRecipeTransferRegistry (mezz.jei.api.recipe.transfer.IRecipeTransferRegistry)1 ItemStack (net.minecraft.item.ItemStack)1