2016-03-18 04:07:49 -07:00
|
|
|
package WayofTime.bloodmagic.compat.jei;
|
|
|
|
|
|
|
|
import WayofTime.bloodmagic.api.Constants;
|
|
|
|
import WayofTime.bloodmagic.api.livingArmour.LivingArmourHandler;
|
2016-04-11 19:57:23 -04:00
|
|
|
import WayofTime.bloodmagic.api.util.helper.ItemHelper.LivingUpgrades;
|
2016-05-02 13:45:52 -04:00
|
|
|
import WayofTime.bloodmagic.client.gui.GuiSoulForge;
|
2016-03-18 04:07:49 -07:00
|
|
|
import WayofTime.bloodmagic.compat.jei.alchemyArray.AlchemyArrayCraftingCategory;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.alchemyArray.AlchemyArrayCraftingRecipeHandler;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.alchemyArray.AlchemyArrayCraftingRecipeMaker;
|
2016-05-02 13:45:52 -04:00
|
|
|
import WayofTime.bloodmagic.compat.jei.alchemyTable.AlchemyTableRecipeCategory;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.alchemyTable.AlchemyTableRecipeHandler;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.alchemyTable.AlchemyTableRecipeMaker;
|
2016-03-18 04:07:49 -07:00
|
|
|
import WayofTime.bloodmagic.compat.jei.altar.AltarRecipeCategory;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.altar.AltarRecipeHandler;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.altar.AltarRecipeMaker;
|
2016-11-10 10:39:19 -05:00
|
|
|
import WayofTime.bloodmagic.compat.jei.armourDowngrade.ArmourDowngradeRecipeCategory;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.armourDowngrade.ArmourDowngradeRecipeHandler;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.armourDowngrade.ArmourDowngradeRecipeMaker;
|
2016-03-18 04:07:49 -07:00
|
|
|
import WayofTime.bloodmagic.compat.jei.binding.BindingRecipeCategory;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.binding.BindingRecipeHandler;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.binding.BindingRecipeMaker;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.forge.TartaricForgeRecipeCategory;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.forge.TartaricForgeRecipeHandler;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.forge.TartaricForgeRecipeMaker;
|
2017-08-15 18:14:28 -07:00
|
|
|
import WayofTime.bloodmagic.core.RegistrarBloodMagicBlocks;
|
|
|
|
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
|
2017-08-15 21:30:48 -07:00
|
|
|
import mezz.jei.api.*;
|
|
|
|
import mezz.jei.api.recipe.IRecipeCategoryRegistration;
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
|
|
|
import javax.annotation.Nonnull;
|
|
|
|
import java.util.Map;
|
2016-03-18 04:07:49 -07:00
|
|
|
|
|
|
|
@JEIPlugin
|
2017-08-15 21:30:48 -07:00
|
|
|
public class BloodMagicPlugin extends BlankModPlugin {
|
2016-03-18 04:07:49 -07:00
|
|
|
public static IJeiHelpers jeiHelper;
|
|
|
|
|
|
|
|
@Override
|
2017-08-15 21:30:48 -07:00
|
|
|
public void register(@Nonnull IModRegistry registry) {
|
2016-03-18 04:07:49 -07:00
|
|
|
jeiHelper = registry.getJeiHelpers();
|
|
|
|
|
2017-08-15 20:21:54 -07:00
|
|
|
registry.addRecipeHandlers(
|
|
|
|
new AltarRecipeHandler(),
|
|
|
|
new BindingRecipeHandler(),
|
|
|
|
new AlchemyArrayCraftingRecipeHandler(),
|
|
|
|
new TartaricForgeRecipeHandler(),
|
|
|
|
new AlchemyTableRecipeHandler(),
|
|
|
|
new ArmourDowngradeRecipeHandler()
|
|
|
|
);
|
2016-03-18 04:07:49 -07:00
|
|
|
|
|
|
|
registry.addRecipes(AltarRecipeMaker.getRecipes());
|
|
|
|
registry.addRecipes(BindingRecipeMaker.getRecipes());
|
|
|
|
registry.addRecipes(AlchemyArrayCraftingRecipeMaker.getRecipes());
|
|
|
|
registry.addRecipes(TartaricForgeRecipeMaker.getRecipes());
|
2016-05-02 13:45:52 -04:00
|
|
|
registry.addRecipes(AlchemyTableRecipeMaker.getRecipes());
|
2016-11-10 10:39:19 -05:00
|
|
|
registry.addRecipes(ArmourDowngradeRecipeMaker.getRecipes());
|
2016-03-18 04:07:49 -07:00
|
|
|
|
2017-08-15 20:21:54 -07:00
|
|
|
registry.addIngredientInfo(new ItemStack(RegistrarBloodMagicItems.ALTAR_MAKER), ItemStack.class, "jei.bloodmagic.desc.altarBuilder");
|
|
|
|
registry.addIngredientInfo(new ItemStack(RegistrarBloodMagicItems.MONSTER_SOUL), ItemStack.class, "jei.bloodmagic.desc.demonicWill");
|
2016-03-18 04:07:49 -07:00
|
|
|
|
2017-08-15 21:30:48 -07:00
|
|
|
for (Map.Entry<String, Integer> entry : LivingArmourHandler.upgradeMaxLevelMap.entrySet()) {
|
2016-03-18 04:07:49 -07:00
|
|
|
String key = entry.getKey();
|
|
|
|
int maxLevel = entry.getValue();
|
2017-08-15 21:30:48 -07:00
|
|
|
for (int i = 0; i < maxLevel - 1; i++) {
|
2017-08-14 20:53:42 -07:00
|
|
|
ItemStack stack = new ItemStack(RegistrarBloodMagicItems.UPGRADE_TOME);
|
2016-04-11 19:57:23 -04:00
|
|
|
LivingUpgrades.setKey(stack, key);
|
|
|
|
LivingUpgrades.setLevel(stack, i);
|
2017-08-15 20:21:54 -07:00
|
|
|
jeiHelper.getIngredientBlacklist().addIngredientToBlacklist(stack);
|
2016-03-18 04:07:49 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-04-18 19:23:47 -07:00
|
|
|
registry.addRecipeClickArea(GuiSoulForge.class, 115, 15, 16, 88, Constants.Compat.JEI_CATEGORY_SOULFORGE);
|
|
|
|
|
2017-08-15 20:21:54 -07:00
|
|
|
registry.addRecipeCatalyst(new ItemStack(RegistrarBloodMagicBlocks.ALTAR), Constants.Compat.JEI_CATEGORY_ALTAR);
|
|
|
|
registry.addRecipeCatalyst(new ItemStack(RegistrarBloodMagicBlocks.SOUL_FORGE), Constants.Compat.JEI_CATEGORY_SOULFORGE);
|
|
|
|
registry.addRecipeCatalyst(new ItemStack(RegistrarBloodMagicItems.ARCANE_ASHES), Constants.Compat.JEI_CATEGORY_ALCHEMYARRAY);
|
|
|
|
registry.addRecipeCatalyst(new ItemStack(RegistrarBloodMagicItems.ARCANE_ASHES), Constants.Compat.JEI_CATEGORY_BINDING);
|
|
|
|
registry.addRecipeCatalyst(new ItemStack(RegistrarBloodMagicBlocks.ALCHEMY_TABLE), Constants.Compat.JEI_CATEGORY_ALCHEMYTABLE);
|
|
|
|
registry.addRecipeCatalyst(new ItemStack(RegistrarBloodMagicBlocks.RITUAL_CONTROLLER), Constants.Compat.JEI_CATEGORY_ARMOURDOWNGRADE);
|
2017-01-02 01:18:02 -08:00
|
|
|
}
|
2016-05-01 08:35:07 -07:00
|
|
|
|
2017-01-02 01:18:02 -08:00
|
|
|
@Override
|
|
|
|
public void registerItemSubtypes(ISubtypeRegistry subtypeRegistry) {
|
2017-08-14 20:53:42 -07:00
|
|
|
subtypeRegistry.useNbtForSubtypes(RegistrarBloodMagicItems.UPGRADE_TOME);
|
2017-08-19 20:45:11 -07:00
|
|
|
subtypeRegistry.useNbtForSubtypes(RegistrarBloodMagicItems.BLOOD_ORB);
|
2016-03-18 04:07:49 -07:00
|
|
|
}
|
2017-08-15 20:21:54 -07:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void registerCategories(IRecipeCategoryRegistration registry) {
|
|
|
|
if (jeiHelper == null)
|
|
|
|
jeiHelper = registry.getJeiHelpers();
|
|
|
|
|
|
|
|
registry.addRecipeCategories(
|
|
|
|
new AltarRecipeCategory(),
|
|
|
|
new BindingRecipeCategory(),
|
|
|
|
new AlchemyArrayCraftingCategory(),
|
|
|
|
new TartaricForgeRecipeCategory(),
|
|
|
|
new AlchemyTableRecipeCategory(),
|
|
|
|
new ArmourDowngradeRecipeCategory()
|
|
|
|
);
|
|
|
|
}
|
2016-03-18 04:07:49 -07:00
|
|
|
}
|