2016-06-03 16:56:13 -07:00
|
|
|
package WayofTime.bloodmagic.compat.guideapi;
|
|
|
|
|
2016-06-16 15:40:44 -04:00
|
|
|
import net.minecraft.init.Blocks;
|
2016-06-03 16:56:13 -07:00
|
|
|
import net.minecraft.init.Items;
|
|
|
|
import net.minecraft.item.ItemStack;
|
2016-06-04 13:56:02 -07:00
|
|
|
import net.minecraftforge.fml.common.FMLCommonHandler;
|
2016-06-03 16:56:13 -07:00
|
|
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
2016-06-04 13:56:02 -07:00
|
|
|
import net.minecraftforge.fml.relauncher.Side;
|
2016-06-16 15:40:44 -04:00
|
|
|
import WayofTime.bloodmagic.compat.ICompatibility;
|
|
|
|
import amerifrance.guideapi.api.GuideAPI;
|
2016-06-03 16:56:13 -07:00
|
|
|
|
2016-06-16 15:40:44 -04:00
|
|
|
public class CompatibilityGuideAPI implements ICompatibility
|
|
|
|
{
|
2016-06-03 16:56:13 -07:00
|
|
|
|
|
|
|
@Override
|
2016-06-16 15:40:44 -04:00
|
|
|
public void loadCompatibility(InitializationPhase phase)
|
|
|
|
{
|
|
|
|
switch (phase)
|
|
|
|
{
|
|
|
|
case PRE_INIT:
|
|
|
|
{
|
|
|
|
GuideBloodMagic.initBook();
|
|
|
|
GameRegistry.register(GuideBloodMagic.guideBook);
|
|
|
|
// AltarRecipeRegistry.registerRecipe(new AltarRecipeRegistry.AltarRecipe(new ItemStack(Items.BOOK), GuideAPI.getStackFromBook(GuideBloodMagic.guideBook), EnumAltarTier.ONE, 500, 2, 0));
|
|
|
|
GameRegistry.addShapelessRecipe(GuideAPI.getStackFromBook(GuideBloodMagic.guideBook), new ItemStack(Items.BOOK), Blocks.GLASS, Items.FEATHER);
|
|
|
|
if (FMLCommonHandler.instance().getSide() == Side.CLIENT)
|
|
|
|
GuideAPI.setModel(GuideBloodMagic.guideBook);
|
2016-06-04 13:56:02 -07:00
|
|
|
|
2016-06-16 15:40:44 -04:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case INIT:
|
|
|
|
{
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case POST_INIT:
|
|
|
|
{
|
|
|
|
GuideBloodMagic.initCategories();
|
|
|
|
break;
|
|
|
|
}
|
2016-06-03 16:56:13 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2016-06-16 15:40:44 -04:00
|
|
|
public String getModId()
|
|
|
|
{
|
2016-06-03 16:56:13 -07:00
|
|
|
return "guideapi";
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2016-06-16 15:40:44 -04:00
|
|
|
public boolean enableCompat()
|
|
|
|
{
|
2016-06-03 16:56:13 -07:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|