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
|
|
|
|
*
|
2016-05-16 22:54:42 +02:00
|
|
|
* © 2015-2016 Ellpeck
|
2016-01-16 20:06:25 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
package de.ellpeck.actuallyadditions.mod.jei;
|
|
|
|
|
|
|
|
import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
2016-01-22 18:52:38 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
2016-05-06 14:50:15 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.inventory.ContainerCrafter;
|
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;
|
2016-01-18 23:38:52 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.items.InitItems;
|
2016-06-12 13:39:26 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.items.metalists.TheMiscItems;
|
2016-01-16 20:06:25 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.booklet.BookletRecipeCategory;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.booklet.BookletRecipeHandler;
|
2016-01-17 12:17:24 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.coffee.CoffeeMachineRecipeCategory;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.coffee.CoffeeMachineRecipeHandler;
|
2016-01-17 15:09:59 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.crusher.CrusherRecipeCategory;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.crusher.CrusherRecipeHandler;
|
2016-08-03 04:01:47 +02:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.empowerer.EmpowererRecipeCategory;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.empowerer.EmpowererRecipeHandler;
|
2016-01-17 22:57:32 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.reconstructor.ReconstructorRecipeCategory;
|
|
|
|
import de.ellpeck.actuallyadditions.mod.jei.reconstructor.ReconstructorRecipeHandler;
|
2016-01-22 18:52:38 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.Util;
|
2016-01-16 20:06:25 +01:00
|
|
|
import mezz.jei.api.*;
|
2016-02-05 11:19:02 +01:00
|
|
|
import mezz.jei.api.recipe.VanillaRecipeCategoryUid;
|
2016-05-06 14:50:15 +02:00
|
|
|
import mezz.jei.api.recipe.transfer.IRecipeTransferRegistry;
|
2016-01-22 18:52:38 +01:00
|
|
|
import net.minecraft.item.ItemStack;
|
2016-01-16 20:06:25 +01:00
|
|
|
|
|
|
|
@JEIPlugin
|
|
|
|
public class JEIActuallyAdditionsPlugin implements IModPlugin{
|
|
|
|
|
|
|
|
@Override
|
2016-05-29 23:49:35 +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
|
|
|
|
2016-01-16 20:06:25 +01:00
|
|
|
registry.addRecipeCategories(
|
2016-05-06 14:50:15 +02:00
|
|
|
new CoffeeMachineRecipeCategory(helpers.getGuiHelper()),
|
|
|
|
new CrusherRecipeCategory(helpers.getGuiHelper()),
|
2016-08-03 04:01:47 +02:00
|
|
|
new ReconstructorRecipeCategory(helpers.getGuiHelper()),
|
2016-08-31 20:48:30 +02:00
|
|
|
new EmpowererRecipeCategory(helpers.getGuiHelper()),
|
|
|
|
new BookletRecipeCategory(helpers.getGuiHelper())
|
2016-01-16 20:06:25 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
registry.addRecipeHandlers(
|
2016-01-17 15:09:59 +01:00
|
|
|
new CoffeeMachineRecipeHandler(),
|
2016-01-17 22:57:32 +01:00
|
|
|
new CrusherRecipeHandler(),
|
2016-08-03 04:01:47 +02:00
|
|
|
new ReconstructorRecipeHandler(),
|
2016-08-31 20:48:30 +02:00
|
|
|
new EmpowererRecipeHandler(),
|
|
|
|
new BookletRecipeHandler()
|
2016-01-16 20:06:25 +01:00
|
|
|
);
|
|
|
|
|
2016-05-19 20:05:12 +02:00
|
|
|
registry.addRecipes(ActuallyAdditionsAPI.BOOKLET_PAGES_WITH_ITEM_DATA);
|
|
|
|
registry.addRecipes(ActuallyAdditionsAPI.COFFEE_MACHINE_INGREDIENTS);
|
|
|
|
registry.addRecipes(ActuallyAdditionsAPI.CRUSHER_RECIPES);
|
|
|
|
registry.addRecipes(ActuallyAdditionsAPI.RECONSTRUCTOR_LENS_CONVERSION_RECIPES);
|
2016-08-03 04:01:47 +02:00
|
|
|
registry.addRecipes(ActuallyAdditionsAPI.EMPOWERER_RECIPES);
|
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);
|
|
|
|
|
2016-05-06 14:50:15 +02:00
|
|
|
IItemBlacklist blacklist = helpers.getItemBlacklist();
|
2016-01-22 18:52:38 +01:00
|
|
|
blacklist.addItemToBlacklist(new ItemStack(InitBlocks.blockRice));
|
|
|
|
blacklist.addItemToBlacklist(new ItemStack(InitBlocks.blockCanola));
|
|
|
|
blacklist.addItemToBlacklist(new ItemStack(InitBlocks.blockFlax));
|
|
|
|
blacklist.addItemToBlacklist(new ItemStack(InitBlocks.blockCoffee));
|
|
|
|
blacklist.addItemToBlacklist(new ItemStack(InitBlocks.blockWildPlant, 1, Util.WILDCARD));
|
|
|
|
blacklist.addItemToBlacklist(new ItemStack(InitBlocks.blockColoredLampOn, 1, Util.WILDCARD));
|
2016-06-12 13:39:26 +02:00
|
|
|
blacklist.addItemToBlacklist(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.YOUTUBE_ICON.ordinal()));
|
2016-05-06 14:50:15 +02:00
|
|
|
|
|
|
|
IRecipeTransferRegistry transfer = registry.getRecipeTransferRegistry();
|
|
|
|
transfer.addRecipeTransferHandler(ContainerCrafter.class, VanillaRecipeCategoryUid.CRAFTING, 1, 9, 10, 36);
|
|
|
|
|
|
|
|
registry.addRecipeCategoryCraftingItem(new ItemStack(InitItems.itemCrafterOnAStick), VanillaRecipeCategoryUid.CRAFTING);
|
|
|
|
registry.addRecipeCategoryCraftingItem(new ItemStack(InitBlocks.blockFurnaceDouble), VanillaRecipeCategoryUid.SMELTING);
|
|
|
|
registry.addRecipeCategoryCraftingItem(new ItemStack(InitBlocks.blockGrinder), CrusherRecipeCategory.NAME);
|
|
|
|
registry.addRecipeCategoryCraftingItem(new ItemStack(InitBlocks.blockGrinderDouble), CrusherRecipeCategory.NAME);
|
2016-07-03 21:06:44 +02:00
|
|
|
registry.addRecipeCategoryCraftingItem(new ItemStack(InitBlocks.blockCoffeeMachine), CoffeeMachineRecipeCategory.NAME);
|
|
|
|
registry.addRecipeCategoryCraftingItem(new ItemStack(InitBlocks.blockAtomicReconstructor), ReconstructorRecipeCategory.NAME);
|
2016-08-03 04:01:47 +02:00
|
|
|
registry.addRecipeCategoryCraftingItem(new ItemStack(InitBlocks.blockEmpowerer), EmpowererRecipeCategory.NAME);
|
2016-07-03 21:06:44 +02:00
|
|
|
registry.addRecipeCategoryCraftingItem(new ItemStack(InitItems.itemBooklet), BookletRecipeCategory.NAME);
|
2016-01-16 20:06:25 +01:00
|
|
|
}
|
|
|
|
|
2016-02-01 21:20:05 +01:00
|
|
|
@Override
|
2016-05-29 23:49:35 +02:00
|
|
|
public void onRuntimeAvailable(IJeiRuntime jeiRuntime){
|
2016-02-01 21:20:05 +01:00
|
|
|
|
|
|
|
}
|
2016-01-16 20:06:25 +01:00
|
|
|
}
|