2016-01-16 20:06:25 +01:00
|
|
|
/*
|
2016-05-16 22:52:27 +02:00
|
|
|
* This file ("JEIActuallyAdditionsPlugin.java") is part of the Actually Additions mod for Minecraft.
|
2016-01-16 20:06:25 +01:00
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
2016-05-16 22:52:27 +02:00
|
|
|
* http://ellpeck.de/actaddlicense
|
2016-01-16 20:06:25 +01:00
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2017-01-01 16:23:26 +01:00
|
|
|
* © 2015-2017 Ellpeck
|
2016-01-16 20:06:25 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
package de.ellpeck.actuallyadditions.mod.jei;
|
|
|
|
|
|
|
|
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
2017-07-19 12:19:49 +02:00
|
|
|
import de.ellpeck.actuallyadditions.api.booklet.IBookletPage;
|
2021-02-28 11:35:10 +01:00
|
|
|
import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient;
|
|
|
|
import de.ellpeck.actuallyadditions.api.recipe.CrusherRecipe;
|
|
|
|
import de.ellpeck.actuallyadditions.api.recipe.EmpowererRecipe;
|
|
|
|
import de.ellpeck.actuallyadditions.api.recipe.LensConversionRecipe;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
2016-02-05 11:19:02 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiCoffeeMachine;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFurnaceDouble;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiGrinder;
|
2021-03-01 21:23:52 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.items.ActuallyItems;
|
2016-01-16 20:06:25 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.booklet.BookletRecipeCategory;
|
2017-07-19 12:19:49 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.booklet.BookletRecipeWrapper;
|
2016-01-17 12:17:24 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.coffee.CoffeeMachineRecipeCategory;
|
2017-07-19 12:19:49 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.coffee.CoffeeMachineRecipeWrapper;
|
2016-01-17 15:09:59 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.crusher.CrusherRecipeCategory;
|
2017-07-19 12:19:49 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.crusher.CrusherRecipeWrapper;
|
2016-08-03 04:01:47 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.empowerer.EmpowererRecipeCategory;
|
2017-07-19 12:19:49 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.empowerer.EmpowererRecipeWrapper;
|
2016-01-17 22:57:32 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.reconstructor.ReconstructorRecipeCategory;
|
2017-07-19 12:19:49 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.reconstructor.ReconstructorRecipeWrapper;
|
2016-01-22 18:52:38 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.Util;
|
2017-12-12 07:54:12 +01:00
|
|
|
import mezz.jei.api.IModPlugin;
|
2021-02-27 22:44:00 +01:00
|
|
|
import mezz.jei.api.constants.VanillaRecipeCategoryUid;
|
|
|
|
import mezz.jei.api.helpers.IJeiHelpers;
|
|
|
|
import mezz.jei.api.registration.IRecipeCategoryRegistration;
|
2016-01-22 18:52:38 +01:00
|
|
|
import net.minecraft.item.ItemStack;
|
2016-01-16 20:06:25 +01:00
|
|
|
|
|
|
|
@JEIPlugin
|
2019-05-02 09:10:29 +02:00
|
|
|
public class JEIActuallyAdditionsPlugin implements IModPlugin {
|
2019-02-27 19:53:05 +01:00
|
|
|
|
2017-07-19 12:19:49 +02:00
|
|
|
@Override
|
2019-02-27 19:53:05 +01:00
|
|
|
public void registerCategories(IRecipeCategoryRegistration registry) {
|
|
|
|
IJeiHelpers helpers = registry.getJeiHelpers();
|
2019-05-02 09:10:29 +02:00
|
|
|
registry.addRecipeCategories(new CoffeeMachineRecipeCategory(helpers.getGuiHelper()), new CompostRecipeCategory(helpers.getGuiHelper()), new CrusherRecipeCategory(helpers.getGuiHelper()), new ReconstructorRecipeCategory(helpers.getGuiHelper()), new EmpowererRecipeCategory(helpers.getGuiHelper()), new BookletRecipeCategory(helpers.getGuiHelper()));
|
2019-02-27 19:53:05 +01:00
|
|
|
}
|
2016-10-29 10:47:33 +02:00
|
|
|
|
2016-01-16 20:06:25 +01:00
|
|
|
@Override
|
2019-05-02 09:10:29 +02:00
|
|
|
public void register(IModRegistry registry) {
|
2016-05-06 14:50:15 +02:00
|
|
|
IJeiHelpers helpers = registry.getJeiHelpers();
|
2016-05-07 02:49:03 +02:00
|
|
|
|
2017-07-19 12:19:49 +02:00
|
|
|
registry.handleRecipes(IBookletPage.class, BookletRecipeWrapper::new, BookletRecipeCategory.NAME);
|
|
|
|
registry.handleRecipes(CoffeeIngredient.class, CoffeeMachineRecipeWrapper::new, CoffeeMachineRecipeCategory.NAME);
|
|
|
|
registry.handleRecipes(CrusherRecipe.class, CrusherRecipeWrapper::new, CrusherRecipeCategory.NAME);
|
2017-12-12 07:54:12 +01:00
|
|
|
registry.handleRecipes(LensConversionRecipe.class, ReconstructorRecipeWrapper.FACTORY, ReconstructorRecipeCategory.NAME);
|
2017-07-19 12:19:49 +02:00
|
|
|
registry.handleRecipes(EmpowererRecipe.class, EmpowererRecipeWrapper::new, EmpowererRecipeCategory.NAME);
|
2017-10-31 03:19:48 +01:00
|
|
|
registry.handleRecipes(CompostRecipe.class, CompostRecipeWrapper::new, CompostRecipeCategory.NAME);
|
2017-07-19 12:19:49 +02:00
|
|
|
|
|
|
|
registry.addRecipes(ActuallyAdditionsAPI.BOOKLET_PAGES_WITH_ITEM_OR_FLUID_DATA, BookletRecipeCategory.NAME);
|
|
|
|
registry.addRecipes(ActuallyAdditionsAPI.COFFEE_MACHINE_INGREDIENTS, CoffeeMachineRecipeCategory.NAME);
|
|
|
|
registry.addRecipes(ActuallyAdditionsAPI.CRUSHER_RECIPES, CrusherRecipeCategory.NAME);
|
|
|
|
registry.addRecipes(ActuallyAdditionsAPI.RECONSTRUCTOR_LENS_CONVERSION_RECIPES, ReconstructorRecipeCategory.NAME);
|
|
|
|
registry.addRecipes(ActuallyAdditionsAPI.EMPOWERER_RECIPES, EmpowererRecipeCategory.NAME);
|
2017-10-31 03:19:48 +01:00
|
|
|
registry.addRecipes(ActuallyAdditionsAPI.COMPOST_RECIPES, CompostRecipeCategory.NAME);
|
2016-01-18 23:38:52 +01:00
|
|
|
|
2016-07-03 21:06:44 +02:00
|
|
|
registry.addRecipeClickArea(GuiCoffeeMachine.class, 53, 42, 22, 16, CoffeeMachineRecipeCategory.NAME);
|
2016-02-05 11:19:02 +01:00
|
|
|
registry.addRecipeClickArea(GuiGrinder.class, 80, 40, 24, 22, CrusherRecipeCategory.NAME);
|
|
|
|
registry.addRecipeClickArea(GuiGrinder.GuiGrinderDouble.class, 51, 40, 74, 22, CrusherRecipeCategory.NAME);
|
|
|
|
registry.addRecipeClickArea(GuiFurnaceDouble.class, 51, 40, 74, 22, VanillaRecipeCategoryUid.SMELTING);
|
|
|
|
|
2017-07-19 12:19:49 +02:00
|
|
|
IIngredientBlacklist blacklist = helpers.getIngredientBlacklist();
|
2021-02-28 11:35:10 +01:00
|
|
|
blacklist.addIngredientToBlacklist(new ItemStack(ActuallyBlocks.blockRice.get()));
|
|
|
|
blacklist.addIngredientToBlacklist(new ItemStack(ActuallyBlocks.blockCanola.get()));
|
|
|
|
blacklist.addIngredientToBlacklist(new ItemStack(ActuallyBlocks.blockFlax.get()));
|
|
|
|
blacklist.addIngredientToBlacklist(new ItemStack(ActuallyBlocks.blockCoffee.get()));
|
|
|
|
blacklist.addIngredientToBlacklist(new ItemStack(ActuallyBlocks.blockWildPlant.get(), 1, Util.WILDCARD));
|
|
|
|
blacklist.addIngredientToBlacklist(new ItemStack(ActuallyBlocks.blockColoredLampOn.get(), 1, Util.WILDCARD));
|
2021-03-01 21:23:52 +01:00
|
|
|
// blacklist.addIngredientToBlacklist(new ItemStack(InitItems.itemMisc.get(), 1, TheMiscItems.YOUTUBE_ICON.ordinal()));
|
2016-05-06 14:50:15 +02:00
|
|
|
|
2021-03-01 21:23:52 +01:00
|
|
|
registry.addRecipeCatalyst(new ItemStack(ActuallyItems.itemCrafterOnAStick.get()), VanillaRecipeCategoryUid.CRAFTING);
|
2021-02-28 11:35:10 +01:00
|
|
|
registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.blockFurnaceDouble.get()), VanillaRecipeCategoryUid.SMELTING);
|
|
|
|
registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.blockGrinder.get()), CrusherRecipeCategory.NAME);
|
|
|
|
registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.blockGrinderDouble.get()), CrusherRecipeCategory.NAME);
|
|
|
|
registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.blockCoffeeMachine.get()), CoffeeMachineRecipeCategory.NAME);
|
|
|
|
registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.blockAtomicReconstructor.get()), ReconstructorRecipeCategory.NAME);
|
|
|
|
registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.blockEmpowerer.get()), EmpowererRecipeCategory.NAME);
|
2021-03-01 21:23:52 +01:00
|
|
|
registry.addRecipeCatalyst(new ItemStack(ActuallyItems.itemBooklet.get()), BookletRecipeCategory.NAME);
|
2021-02-28 11:35:10 +01:00
|
|
|
// registry.addRecipeCatalyst(new ItemStack(InitBlocks.blockCompost.get()), CompostRecipeCategory.NAME);
|
2016-01-16 20:06:25 +01:00
|
|
|
}
|
|
|
|
}
|