Finish moving guide over

Some entries crash, others don't. I don't know why right now. It makes
no sense.
This commit is contained in:
Nicholas Ignoffo 2017-08-23 19:43:17 -07:00
parent 9133fdc167
commit 4a47f5cbdc
9 changed files with 244 additions and 514 deletions

View file

@ -40,9 +40,8 @@ public class BloodMagicGuideAPIPlugin implements IGuideBook {
CategoryAlchemy.buildCategory(GUIDE_BOOK);
CategoryArchitect.buildCategory(GUIDE_BOOK);
GUIDE_BOOK.addCategory(new CategoryItemStack(CategoryDemon.buildCategory(), "guide.bloodmagic.category.demon", new ItemStack(RegistrarBloodMagicItems.BLOOD_SHARD)));
GUIDE_BOOK.addCategory(new CategoryItemStack(CategoryRitual.buildCategory(), "guide.bloodmagic.category.ritual", new ItemStack(RegistrarBloodMagicBlocks.RITUAL_CONTROLLER)));
// GUIDE_BOOK.addCategory(new CategoryItemStack(CategorySpell.buildCategory(), "guide.bloodmagic.category.spell", new ItemStack(ModItems.ritualDiviner)));
CategoryDemon.buildCategory(GUIDE_BOOK);
CategoryRitual.buildCategory(GUIDE_BOOK);
return GUIDE_BOOK;
}

View file

@ -1,5 +1,6 @@
package WayofTime.bloodmagic.compat.guideapi;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.api.alchemyCrafting.AlchemyCircleRenderer;
import WayofTime.bloodmagic.api.registry.AlchemyArrayRecipeRegistry;
import WayofTime.bloodmagic.api_impl.BloodMagicAPI;
@ -9,6 +10,7 @@ import WayofTime.bloodmagic.client.render.alchemyArray.DualAlchemyCircleRenderer
import WayofTime.bloodmagic.compat.guideapi.page.PageAlchemyArray;
import WayofTime.bloodmagic.compat.guideapi.page.PageAltarRecipe;
import WayofTime.bloodmagic.compat.guideapi.page.PageTartaricForgeRecipe;
import amerifrance.guideapi.page.PageJsonRecipe;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
@ -28,7 +30,7 @@ public class BookUtils {
}
@Nullable
public static PageTartaricForgeRecipe getForgeRecipe(ItemStack output) {
public static PageTartaricForgeRecipe getForgePage(ItemStack output) {
for (RecipeTartaricForge recipe : BloodMagicAPI.INSTANCE.getRecipeRegistrar().getTartaricForgeRecipes().values())
if (ItemStack.areItemStacksEqualUsingNBTShareTag(output, recipe.getOutput()))
return new PageTartaricForgeRecipe(recipe);
@ -36,6 +38,10 @@ public class BookUtils {
return null;
}
public static PageJsonRecipe getCraftingPage(String name) {
return new PageJsonRecipe(new ResourceLocation(BloodMagic.MODID, name));
}
public static PageAlchemyArray getAlchemyPage(String key) {
ItemStack[] recipe = AlchemyArrayRecipeRegistry.getRecipeForArrayEffect(key);
if (recipe[0] != null) {

View file

@ -25,7 +25,7 @@ public class CategoryAlchemy {
category.getEntry("intro").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "intro.info"), 370));
category.addEntry("ash", new EntryText(keyBase + "ash", true));
category.getEntry("ash").addPage(BookUtils.getForgeRecipe(new ItemStack(RegistrarBloodMagicItems.ARCANE_ASHES)));
category.getEntry("ash").addPage(BookUtils.getForgePage(new ItemStack(RegistrarBloodMagicItems.ARCANE_ASHES)));
category.getEntry("ash").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "ash.info"), 370));
category.addEntry("speed", new EntryText(keyBase + "speed", true));
@ -52,14 +52,7 @@ public class CategoryAlchemy {
category.getEntry("fastMiner").addPage(BookUtils.getAlchemyPage("fastMiner"));
category.getEntry("fastMiner").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "fastMiner.info"), 370));
category.entries.values().forEach(e -> e.pageList.stream().filter(p -> p instanceof PageText).forEach(p -> ((PageText) p).setUnicodeFlag(true)));
book.addCategory(category);
for (EntryAbstract entry : category.entries.values()) {
for (IPage page : entry.pageList) {
if (page instanceof PageText) {
((PageText) page).setUnicodeFlag(true);
}
}
}
}
}

View file

