2015-11-28 23:52:06 -08:00
|
|
|
package WayofTime.bloodmagic.compat.jei;
|
|
|
|
|
2016-01-02 23:41:26 -08:00
|
|
|
import WayofTime.bloodmagic.api.Constants;
|
2016-01-11 12:28:08 -08:00
|
|
|
import WayofTime.bloodmagic.api.livingArmour.LivingArmourHandler;
|
2015-12-26 16:50:22 -08:00
|
|
|
import WayofTime.bloodmagic.compat.jei.alchemyArray.AlchemyArrayCraftingCategory;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.alchemyArray.AlchemyArrayCraftingRecipeHandler;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.alchemyArray.AlchemyArrayCraftingRecipeMaker;
|
2015-11-28 23:52:06 -08:00
|
|
|
import WayofTime.bloodmagic.compat.jei.altar.AltarRecipeCategory;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.altar.AltarRecipeHandler;
|
|
|
|
import WayofTime.bloodmagic.compat.jei.altar.AltarRecipeMaker;
|
2015-12-02 19:27:28 -08: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 10:47:36 -05: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 12:28:08 -08:00
|
|
|
import WayofTime.bloodmagic.item.ItemUpgradeTome;
|
2015-12-23 01:23:52 -08:00
|
|
|
import WayofTime.bloodmagic.registry.ModBlocks;
|
2015-12-26 17:08:58 -08:00
|
|
|
import WayofTime.bloodmagic.registry.ModItems;
|
2015-12-23 01:23:52 -08:00
|
|
|
import mezz.jei.api.*;
|
|
|
|
import net.minecraft.item.ItemStack;
|
2015-11-28 23:52:06 -08:00
|
|
|
|
2016-01-11 12:28:08 -08:00
|
|
|
import java.util.Map;
|
|
|
|
|
2015-12-03 17:12:50 -08:00
|
|
|
@JEIPlugin
|
2015-12-30 15:34:40 -05:00
|
|
|
public class BloodMagicPlugin implements IModPlugin
|
|
|
|
{
|
2015-12-26 16:50:22 -08:00
|
|
|
public static IJeiHelpers jeiHelper;
|
|
|
|
|
2015-11-28 23:52:06 -08:00
|
|
|
@Override
|
2015-12-30 15:34:40 -05:00
|
|
|
public void register(IModRegistry registry)
|
|
|
|
{
|
2016-01-09 10:47:36 -05:00
|
|
|
registry.addRecipeCategories(new AltarRecipeCategory(), new BindingRecipeCategory(), new AlchemyArrayCraftingCategory(), new TartaricForgeRecipeCategory());
|
2015-11-28 23:52:06 -08:00
|
|
|
|
2016-01-09 10:47:36 -05:00
|
|
|
registry.addRecipeHandlers(new AltarRecipeHandler(), new BindingRecipeHandler(), new AlchemyArrayCraftingRecipeHandler(), new TartaricForgeRecipeHandler());
|
2015-11-28 23:52:06 -08:00
|
|
|
|
2015-12-14 01:07:22 -06:00
|
|
|
registry.addRecipes(AltarRecipeMaker.getRecipes());
|
|
|
|
registry.addRecipes(BindingRecipeMaker.getRecipes());
|
2015-12-26 16:50:22 -08:00
|
|
|
registry.addRecipes(AlchemyArrayCraftingRecipeMaker.getRecipes());
|
2016-01-09 10:47:36 -05:00
|
|
|
registry.addRecipes(TartaricForgeRecipeMaker.getRecipes());
|
2015-12-26 17:08:58 -08:00
|
|
|
|
2015-12-29 21:30:48 -08:00
|
|
|
registry.addDescription(new ItemStack(ModItems.altarMaker), "jei.BloodMagic.desc.altarBuilder");
|
2016-01-08 17:09:44 -08: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 12:28:08 -08: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-08 17:09:44 -08:00
|
|
|
jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(Constants.NBT.OWNER_UUID);
|
|
|
|
jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(Constants.NBT.SOULS);
|
2015-11-28 23:52:06 -08:00
|
|
|
}
|
2015-12-23 01:23:52 -08:00
|
|
|
|
|
|
|
@Override
|
2015-12-30 15:34:40 -05:00
|
|
|
public void onJeiHelpersAvailable(IJeiHelpers jeiHelpers)
|
|
|
|
{
|
2015-12-26 16:50:22 -08:00
|
|
|
jeiHelper = jeiHelpers;
|
2015-12-23 01:23:52 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-12-30 15:34:40 -05:00
|
|
|
public void onItemRegistryAvailable(IItemRegistry itemRegistry)
|
|
|
|
{
|
2015-12-23 01:23:52 -08:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2015-12-30 15:34:40 -05:00
|
|
|
public void onRecipeRegistryAvailable(IRecipeRegistry recipeRegistry)
|
|
|
|
{
|
2015-12-23 01:23:52 -08:00
|
|
|
|
|
|
|
}
|
2015-11-28 23:52:06 -08:00
|
|
|
}
|