2015-11-29 07:52:06 +00:00
|
|
|
package WayofTime.bloodmagic.compat.jei;
|
|
|
|
|
2016-01-03 07:41:26 +00:00
|
|
|
import WayofTime.bloodmagic.api.Constants;
|
2016-01-11 20:28:08 +00:00
|
|
|
import WayofTime.bloodmagic.api.livingArmour.LivingArmourHandler;
|
2015-12-27 00:50:22 +00:00
|
|
|
import WayofTime.bloodmagic.compat.jei.alchemyArray.AlchemyArrayCraftingCategory;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.alchemyArray.AlchemyArrayCraftingRecipeHandler;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.alchemyArray.AlchemyArrayCraftingRecipeMaker;
|
2015-11-29 07:52:06 +00:00
|
|
|
import WayofTime.bloodmagic.compat.jei.altar.AltarRecipeCategory;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.altar.AltarRecipeHandler;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.altar.AltarRecipeMaker;
|
2015-12-03 03:27:28 +00:00
|
|
|
import WayofTime.bloodmagic.compat.jei.binding.BindingRecipeCategory;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.binding.BindingRecipeHandler;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.binding.BindingRecipeMaker;
|
2016-01-09 15:47:36 +00:00
|
|
|
import WayofTime.bloodmagic.compat.jei.forge.TartaricForgeRecipeCategory;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.forge.TartaricForgeRecipeHandler;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.forge.TartaricForgeRecipeMaker;
|
2016-01-11 20:28:08 +00:00
|
|
|
import WayofTime.bloodmagic.item.ItemUpgradeTome;
|
2015-12-23 09:23:52 +00:00
|
|
|
import WayofTime.bloodmagic.registry.ModBlocks;
|
2015-12-27 01:08:58 +00:00
|
|
|
import WayofTime.bloodmagic.registry.ModItems;
|
2015-12-23 09:23:52 +00:00
|
|
|
import mezz.jei.api.*;
|
|
|
|
import net.minecraft.item.ItemStack;
|
2015-11-29 07:52:06 +00:00
|
|
|
|
2016-01-11 20:28:08 +00:00
|
|
|
import java.util.Map;
|
|
|
|
|
2015-12-04 01:12:50 +00:00
|
|
|
@JEIPlugin
|
2015-12-30 20:34:40 +00:00
|
|
|
public class BloodMagicPlugin implements IModPlugin
|
|
|
|
{
|
2015-12-27 00:50:22 +00:00
|
|
|
public static IJeiHelpers jeiHelper;
|
|
|
|
|
2015-11-29 07:52:06 +00:00
|
|
|
@Override
|
2015-12-30 20:34:40 +00:00
|
|
|
public void register(IModRegistry registry)
|
|
|
|
{
|
2016-01-09 15:47:36 +00:00
|
|
|
registry.addRecipeCategories(new AltarRecipeCategory(), new BindingRecipeCategory(), new AlchemyArrayCraftingCategory(), new TartaricForgeRecipeCategory());
|
2015-11-29 07:52:06 +00:00
|
|
|
|
2016-01-09 15:47:36 +00:00
|
|
|
registry.addRecipeHandlers(new AltarRecipeHandler(), new BindingRecipeHandler(), new AlchemyArrayCraftingRecipeHandler(), new TartaricForgeRecipeHandler());
|
2015-11-29 07:52:06 +00:00
|
|
|
|
2015-12-14 07:07:22 +00:00
|
|
|
registry.addRecipes(AltarRecipeMaker.getRecipes());
|
|
|
|
registry.addRecipes(BindingRecipeMaker.getRecipes());
|
2015-12-27 00:50:22 +00:00
|
|
|
registry.addRecipes(AlchemyArrayCraftingRecipeMaker.getRecipes());
|
2016-01-09 15:47:36 +00:00
|
|
|
registry.addRecipes(TartaricForgeRecipeMaker.getRecipes());
|
2015-12-27 01:08:58 +00:00
|
|
|
|
2015-12-30 05:30:48 +00:00
|
|
|
registry.addDescription(new ItemStack(ModItems.altarMaker), "jei.BloodMagic.desc.altarBuilder");
|
2016-01-09 01:09:44 +00:00
|
|
|
|
|
|
|
jeiHelper.getItemBlacklist().addItemToBlacklist(new ItemStack(ModBlocks.bloodLight));
|
|
|
|
jeiHelper.getItemBlacklist().addItemToBlacklist(new ItemStack(ModBlocks.spectralBlock));
|
|
|
|
jeiHelper.getItemBlacklist().addItemToBlacklist(new ItemStack(ModBlocks.phantomBlock));
|
|
|
|
|
2016-01-11 20:28:08 +00:00
|
|
|
for (Map.Entry<String, Integer> entry : LivingArmourHandler.upgradeMaxLevelMap.entrySet())
|
|
|
|
{
|
|
|
|
String key = entry.getKey();
|
|
|
|
int maxLevel = entry.getValue();
|
|
|
|
for (int i = 0; i < maxLevel - 1; i++)
|
|
|
|
{
|
|
|
|
ItemStack stack = new ItemStack(ModItems.upgradeTome);
|
|
|
|
((ItemUpgradeTome)ModItems.upgradeTome).setKey(stack, key);
|
|
|
|
((ItemUpgradeTome)ModItems.upgradeTome).setLevel(stack, i);
|
|
|
|
jeiHelper.getItemBlacklist().addItemToBlacklist(stack);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-01-09 01:09:44 +00:00
|
|
|
jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(Constants.NBT.OWNER_UUID);
|
|
|
|
jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(Constants.NBT.SOULS);
|
2015-11-29 07:52:06 +00:00
|
|
|
}
|
2015-12-23 09:23:52 +00:00
|
|
|
|
|
|
|
@Override
|
2015-12-30 20:34:40 +00:00
|
|
|
public void onJeiHelpersAvailable(IJeiHelpers jeiHelpers)
|
|
|
|
{
|
2015-12-27 00:50:22 +00:00
|
|
|
jeiHelper = jeiHelpers;
|
2015-12-23 09:23:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-12-30 20:34:40 +00:00
|
|
|
public void onItemRegistryAvailable(IItemRegistry itemRegistry)
|
|
|
|
{
|
2015-12-23 09:23:52 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-12-30 20:34:40 +00:00
|
|
|
public void onRecipeRegistryAvailable(IRecipeRegistry recipeRegistry)
|
|
|
|
{
|
2015-12-23 09:23:52 +00:00
|
|
|
|
|
|
|
}
|
2015-11-29 07:52:06 +00:00
|
|
|
}
|