@ -1,38 +1,26 @@
package WayofTime.bloodmagic.compat.guideapi.book;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe;
import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry.AltarRecipe;
import WayofTime.bloodmagic.api.registry.OrbRegistry;
import WayofTime.bloodmagic.api.orb.BloodOrb;
import WayofTime.bloodmagic.compat.guideapi.BookUtils;
import WayofTime.bloodmagic.compat.guideapi.entry.EntryText;
import WayofTime.bloodmagic.compat.guideapi.page.PageAlchemyArray;
import WayofTime.bloodmagic.compat.guideapi.page.PageAltarRecipe;
import WayofTime.bloodmagic.compat.guideapi.page.PageTartaricForgeRecipe;
import WayofTime.bloodmagic.core.RegistrarBloodMagic;
import WayofTime.bloodmagic.core.RegistrarBloodMagicBlocks;
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
import WayofTime.bloodmagic.item.types.ComponentType;
import WayofTime.bloodmagic.util.helper.RecipeHelper;
import WayofTime.bloodmagic.util.helper.TextHelper;
import amerifrance.guideapi.api.IPage;
import amerifrance.guideapi.api.impl.Book;
import amerifrance.guideapi.api.util.PageHelper;
import amerifrance.guideapi.category.CategoryItemStack;
import amerifrance.guideapi.page.PageJsonRecipe;
import amerifrance.guideapi.page.PageText;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.ResourceLocation;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.nbt.NBTTagCompound;
public class CategoryArchitect {
public static void buildCategory(Book book) {
final String keyBase = "guide." + BloodMagic.MODID + ".entry.architect.";
CategoryItemStack category = new CategoryItemStack(keyBase + "architect", new ItemStack(RegistrarBloodMagicItems.SIGIL_DIVINATION));
category.withKeyBase(BloodMagic.MODID);
@ -40,13 +28,13 @@ public class CategoryArchitect {
category.getEntry("intro").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "intro.info"), 370));
category.addEntry("bloodaltar", new EntryText(keyBase + "bloodaltar", true));
category.getEntry("bloodaltar").addPage(new PageJsonRecipe(new ResourceLocation(BloodMagic.MODID, "altar")));
category.getEntry("bloodaltar").addPage(BookUtils.getCraftingPage("altar"));
category.getEntry("bloodaltar").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "bloodaltar.info.1"), 370));
category.getEntry("bloodaltar").addPage(new PageJsonRecipe(new ResourceLocation(BloodMagic.MODID, "sacrificial_dagger")));
category.getEntry("bloodaltar").addPage(BookUtils.getCraftingPage("sacrificial_dagger"));
category.getEntry("bloodaltar").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "bloodaltar.info.2"), 370));
category.addEntry("ash", new EntryText(keyBase + "ash", true));
category.getEntry("ash").addPage(BookUtils.getForgeRecipe(new ItemStack(RegistrarBloodMagicItems.ARCANE_ASHES)));
category.getEntry("ash").addPage(BookUtils.getForgePage(new ItemStack(RegistrarBloodMagicItems.ARCANE_ASHES)));
category.getEntry("ash").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "ash.info"), 370));
category.addEntry("divination", new EntryText(keyBase + "divination", true));
@ -58,17 +46,17 @@ public class CategoryArchitect {
category.addEntry("weakorb", new EntryText(keyBase + "weakorb", true));
category.getEntry("weakorb").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "weakorb.info1"), 370));
category.getEntry("weakorb").addPage(BookUtils.getAltarPage(OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_WEAK)));
category.getEntry("weakorb").addPage(BookUtils.getAltarPage(getOrbStack(RegistrarBloodMagic.ORB_WEAK)));
category.getEntry("weakorb").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "weakorb.info2"), 370));
category.addEntry("incense", new EntryText(keyBase + "incense", true));
category.getEntry("incense").addPage(new PageJsonRecipe(new ResourceLocation(BloodMagic.MODID, "incense_altar")));
category.getEntry("incense").addPage(BookUtils.getCraftingPage("incense_altar"));
category.getEntry("incense").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "incense.info.1"), 370));
category.getEntry("incense").addPage(new PageJsonRecipe(new ResourceLocation(BloodMagic.MODID, "path_wood")));
category.getEntry("incense").addPage(BookUtils.getCraftingPage("path_wood"));
category.getEntry("incense").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "incense.info.2"), 370));
category.addEntry("bloodrune", new EntryText(keyBase + "bloodrune", true));
category.getEntry("bloodrune").addPage(new PageJsonRecipe(new ResourceLocation(BloodMagic.MODID, "blood_rune_blank")));
category.getEntry("bloodrune").addPage(BookUtils.getCraftingPage("blood_rune_blank"));
category.getEntry("bloodrune").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "bloodrune.info.1"), 370));
category.addEntry("inspectoris", new EntryText(keyBase + "inspectoris", true));
@ -80,21 +68,21 @@ public class CategoryArchitect {
category.getEntry("runeSpeed").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "runeSpeed.info.1"), 370));
category.addEntry("water", new EntryText(keyBase + "water", true));
category.getEntry("water").addPage(BookUtils.getForgeRecipe(ComponentType.REAGENT_WATER.getStack()));
category.getEntry("water").addPage(BookUtils.getForgePage(ComponentType.REAGENT_WATER.getStack()));
category.getEntry("water").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_WATER)));
category.getEntry("water").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "water.info.1"), 370));
category.addEntry("lava", new EntryText(keyBase + "lava", true));
category.getEntry("lava").addPage(BookUtils.getForgeRecipe(ComponentType.REAGENT_LAVA.getStack()));
category.getEntry("lava").addPage(BookUtils.getForgePage(ComponentType.REAGENT_LAVA.getStack()));
category.getEntry("lava").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_LAVA)));
category.getEntry("lava").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "lava.info.1"), 370));
category.addEntry("lavaCrystal", new EntryText(keyBase + "lavaCrystal", true));
category.getEntry("lavaCrystal").addPage(new PageJsonRecipe(new ResourceLocation(BloodMagic.MODID, "lava_crystal")));
category.getEntry("lavaCrystal").addPage(BookUtils.getCraftingPage("lava_crystal"));
category.getEntry("lavaCrystal").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "lavaCrystal.info.1"), 370));
category.addEntry("apprenticeorb", new EntryText(keyBase + "apprenticeorb", true));
category.getEntry("apprenticeorb").addPage(BookUtils.getAltarPage(OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_APPRENTICE)));
category.getEntry("apprenticeorb").addPage(BookUtils.getAltarPage(getOrbStack(RegistrarBloodMagic.ORB_APPRENTICE)));
category.getEntry("apprenticeorb").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "apprenticeorb.info.1"), 370));
category.addEntry("dagger", new EntryText(keyBase + "dagger", true));
@ -102,76 +90,76 @@ public class CategoryArchitect {
category.getEntry("dagger").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "dagger.info.1"), 370));
category.addEntry("runeSacrifice", new EntryText(keyBase + "runeSacrifice", true));
category.getEntry("runeSacrifice").addPage(new PageJsonRecipe(new ResourceLocation(BloodMagic.MODID, "blood_rune_sacrifice")));
category.getEntry("runeSacrifice").addPage(BookUtils.getCraftingPage("blood_rune_sacrifice"));
category.getEntry("runeSacrifice").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "runeSacrifice.info.1"), 370));
category.addEntry("runeSelfSacrifice", new EntryText(keyBase + "runeSelfSacrifice", true));
category.getEntry("runeSelfSacrifice").addPage(new PageJsonRecipe(new ResourceLocation(BloodMagic.MODID, "blood_rune_selfsacrifice")));
category.getEntry("runeSelfSacrifice").addPage(BookUtils.getCraftingPage("blood_rune_selfsacrifice"));
category.getEntry("runeSelfSacrifice").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "runeSelfSacrifice.info.1"), 370));
category.addEntry("holding", new EntryText(keyBase + "holding", true));
category.getEntry("holding").addPage(BookUtils.getForgeRecipe(ComponentType.REAGENT_HOLDING.getStack()));
category.getEntry("holding").addPage(BookUtils.getForgePage(ComponentType.REAGENT_HOLDING.getStack()));
category.getEntry("holding").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_HOLDING)));
category.getEntry("holding").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "holding.info.1"), 370));
category.addEntry("air", new EntryText(keyBase + "air", true));
category.getEntry("air").addPage(BookUtils.getForgeRecipe(ComponentType.REAGENT_AIR.getStack()));
category.getEntry("air").addPage(BookUtils.getForgePage(ComponentType.REAGENT_AIR.getStack()));
category.getEntry("air").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_AIR)));
category.getEntry("air").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "air.info.1"), 370));
category.addEntry("void", new EntryText(keyBase + "void", true));
category.getEntry("void").addPage(BookUtils.getForgeRecipe(ComponentType.REAGENT_VOID.getStack()));
category.getEntry("void").addPage(BookUtils.getForgePage(ComponentType.REAGENT_VOID.getStack()));
category.getEntry("void").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_VOID)));
category.getEntry("void").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "void.info.1"), 370));
category.addEntry("greenGrove", new EntryText(keyBase + "greenGrove", true));
category.getEntry("greenGrove").addPage(BookUtils.getForgeRecipe(ComponentType.REAGENT_GROWTH.getStack()));
category.getEntry("greenGrove").addPage(BookUtils.getForgePage(ComponentType.REAGENT_GROWTH.getStack()));
category.getEntry("greenGrove").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_GREEN_GROVE)));
category.getEntry("greenGrove").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "greenGrove.info.1"), 370));
category.addEntry("fastMiner", new EntryText(keyBase + "fastMiner", true));
category.getEntry("fastMiner").addPage(BookUtils.getForgeRecipe(ComponentType.REAGENT_FASTMINER.getStack()));
category.getEntry("fastMiner").addPage(BookUtils.getForgePage(ComponentType.REAGENT_FASTMINER.getStack()));
category.getEntry("fastMiner").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_FAST_MINER)));
category.getEntry("fastMiner").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "fastMiner.info.1"), 370));
category.addEntry("seer", new EntryText(keyBase + "seer", true));
category.getEntry("seer").addPage(BookUtils.getForgeRecipe(ComponentType.REAGENT_SIGHT.getStack()));
category.getEntry("seer").addPage(BookUtils.getForgePage(ComponentType.REAGENT_SIGHT.getStack()));
category.getEntry("seer").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_SEER)));
category.getEntry("seer").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "seer.info.1"), 370));
category.addEntry("magicianOrb", new EntryText(keyBase + "magicianOrb", true));
category.getEntry("magicianOrb").addPage(BookUtils.getAltarPage(OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_MAGICIAN)));
category.getEntry("magicianOrb").addPage(BookUtils.getAltarPage(getOrbStack(RegistrarBloodMagic.ORB_MAGICIAN)));
category.getEntry("magicianOrb").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "magicianOrb.info.1"), 370));
category.addEntry("capacity", new EntryText(keyBase + "capacity", true));
category.getEntry("capacity").addPage(new PageJsonRecipe(new ResourceLocation(BloodMagic.MODID, "blood_rune_capacity")));
category.getEntry("capacity").addPage(BookUtils.getCraftingPage("blood_rune_capacity"));
category.getEntry("capacity").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "capacity.info.1"), 370));
category.addEntry("displacement", new EntryText(keyBase + "displacement", true));
category.getEntry("displacement").addPage(new PageJsonRecipe(new ResourceLocation(BloodMagic.MODID, "blood_rune_displacement")));
category.getEntry("displacement").addPage(BookUtils.getCraftingPage("blood_rune_displacement"));
category.getEntry("displacement").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "displacement.info.1"), 370));
category.addEntry("affinity", new EntryText(keyBase + "affinity", true));
category.getEntry("affinity").addPage(BookUtils.getForgeRecipe(ComponentType.REAGENT_AFFINITY.getStack()));
category.getEntry("affinity").addPage(BookUtils.getForgePage(ComponentType.REAGENT_AFFINITY.getStack()));
category.getEntry("affinity").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_ELEMENTAL_AFFINITY)));
category.getEntry("affinity").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "affinity.info"), 370));
category.addEntry("lamp", new EntryText(keyBase + "lamp", true));
category.getEntry("lamp").addPage(BookUtils.getForgeRecipe(ComponentType.REAGENT_BLOODLIGHT.getStack()));
category.getEntry("lamp").addPage(BookUtils.getForgePage(ComponentType.REAGENT_BLOODLIGHT.getStack()));
category.getEntry("lamp").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_BLOOD_LIGHT)));
category.getEntry("lamp").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "lamp.info.1"), 370));
category.addEntry("magnetism", new EntryText(keyBase + "magnetism", true));
category.getEntry("magnetism").addPage(BookUtils.getForgeRecipe(ComponentType.REAGENT_MAGNETISM.getStack()));
category.getEntry("magnetism").addPage(BookUtils.getForgePage(ComponentType.REAGENT_MAGNETISM.getStack()));
category.getEntry("magnetism").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_MAGNETISM)));
category.getEntry("magnetism").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "magnetism.info.1"), 370));
category.addEntry("peritia", new EntryText(keyBase + "peritia", true));
category.getEntry("peritia").addPage(new PageJsonRecipe(new ResourceLocation(BloodMagic.MODID, "experience_tome")));
category.getEntry("peritia").addPage(BookUtils.getCraftingPage("experience_tome"));
category.getEntry("peritia").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "peritia.info.1"), 370));
category.addEntry("livingArmour", new EntryText(keyBase + "livingArmour", true));
category.getEntry("livingArmour").addPage(BookUtils.getForgeRecipe(ComponentType.REAGENT_BINDING.getStack()));
category.getEntry("livingArmour").addPage(BookUtils.getForgePage(ComponentType.REAGENT_BINDING.getStack()));
category.getEntry("livingArmour").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.LIVING_ARMOUR_CHEST)));
category.getEntry("livingArmour").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.LIVING_ARMOUR_HELMET)));
category.getEntry("livingArmour").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.LIVING_ARMOUR_LEGGINGS)));
@ -186,196 +174,85 @@ public class CategoryArchitect {
category.addEntry("teleposer", new EntryText(keyBase + "teleposer", true));
category.getEntry("teleposer").addPage(BookUtils.getAltarPage(new ItemStack(RegistrarBloodMagicItems.TELEPOSITION_FOCUS)));
category.getEntry("teleposer").addPage(new PageJsonRecipe(new ResourceLocation(BloodMagic.MODID, "teleposer")));
category.getEntry("teleposer").addPage(BookUtils.getCraftingPage("teleposer"));
category.getEntry("teleposer").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "teleposer.info.1"), 370));
List<IPage> boundBladePages = new ArrayList<IPage>();
category.addEntry("boundBlade", new EntryText(keyBase + "boundBlade", true));
category.getEntry("boundBlade").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.BOUND_SWORD)));
category.getEntry("boundBlade").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "boundBlade.info.1"), 370));
PageAlchemyArray boundBladePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.BOUND_SWORD));
if (boundBladePage != null) {
boundBladePages.add(boundBladePage);
}
category.addEntry("boundTool", new EntryText(keyBase + "boundTool", true));
category.getEntry("boundTool").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.BOUND_PICKAXE)));
category.getEntry("boundTool").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.BOUND_AXE)));
category.getEntry("boundTool").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.BOUND_SHOVEL)));
category.getEntry("boundTool").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "boundTool.info.1"), 370));
category.addEntry("weakShard", new EntryText(keyBase + "weakShard", true));
category.getEntry("weakShard").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "weakShard.info.1"), 370));
category.addEntry("masterOrb", new EntryText(keyBase + "masterOrb", true));
category.getEntry("masterOrb").addPage(BookUtils.getAltarPage(getOrbStack(RegistrarBloodMagic.ORB_MASTER)));
category.getEntry("masterOrb").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "masterOrb.info.1"), 370));
category.addEntry("runeOrb", new EntryText(keyBase + "runeOrb", true));
category.getEntry("runeOrb").addPage(BookUtils.getCraftingPage("blood_rune_orb"));
category.getEntry("runeOrb").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "runeOrb.info.1"), 370));
category.addEntry("augmentedCapacity", new EntryText(keyBase + "augmentedCapacity", true));
category.getEntry("augmentedCapacity").addPage(BookUtils.getCraftingPage("blood_rune_augcapacity"));
category.getEntry("augmentedCapacity").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "augmentedCapacity.info.1"), 370));
boundBladePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "boundBlade" + ".info.1"), 370));
entries.put(new ResourceLocation(keyBase + "boundBlade"), new EntryText(boundBladePages, TextHelper.localize(keyBase + "boundBlade"), true));
category.addEntry("charging", new EntryText(keyBase + "charging", true));
category.getEntry("charging").addPage(BookUtils.getCraftingPage("blood_rune_charging"));
category.getEntry("charging").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "charging.info.1"), 370));
List<IPage> boundToolPages = new ArrayList<IPage>();
category.addEntry("acceleration", new EntryText(keyBase + "acceleration", true));
category.getEntry("acceleration").addPage(BookUtils.getCraftingPage("blood_rune_acceleration"));
category.getEntry("acceleration").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "acceleration.info.1"), 370));
PageAlchemyArray boundToolPage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.BOUND_PICKAXE));
if (boundToolPage != null) {
boundToolPages.add(boundToolPage);
}
category.addEntry("suppression", new EntryText(keyBase + "suppression", true));
category.getEntry("suppression").addPage(BookUtils.getForgePage(ComponentType.REAGENT_SUPPRESSION.getStack()));
category.getEntry("suppression").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_SUPPRESSION)));
category.getEntry("suppression").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "suppression.info.1"), 370));
boundToolPage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.BOUND_AXE));
if (boundToolPage != null) {
boundToolPages.add(boundToolPage);
}
category.addEntry("haste", new EntryText(keyBase + "haste", true));
category.getEntry("haste").addPage(BookUtils.getForgePage(ComponentType.REAGENT_HASTE.getStack()));
category.getEntry("haste").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_HASTE)));
category.getEntry("haste").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "haste.info.1"), 370));
boundToolPage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.BOUND_SHOVEL));
if (boundToolPage != null) {
boundToolPages.add(boundToolPage);
}
category.addEntry("severance", new EntryText(keyBase + "severance", true));
category.getEntry("severance").addPage(BookUtils.getForgePage(ComponentType.REAGENT_SEVERANCE.getStack()));
category.getEntry("severance").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_ENDER_SEVERANCE)));
category.getEntry("severance").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "severance.info.1"), 370));
boundToolPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "boundTool" + ".info.1"), 370));
entries.put(new ResourceLocation(keyBase + "boundTool"), new EntryText(boundToolPages, TextHelper.localize(keyBase + "boundTool"), true));
category.addEntry("teleposition", new EntryText(keyBase + "teleposition", true));
category.getEntry("teleposition").addPage(BookUtils.getForgePage(ComponentType.REAGENT_TELEPOSITION.getStack()));
category.getEntry("teleposition").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_TELEPOSITION)));
category.getEntry("teleposition").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "teleposition.info.1"), 370));
List<IPage> weakShardPages = new ArrayList<IPage>();
category.addEntry("compression", new EntryText(keyBase + "compression", true));
category.getEntry("compression").addPage(BookUtils.getForgePage(ComponentType.REAGENT_COMPRESSION.getStack()));
category.getEntry("compression").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_COMPRESSION)));
category.getEntry("compression").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "compression.info.1"), 370));
weakShardPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "weakShard" + ".info.1"), 370));
entries.put(new ResourceLocation(keyBase + "weakShard"), new EntryText(weakShardPages, TextHelper.localize(keyBase + "weakShard"), true));
category.addEntry("bridge", new EntryText(keyBase + "bridge", true));
category.getEntry("bridge").addPage(BookUtils.getForgePage(ComponentType.REAGENT_BRIDGE.getStack()));
category.getEntry("bridge").addPage(BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_PHANTOM_BRIDGE)));
category.getEntry("bridge").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "bridge.info.1"), 370));
List<IPage> masterOrbPages = new ArrayList<IPage>();
AltarRecipe masterOrbRecipe = RecipeHelper.getAltarRecipeForOutput(OrbRegistry.getOrbStack(RegistrarBloodMagic.ORB_MASTER));
if (magicianOrbRecipe != null) {
masterOrbPages.add(new PageAltarRecipe(masterOrbRecipe));
}
masterOrbPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "masterOrb" + ".info.1"), 370));
entries.put(new ResourceLocation(keyBase + "masterOrb"), new EntryText(masterOrbPages, TextHelper.localize(keyBase + "masterOrb"), true));
List<IPage> orbRunePages = new ArrayList<IPage>();
IRecipe orbRuneRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.BLOOD_RUNE, 1, 8));
if (orbRuneRecipe != null) {
orbRunePages.add(BookUtils.getPageForRecipe(orbRuneRecipe));
}
orbRunePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "runeOrb" + ".info.1"), 370));
entries.put(new ResourceLocation(keyBase + "runeOrb"), new EntryText(orbRunePages, TextHelper.localize(keyBase + "runeOrb"), true));
List<IPage> augmentedCapacityPages = new ArrayList<IPage>();
IRecipe augmentedCapacityRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.BLOOD_RUNE, 1, 7));
if (orbRuneRecipe != null) {
augmentedCapacityPages.add(BookUtils.getPageForRecipe(augmentedCapacityRecipe));
}
augmentedCapacityPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "augmentedCapacity" + ".info"), 370));
entries.put(new ResourceLocation(keyBase + "augmentedCapacity"), new EntryText(augmentedCapacityPages, TextHelper.localize(keyBase + "augmentedCapacity"), true));
List<IPage> chargingPages = new ArrayList<IPage>();
IRecipe chargingRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.BLOOD_RUNE, 1, 10));
if (orbRuneRecipe != null) {
chargingPages.add(BookUtils.getPageForRecipe(chargingRecipe));
}
chargingPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "charging" + ".info"), 370));
entries.put(new ResourceLocation(keyBase + "charging"), new EntryText(chargingPages, TextHelper.localize(keyBase + "charging"), true));
List<IPage> accelerationPages = new ArrayList<IPage>();
IRecipe accelerationRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.BLOOD_RUNE, 1, 9));
if (orbRuneRecipe != null) {
accelerationPages.add(BookUtils.getPageForRecipe(accelerationRecipe));
}
accelerationPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "acceleration" + ".info"), 370));
entries.put(new ResourceLocation(keyBase + "acceleration"), new EntryText(accelerationPages, TextHelper.localize(keyBase + "acceleration"), true));
List<IPage> suppressionPages = new ArrayList<IPage>();
TartaricForgeRecipe suppressionRecipe = RecipeHelper.getForgeRecipeForOutput(ComponentType.REAGENT_SUPPRESSION.getStack());
if (suppressionRecipe != null) {
suppressionPages.add(new PageTartaricForgeRecipe(suppressionRecipe));
}
PageAlchemyArray suppressionRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_SUPPRESSION));
if (suppressionRecipePage != null) {
suppressionPages.add(suppressionRecipePage);
}
suppressionPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "suppression" + ".info.1"), 370));
entries.put(new ResourceLocation(keyBase + "suppression"), new EntryText(suppressionPages, TextHelper.localize(keyBase + "suppression"), true));
List<IPage> hastePages = new ArrayList<IPage>();
TartaricForgeRecipe hasteRecipe = RecipeHelper.getForgeRecipeForOutput(ComponentType.REAGENT_HASTE.getStack());
if (hasteRecipe != null) {
hastePages.add(new PageTartaricForgeRecipe(hasteRecipe));
}
PageAlchemyArray hasteRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_HASTE));
if (hasteRecipePage != null) {
hastePages.add(hasteRecipePage);
}
hastePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "haste" + ".info.1"), 370));
entries.put(new ResourceLocation(keyBase + "haste"), new EntryText(hastePages, TextHelper.localize(keyBase + "haste"), true));
List<IPage> severancePages = new ArrayList<IPage>();
TartaricForgeRecipe severanceRecipe = RecipeHelper.getForgeRecipeForOutput(ComponentType.REAGENT_SEVERANCE.getStack());
if (severanceRecipe != null) {
severancePages.add(new PageTartaricForgeRecipe(severanceRecipe));
}
PageAlchemyArray severanceRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_ENDER_SEVERANCE));
if (severanceRecipePage != null) {
severancePages.add(severanceRecipePage);
}
severancePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "severance" + ".info.1"), 370));
entries.put(new ResourceLocation(keyBase + "severance"), new EntryText(severancePages, TextHelper.localize(keyBase + "severance"), true));
List<IPage> telepositionPages = new ArrayList<IPage>();
TartaricForgeRecipe telepositionRecipe = RecipeHelper.getForgeRecipeForOutput(ComponentType.REAGENT_TELEPOSITION.getStack());
if (telepositionRecipe != null) {
telepositionPages.add(new PageTartaricForgeRecipe(telepositionRecipe));
}
PageAlchemyArray telepositionRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_TELEPOSITION));
if (telepositionRecipePage != null) {
telepositionPages.add(telepositionRecipePage);
}
telepositionPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "teleposition" + ".info.1"), 370));
entries.put(new ResourceLocation(keyBase + "teleposition"), new EntryText(telepositionPages, TextHelper.localize(keyBase + "teleposition"), true));
List<IPage> compressionPages = new ArrayList<IPage>();
TartaricForgeRecipe compressionRecipe = RecipeHelper.getForgeRecipeForOutput(ComponentType.REAGENT_COMPRESSION.getStack());
if (compressionRecipe != null) {
compressionPages.add(new PageTartaricForgeRecipe(compressionRecipe));
}
PageAlchemyArray compressionRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_COMPRESSION));
if (compressionRecipePage != null) {
compressionPages.add(compressionRecipePage);
}
compressionPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "compression" + ".info.1"), 370));
entries.put(new ResourceLocation(keyBase + "compression"), new EntryText(compressionPages, TextHelper.localize(keyBase + "compression"), true));
List<IPage> bridgePages = new ArrayList<IPage>();
TartaricForgeRecipe bridgeRecipe = RecipeHelper.getForgeRecipeForOutput(ComponentType.REAGENT_BRIDGE.getStack());
if (bridgeRecipe != null) {
bridgePages.add(new PageTartaricForgeRecipe(bridgeRecipe));
}
PageAlchemyArray bridgeRecipePage = BookUtils.getAlchemyPage(new ItemStack(RegistrarBloodMagicItems.SIGIL_PHANTOM_BRIDGE));
if (bridgeRecipePage != null) {
bridgePages.add(bridgeRecipePage);
}
bridgePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "bridge" + ".info.1"), 370));
entries.put(new ResourceLocation(keyBase + "bridge"), new EntryText(bridgePages, TextHelper.localize(keyBase + "bridge"), true));
List<IPage> mimicPages = new ArrayList<IPage>();
IRecipe mimicRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.MIMIC, 1, 1));
if (mimicRecipe != null) {
mimicPages.add(BookUtils.getPageForRecipe(mimicRecipe));
}
mimicPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "mimic" + ".info.1"), 370));
entries.put(new ResourceLocation(keyBase + "mimic"), new EntryText(mimicPages, TextHelper.localize(keyBase + "mimic"), true));
category.addEntry("mimic", new EntryText(keyBase + "mimic", true));
category.getEntry("mimic").addPage(BookUtils.getCraftingPage("mimic_solidopaque"));
category.getEntry("mimic").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "mimic.info.1"), 370));
category.entries.values().forEach(e -> e.pageList.stream().filter(p -> p instanceof PageText).forEach(p -> ((PageText) p).setUnicodeFlag(true)));
book.addCategory(category);
}
private static ItemStack getOrbStack(BloodOrb orb) {
ItemStack ret = new ItemStack(RegistrarBloodMagicItems.BLOOD_ORB);
NBTTagCompound tag = new NBTTagCompound();
tag.setString("orb", BloodMagic.MODID + ":" + orb.getName());
ret.setTagCompound(tag);
return ret;
}
}

View file

@ -1,191 +1,95 @@
package WayofTime.bloodmagic.compat.guideapi.book;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.api.recipe.TartaricForgeRecipe;
import WayofTime.bloodmagic.compat.guideapi.BookUtils;
import WayofTime.bloodmagic.compat.guideapi.entry.EntryText;
import WayofTime.bloodmagic.compat.guideapi.page.PageTartaricForgeRecipe;
import WayofTime.bloodmagic.core.RegistrarBloodMagicBlocks;
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
import WayofTime.bloodmagic.util.helper.RecipeHelper;
import WayofTime.bloodmagic.util.helper.TextHelper;
import amerifrance.guideapi.api.IPage;
import amerifrance.guideapi.api.impl.abstraction.EntryAbstract;
import amerifrance.guideapi.api.impl.Book;
import amerifrance.guideapi.api.util.PageHelper;
import amerifrance.guideapi.category.CategoryItemStack;
import amerifrance.guideapi.page.PageText;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.ResourceLocation;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
public class CategoryDemon {
//TODO: Add Forge recipe pages
public static Map<ResourceLocation, EntryAbstract> buildCategory() {
Map<ResourceLocation, EntryAbstract> entries = new LinkedHashMap<ResourceLocation, EntryAbstract>();
String keyBase = "guide." + BloodMagic.MODID + ".entry.demon.";
List<IPage> introPages = new ArrayList<IPage>();
introPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "intro" + ".info"), 370));
// introPages.add(new PageImage(new ResourceLocation("bloodmagicguide", "textures/guide/" + ritual.getName() + ".png")));
entries.put(new ResourceLocation(keyBase + "intro"), new EntryText(introPages, TextHelper.localize(keyBase + "intro"), true));
public static void buildCategory(Book book) {
final String keyBase = "guide." + BloodMagic.MODID + ".entry.demon.";
List<IPage> snarePages = new ArrayList<IPage>();
snarePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "snare" + ".info.1"), 370));
CategoryItemStack category = new CategoryItemStack(keyBase + "demon", new ItemStack(RegistrarBloodMagicItems.BLOOD_SHARD));
category.withKeyBase(BloodMagic.MODID);
IRecipe snareRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.SOUL_SNARE));
if (snareRecipe != null) {
snarePages.add(BookUtils.getPageForRecipe(snareRecipe));
}
category.addEntry("intro", new EntryText(keyBase + "intro", true));
category.getEntry("intro").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "intro.info"), 370));
snarePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "snare" + ".info.2"), 370));
entries.put(new ResourceLocation(keyBase + "snare"), new EntryText(snarePages, TextHelper.localize(keyBase + "snare"), true));
category.addEntry("snare", new EntryText(keyBase + "snare", true));
category.getEntry("snare").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "snare.info.1"), 370));
category.getEntry("snare").addPage(BookUtils.getCraftingPage("soul_snare"));
category.getEntry("snare").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "snare.info.2"), 370));
List<IPage> forgePages = new ArrayList<IPage>();
forgePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "forge" + ".info.1"), 370));
category.addEntry("forge", new EntryText(keyBase + "forge", true));
category.getEntry("forge").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "forge.info.1"), 370));
category.getEntry("forge").addPage(BookUtils.getCraftingPage("soul_forge"));
category.getEntry("forge").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "forge.info.2"), 370));
IRecipe forgeRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.SOUL_FORGE));
if (forgeRecipe != null) {
forgePages.add(BookUtils.getPageForRecipe(forgeRecipe));
}
category.addEntry("petty", new EntryText(keyBase + "petty", true));
category.getEntry("petty").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "petty.info.1"), 370));
category.getEntry("petty").addPage(BookUtils.getForgePage(new ItemStack(RegistrarBloodMagicItems.SOUL_GEM)));
category.getEntry("petty").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "petty.info.2"), 370));
forgePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "forge" + ".info.2"), 370));
entries.put(new ResourceLocation(keyBase + "forge"), new EntryText(forgePages, TextHelper.localize(keyBase + "forge"), true));
category.addEntry("sword", new EntryText(keyBase + "sword", true));
category.getEntry("sword").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "sword.info.1"), 370));
category.getEntry("sword").addPage(BookUtils.getForgePage(new ItemStack(RegistrarBloodMagicItems.SENTIENT_SWORD)));
category.getEntry("sword").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "sword.info.2"), 370));
List<IPage> pettyPages = new ArrayList<IPage>();
pettyPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "petty" + ".info.1"), 370));
TartaricForgeRecipe pettyRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.SOUL_GEM));
if (pettyRecipe != null) {
pettyPages.add(new PageTartaricForgeRecipe(pettyRecipe));
}
pettyPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "petty" + ".info.2"), 370));
entries.put(new ResourceLocation(keyBase + "petty"), new EntryText(pettyPages, TextHelper.localize(keyBase + "petty"), true));
category.addEntry("lesser", new EntryText(keyBase + "lesser", true));
category.getEntry("lesser").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "lesser.info.1"), 370));
category.getEntry("lesser").addPage(BookUtils.getForgePage(new ItemStack(RegistrarBloodMagicItems.SOUL_GEM, 1, 1)));
category.getEntry("lesser").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "lesser.info.2"), 370));
List<IPage> swordPages = new ArrayList<IPage>();
swordPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "sword" + ".info.1"), 370));
TartaricForgeRecipe swordRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.SENTIENT_SWORD));
if (swordRecipe != null) {
swordPages.add(new PageTartaricForgeRecipe(swordRecipe));
}
swordPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "sword" + ".info.2"), 370));
entries.put(new ResourceLocation(keyBase + "sword"), new EntryText(swordPages, TextHelper.localize(keyBase + "sword"), true));
category.addEntry("reactions", new EntryText(keyBase + "reactions", true));
category.getEntry("reactions").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "reactions.info"), 370));
List<IPage> lesserPages = new ArrayList<IPage>();
lesserPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "lesser" + ".info.1"), 370));
TartaricForgeRecipe lesserRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.SOUL_GEM, 1, 1));
if (lesserRecipe != null) {
lesserPages.add(new PageTartaricForgeRecipe(lesserRecipe));
}
lesserPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "lesser" + ".info.2"), 370));
entries.put(new ResourceLocation(keyBase + "lesser"), new EntryText(lesserPages, TextHelper.localize(keyBase + "lesser"), true));
category.addEntry("sentientGem", new EntryText(keyBase + "sentientGem", true));
category.getEntry("sentientGem").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "sentientGem.info.1"), 370));
category.getEntry("sentientGem").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "sentientGem.info.2"), 370));
List<IPage> reactionsPages = new ArrayList<IPage>();
reactionsPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "reactions" + ".info"), 370));
entries.put(new ResourceLocation(keyBase + "reactions"), new EntryText(reactionsPages, TextHelper.localize(keyBase + "reactions"), true));
category.addEntry("routing", new EntryText(keyBase + "routing", true));
category.getEntry("routing").addPage(BookUtils.getForgePage(new ItemStack(RegistrarBloodMagicBlocks.ITEM_ROUTING_NODE)));
category.getEntry("routing").addPage(BookUtils.getForgePage(new ItemStack(RegistrarBloodMagicBlocks.INPUT_ROUTING_NODE)));
category.getEntry("routing").addPage(BookUtils.getForgePage(new ItemStack(RegistrarBloodMagicBlocks.OUTPUT_ROUTING_NODE)));
category.getEntry("routing").addPage(BookUtils.getForgePage(new ItemStack(RegistrarBloodMagicBlocks.MASTER_ROUTING_NODE)));
category.getEntry("routing").addPage(BookUtils.getForgePage(new ItemStack(RegistrarBloodMagicItems.NODE_ROUTER)));
category.getEntry("routing").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "routing.info"), 370));
List<IPage> sentientGemPages = new ArrayList<IPage>();
sentientGemPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "sentientGem" + ".info.1"), 370));
sentientGemPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "sentientGem" + ".info.2"), 370));
entries.put(new ResourceLocation(keyBase + "sentientGem"), new EntryText(sentientGemPages, TextHelper.localize(keyBase + "sentientGem"), true));
category.addEntry("aura", new EntryText(keyBase + "aura", true));
category.getEntry("aura").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "aura.info"), 370));
List<IPage> routingPages = new ArrayList<IPage>();
TartaricForgeRecipe nodeRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.ITEM_ROUTING_NODE));
if (nodeRecipe != null) {
routingPages.add(new PageTartaricForgeRecipe(nodeRecipe));
}
TartaricForgeRecipe inputNodeRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.INPUT_ROUTING_NODE));
if (inputNodeRecipe != null) {
routingPages.add(new PageTartaricForgeRecipe(inputNodeRecipe));
}
TartaricForgeRecipe outputNodeRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.OUTPUT_ROUTING_NODE));
if (outputNodeRecipe != null) {
routingPages.add(new PageTartaricForgeRecipe(outputNodeRecipe));
}
TartaricForgeRecipe masterNodeRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.MASTER_ROUTING_NODE));
if (masterNodeRecipe != null) {
routingPages.add(new PageTartaricForgeRecipe(masterNodeRecipe));
}
category.addEntry("types", new EntryText(keyBase + "types", true));
category.getEntry("types").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "types.info"), 370));
TartaricForgeRecipe nodeRouterRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.NODE_ROUTER));
if (nodeRouterRecipe != null) {
routingPages.add(new PageTartaricForgeRecipe(nodeRouterRecipe));
}
category.addEntry("crucible", new EntryText(keyBase + "crucible", true));
category.getEntry("crucible").addPage(BookUtils.getForgePage(new ItemStack(RegistrarBloodMagicBlocks.DEMON_CRUCIBLE)));
category.getEntry("crucible").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "crucible.info"), 370));
routingPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "routing" + ".info"), 370));
entries.put(new ResourceLocation(keyBase + "routing"), new EntryText(routingPages, TextHelper.localize(keyBase + "routing"), true));
category.addEntry("crystallizer", new EntryText(keyBase + "crystallizer", true));
category.getEntry("crystallizer").addPage(BookUtils.getForgePage(new ItemStack(RegistrarBloodMagicBlocks.DEMON_CRYSTALLIZER)));
category.getEntry("crystallizer").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "crystallizer.info"), 370));
List<IPage> auraPages = new ArrayList<IPage>();
category.addEntry("cluster", new EntryText(keyBase + "cluster", true));
category.getEntry("cluster").addPage(BookUtils.getForgePage(new ItemStack(RegistrarBloodMagicBlocks.DEMON_CRYSTAL)));
category.getEntry("cluster").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "cluster.info"), 370));
auraPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "aura" + ".info"), 370));
entries.put(new ResourceLocation(keyBase + "aura"), new EntryText(auraPages, TextHelper.localize(keyBase + "aura"), true));
category.addEntry("pylon", new EntryText(keyBase + "pylon", true));
category.getEntry("pylon").addPage(BookUtils.getForgePage(new ItemStack(RegistrarBloodMagicBlocks.DEMON_PYLON)));
category.getEntry("pylon").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "pylon.info"), 370));
List<IPage> typesPages = new ArrayList<IPage>();
category.addEntry("gauge", new EntryText(keyBase + "gauge", true));
category.getEntry("gauge").addPage(BookUtils.getForgePage(new ItemStack(RegistrarBloodMagicItems.DEMON_WILL_GAUGE)));
category.getEntry("gauge").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "gauge.info"), 370));
typesPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "types" + ".info"), 370));
entries.put(new ResourceLocation(keyBase + "types"), new EntryText(typesPages, TextHelper.localize(keyBase + "types"), true));
List<IPage> cruciblePages = new ArrayList<IPage>();
TartaricForgeRecipe crucibleRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.DEMON_CRUCIBLE));
if (crucibleRecipe != null) {
cruciblePages.add(new PageTartaricForgeRecipe(crucibleRecipe));
}
cruciblePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "crucible" + ".info"), 370));
entries.put(new ResourceLocation(keyBase + "crucible"), new EntryText(cruciblePages, TextHelper.localize(keyBase + "crucible"), true));
List<IPage> crystallizerPages = new ArrayList<IPage>();
TartaricForgeRecipe crystallizerRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.DEMON_CRYSTALLIZER));
if (crystallizerRecipe != null) {
crystallizerPages.add(new PageTartaricForgeRecipe(crystallizerRecipe));
}
crystallizerPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "crystallizer" + ".info"), 370));
entries.put(new ResourceLocation(keyBase + "crystallizer"), new EntryText(crystallizerPages, TextHelper.localize(keyBase + "crystallizer"), true));
List<IPage> clusterPages = new ArrayList<IPage>();
TartaricForgeRecipe clusterRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.DEMON_CRYSTAL));
if (clusterRecipe != null) {
clusterPages.add(new PageTartaricForgeRecipe(clusterRecipe));
}
clusterPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "cluster" + ".info"), 370));
entries.put(new ResourceLocation(keyBase + "cluster"), new EntryText(clusterPages, TextHelper.localize(keyBase + "cluster"), true));
List<IPage> pylonPages = new ArrayList<IPage>();
TartaricForgeRecipe pylonRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.DEMON_PYLON));
if (pylonRecipe != null) {
pylonPages.add(new PageTartaricForgeRecipe(pylonRecipe));
}
pylonPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "pylon" + ".info"), 370));
entries.put(new ResourceLocation(keyBase + "pylon"), new EntryText(pylonPages, TextHelper.localize(keyBase + "pylon"), true));
List<IPage> gaugePages = new ArrayList<IPage>();
TartaricForgeRecipe gaugeRecipe = RecipeHelper.getForgeRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.DEMON_WILL_GAUGE));
if (gaugeRecipe != null) {
gaugePages.add(new PageTartaricForgeRecipe(gaugeRecipe));
}
gaugePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "gauge" + ".info"), 370));
entries.put(new ResourceLocation(keyBase + "gauge"), new EntryText(gaugePages, TextHelper.localize(keyBase + "gauge"), true));
for (Entry<ResourceLocation, EntryAbstract> entry : entries.entrySet()) {
for (IPage page : entry.getValue().pageList) {
if (page instanceof PageText) {
((PageText) page).setUnicodeFlag(true);
}
}
}
return entries;
category.entries.values().forEach(e -> e.pageList.stream().filter(p -> p instanceof PageText).forEach(p -> ((PageText) p).setUnicodeFlag(true)));
book.addCategory(category);
}
}

View file

@ -1,127 +1,113 @@
package WayofTime.bloodmagic.compat.guideapi.book;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.api.registry.AltarRecipeRegistry.AltarRecipe;
import WayofTime.bloodmagic.api.ritual.EnumRuneType;
import WayofTime.bloodmagic.compat.guideapi.BookUtils;
import WayofTime.bloodmagic.compat.guideapi.entry.EntryText;
import WayofTime.bloodmagic.compat.guideapi.page.PageAltarRecipe;
import WayofTime.bloodmagic.core.RegistrarBloodMagicBlocks;
import WayofTime.bloodmagic.core.RegistrarBloodMagicItems;
import WayofTime.bloodmagic.util.helper.RecipeHelper;
import WayofTime.bloodmagic.util.helper.TextHelper;
import amerifrance.guideapi.api.IPage;
import amerifrance.guideapi.api.impl.abstraction.EntryAbstract;
import amerifrance.guideapi.api.impl.Book;
import amerifrance.guideapi.api.util.PageHelper;
import amerifrance.guideapi.category.CategoryItemStack;
import amerifrance.guideapi.page.PageText;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.ResourceLocation;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
public class CategoryRitual {
static String keyBase = "guide." + BloodMagic.MODID + ".entry.ritual.";
static final String keyBase = "guide." + BloodMagic.MODID + ".entry.ritual.";
public static Map<ResourceLocation, EntryAbstract> buildCategory() {
Map<ResourceLocation, EntryAbstract> entries = new LinkedHashMap<ResourceLocation, EntryAbstract>();
public static void buildCategory(Book book) {
CategoryItemStack category = new CategoryItemStack(keyBase + "ritual", new ItemStack(RegistrarBloodMagicBlocks.RITUAL_CONTROLLER));
category.withKeyBase(BloodMagic.MODID);
addRitualPagesToEntries("intro", entries);
addRitualPagesToEntries("basics", entries);
category.addEntry("intro", new EntryText(keyBase + "intro", true));
category.getEntry("intro").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "intro.info")));
List<IPage> ritualStonePages = new ArrayList<IPage>();
category.addEntry("basics", new EntryText(keyBase + "basics", true));
category.getEntry("basics").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "basics.info")));
IRecipe ritualStoneRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.RITUAL_STONE));
if (ritualStoneRecipe != null) {
ritualStonePages.add(BookUtils.getPageForRecipe(ritualStoneRecipe));
}
category.addEntry("ritualStone", new EntryText(keyBase + "ritualStone", true));
category.getEntry("ritualStone").addPage(BookUtils.getCraftingPage("ritual_stone_blank"));
category.getEntry("ritualStone").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "ritualStone.info.1"), 370));
for (EnumRuneType type : EnumRuneType.values())
category.getEntry("ritualStone").addPage(BookUtils.getAltarPage(type.getScribeStack()));
category.getEntry("ritualStone").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "ritualStone.info.2"), 370));
ritualStonePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "ritualStone" + ".info.1"), 370));
category.addEntry("masterRitualStone", new EntryText(keyBase + "masterRitualStone", true));
category.getEntry("masterRitualStone").addPage(BookUtils.getCraftingPage("ritual_controller_master"));
category.getEntry("masterRitualStone").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "masterRitualStone.info"), 370));
for (int i = 1; i < 5; i++) {
EnumRuneType type = EnumRuneType.values()[i];
AltarRecipe scribeRecipe = RecipeHelper.getAltarRecipeForOutput(type.getScribeStack());
if (scribeRecipe != null) {
ritualStonePages.add(new PageAltarRecipe(scribeRecipe));
}
}
category.addEntry("activationCrystal", new EntryText(keyBase + "activationCrystal", true));
category.getEntry("activationCrystal").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "activationCrystal.info.1"), 370));
category.getEntry("activationCrystal").addPage(BookUtils.getAltarPage(new ItemStack(RegistrarBloodMagicItems.ACTIVATION_CRYSTAL)));
category.getEntry("activationCrystal").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "activationCrystal.info.2"), 370));
ritualStonePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "ritualStone" + ".info.2"), 370));
entries.put(new ResourceLocation(keyBase + "ritualStone"), new EntryText(ritualStonePages, TextHelper.localize(keyBase + "ritualStone"), true));
category.addEntry("diviner", new EntryText(keyBase + "diviner", true));
category.getEntry("diviner").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "diviner.info.1"), 370));
category.getEntry("diviner").addPage(BookUtils.getCraftingPage("ritual_diviner_0"));
category.getEntry("diviner").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "diviner.info.2"), 370));
List<IPage> masterRitualStonePages = new ArrayList<IPage>();
category.addEntry("fullSpring", new EntryText(keyBase + "fullSpring", true));
category.getEntry("fullSpring").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "fullSpring.info")));
IRecipe masterRitualStoneRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicBlocks.RITUAL_CONTROLLER, 1, 0));
if (masterRitualStoneRecipe != null) {
masterRitualStonePages.add(BookUtils.getPageForRecipe(masterRitualStoneRecipe));
}
category.addEntry("lava", new EntryText(keyBase + "lava", true));
category.getEntry("lava").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "lava.info")));
masterRitualStonePages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "masterRitualStone" + ".info"), 370));
entries.put(new ResourceLocation(keyBase + "masterRitualStone"), new EntryText(masterRitualStonePages, TextHelper.localize(keyBase + "masterRitualStone"), true));
category.addEntry("greenGrove", new EntryText(keyBase + "greenGrove", true));
category.getEntry("greenGrove").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "greenGrove.info")));
List<IPage> activationCrystalPages = new ArrayList<IPage>();
category.addEntry("magnetism", new EntryText(keyBase + "magnetism", true));
category.getEntry("magnetism").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "magnetism.info")));
activationCrystalPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "activationCrystal" + ".info.1"), 370));
category.addEntry("crusher", new EntryText(keyBase + "crusher", true));
category.getEntry("crusher").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "crusher.info")));
AltarRecipe crystalRecipe = RecipeHelper.getAltarRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.ACTIVATION_CRYSTAL));
if (crystalRecipe != null) {
activationCrystalPages.add(new PageAltarRecipe(crystalRecipe));
}
category.addEntry("highJump", new EntryText(keyBase + "highJump", true));
category.getEntry("highJump").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "highJump.info")));
activationCrystalPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "activationCrystal" + ".info.2"), 370));
entries.put(new ResourceLocation(keyBase + "activationCrystal"), new EntryText(activationCrystalPages, TextHelper.localize(keyBase + "activationCrystal"), true));
category.addEntry("speed", new EntryText(keyBase + "speed", true));
category.getEntry("speed").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "speed.info")));
List<IPage> divinerPages = new ArrayList<IPage>();
category.addEntry("wellOfSuffering", new EntryText(keyBase + "wellOfSuffering", true));
category.getEntry("wellOfSuffering").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "wellOfSuffering.info")));
divinerPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "diviner" + ".info.1"), 370));
category.addEntry("featheredKnife", new EntryText(keyBase + "featheredKnife", true));
category.getEntry("featheredKnife").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "featheredKnife.info")));
IRecipe divinerRecipe = RecipeHelper.getRecipeForOutput(new ItemStack(RegistrarBloodMagicItems.RITUAL_DIVINER));
if (divinerRecipe != null) {
divinerPages.add(BookUtils.getPageForRecipe(divinerRecipe));
}
category.addEntry("regen", new EntryText(keyBase + "regen", true));
category.getEntry("regen").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "regen.info")));
divinerPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "diviner" + ".info.2"), 370));
entries.put(new ResourceLocation(keyBase + "diviner"), new EntryText(divinerPages, TextHelper.localize(keyBase + "diviner"), true));
category.addEntry("harvest", new EntryText(keyBase + "harvest", true));
category.getEntry("harvest").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "harvest.info")));
addRitualPagesToEntries("fullSpring", entries);
addRitualPagesToEntries("lava", entries);
addRitualPagesToEntries("greenGrove", entries);
addRitualPagesToEntries("magnetism", entries);
addRitualPagesToEntries("crusher", entries);
addRitualPagesToEntries("highJump", entries);
addRitualPagesToEntries("speed", entries);
addRitualPagesToEntries("wellOfSuffering", entries);
addRitualPagesToEntries("featheredKnife", entries);
addRitualPagesToEntries("regen", entries);
addRitualPagesToEntries("harvest", entries);
addRitualPagesToEntries("interdiction", entries);
addRitualPagesToEntries("containment", entries);
addRitualPagesToEntries("suppression", entries);
addRitualPagesToEntries("expulsion", entries);
addRitualPagesToEntries("zephyr", entries);
addRitualPagesToEntries("laying", entries);
addRitualPagesToEntries("timberman", entries);
addRitualPagesToEntries("meteor", entries);
addRitualPagesToEntries("downgrade", entries);
category.addEntry("interdiction", new EntryText(keyBase + "interdiction", true));
category.getEntry("interdiction").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "interdiction.info")));
for (Entry<ResourceLocation, EntryAbstract> entry : entries.entrySet()) {
for (IPage page : entry.getValue().pageList) {
if (page instanceof PageText) {
((PageText) page).setUnicodeFlag(true);
}
}
}
category.addEntry("containment", new EntryText(keyBase + "containment", true));
category.getEntry("containment").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "containment.info")));
return entries;
}
category.addEntry("suppression", new EntryText(keyBase + "suppression", true));
category.getEntry("suppression").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "suppression.info")));
public static void addRitualPagesToEntries(String name, Map<ResourceLocation, EntryAbstract> entries) {
List<IPage> pages = new ArrayList<IPage>();
pages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + name + ".info"), 370));
entries.put(new ResourceLocation(keyBase + name), new EntryText(pages, TextHelper.localize(keyBase + name), true));
category.addEntry("expulsion", new EntryText(keyBase + "expulsion", true));
category.getEntry("expulsion").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "expulsion.info")));
category.addEntry("zephyr", new EntryText(keyBase + "zephyr", true));
category.getEntry("zephyr").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "zephyr.info")));
category.addEntry("laying", new EntryText(keyBase + "laying", true));
category.getEntry("laying").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "laying.info")));
category.addEntry("timberman", new EntryText(keyBase + "timberman", true));
category.getEntry("timberman").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "timberman.info")));
category.addEntry("meteor", new EntryText(keyBase + "meteor", true));
category.getEntry("meteor").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "meteor.info")));
category.addEntry("downgrade", new EntryText(keyBase + "downgrade", true));
category.getEntry("downgrade").addPageList(PageHelper.pagesForLongText(I18n.format(keyBase + "downgrade.info")));
category.entries.values().forEach(e -> e.pageList.stream().filter(p -> p instanceof PageText).forEach(p -> ((PageText) p).setUnicodeFlag(true)));
book.addCategory(category);
}
}

View file

@ -1,17 +0,0 @@
package WayofTime.bloodmagic.compat.guideapi.book;
import WayofTime.bloodmagic.api.Constants;
import amerifrance.guideapi.api.impl.abstraction.EntryAbstract;
import net.minecraft.util.ResourceLocation;
import java.util.LinkedHashMap;
import java.util.Map;
public class CategorySpell {
public static Map<ResourceLocation, EntryAbstract> buildCategory() {
Map<ResourceLocation, EntryAbstract> entries = new LinkedHashMap<ResourceLocation, EntryAbstract>();
String keyBase = Constants.Mod.DOMAIN + "spell_";
return entries;
}
}

View file

@ -3,7 +3,6 @@ package WayofTime.bloodmagic.proxy;
import WayofTime.bloodmagic.api.ritual.CapabilityRuneType;
import WayofTime.bloodmagic.api.ritual.IRitualStone;
import WayofTime.bloodmagic.api.teleport.TeleportQueue;
import WayofTime.bloodmagic.fuel.FuelHandler;
import com.google.common.collect.ImmutableMap;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
@ -13,12 +12,10 @@ import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.animation.ITimeValue;
import net.minecraftforge.common.capabilities.CapabilityManager;
import net.minecraftforge.common.model.animation.IAnimationStateMachine;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class CommonProxy {
public void preInit() {
MinecraftForge.EVENT_BUS.register(TeleportQueue.getInstance());
GameRegistry.registerFuelHandler(new FuelHandler());
registerRenderers();
}

View file

@ -1,15 +0,0 @@
package WayofTime.bloodmagic.util.helper;
import WayofTime.bloodmagic.api_impl.BloodMagicAPI;
import WayofTime.bloodmagic.api_impl.recipe.RecipeBloodAltar;
import WayofTime.bloodmagic.api_impl.recipe.RecipeTartaricForge;
import WayofTime.bloodmagic.compat.guideapi.page.PageAltarRecipe;
import WayofTime.bloodmagic.compat.guideapi.page.PageTartaricForgeRecipe;
import net.minecraft.item.ItemStack;
import javax.annotation.Nullable;
public class RecipeHelper {
}