Added a test entry for the Demon Kin
This commit is contained in:
parent
93623a6687
commit
424d84d5ad
5 changed files with 40 additions and 26 deletions
|
@ -15,11 +15,13 @@ import net.minecraftforge.fml.relauncher.Side;
|
|||
|
||||
import java.awt.Color;
|
||||
|
||||
public class GuideBloodMagic {
|
||||
public class GuideBloodMagic
|
||||
{
|
||||
|
||||
public static Book guideBook;
|
||||
|
||||
public static void initBook() {
|
||||
public static void initBook()
|
||||
{
|
||||
guideBook = new Book();
|
||||
guideBook.setTitle("guide.BloodMagic.title");
|
||||
guideBook.setDisplayName("guide.BloodMagic.display");
|
||||
|
@ -32,7 +34,8 @@ public class GuideBloodMagic {
|
|||
GuideAPI.setModel(guideBook);
|
||||
}
|
||||
|
||||
public static void initCategories() {
|
||||
public static void initCategories()
|
||||
{
|
||||
guideBook.addCategory(new CategoryItemStack(CategoryAlchemy.buildCategory(), "guide.BloodMagic.category.alchemy", new ItemStack(ModItems.arcaneAshes)));
|
||||
guideBook.addCategory(new CategoryItemStack(CategoryArchitect.buildCategory(), "guide.BloodMagic.category.architect", new ItemStack(ModItems.sigilDivination)));
|
||||
guideBook.addCategory(new CategoryItemStack(CategoryDemon.buildCategory(), "guide.BloodMagic.category.demon", new ItemStack(ModItems.bloodShard)));
|
||||
|
@ -40,17 +43,9 @@ public class GuideBloodMagic {
|
|||
guideBook.addCategory(new CategoryItemStack(CategorySpell.buildCategory(), "guide.BloodMagic.category.spell", new ItemStack(ModItems.ritualDiviner)));
|
||||
}
|
||||
|
||||
public static void initJEIBlacklist() {
|
||||
public static void initJEIBlacklist()
|
||||
{
|
||||
if (Loader.isModLoaded("JEI"))
|
||||
BloodMagicPlugin.jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(
|
||||
GuideAPI.guideBook,
|
||||
NBTBookTags.BOOK_TAG,
|
||||
NBTBookTags.CATEGORY_PAGE_TAG,
|
||||
NBTBookTags.CATEGORY_TAG,
|
||||
NBTBookTags.ENTRY_PAGE_TAG,
|
||||
NBTBookTags.ENTRY_TAG,
|
||||
NBTBookTags.KEY_TAG,
|
||||
NBTBookTags.PAGE_TAG
|
||||
);
|
||||
BloodMagicPlugin.jeiHelper.getNbtIgnoreList().ignoreNbtTagNames(GuideAPI.guideBook, NBTBookTags.BOOK_TAG, NBTBookTags.CATEGORY_PAGE_TAG, NBTBookTags.CATEGORY_TAG, NBTBookTags.ENTRY_PAGE_TAG, NBTBookTags.ENTRY_TAG, NBTBookTags.KEY_TAG, NBTBookTags.PAGE_TAG);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,31 @@
|
|||
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.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class CategoryDemon {
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.compat.guideapi.entry.EntryText;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
import amerifrance.guideapi.api.IPage;
|
||||
import amerifrance.guideapi.api.impl.abstraction.EntryAbstract;
|
||||
import amerifrance.guideapi.api.util.PageHelper;
|
||||
|
||||
public static Map<ResourceLocation, EntryAbstract> buildCategory() {
|
||||
public class CategoryDemon
|
||||
{
|
||||
|
||||
public static Map<ResourceLocation, EntryAbstract> buildCategory()
|
||||
{
|
||||
Map<ResourceLocation, EntryAbstract> entries = new HashMap<ResourceLocation, EntryAbstract>();
|
||||
String keyBase = Constants.Mod.DOMAIN + "demon_";
|
||||
String keyBase = "guide." + Constants.Mod.MODID + ".entry.demon.";
|
||||
|
||||
List<IPage> ritualPages = new ArrayList<IPage>();
|
||||
ritualPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(keyBase + "intro" + ".info"), 300));
|
||||
// ritualPages.add(new PageImage(new ResourceLocation("bloodmagicguide", "textures/guide/" + ritual.getName() + ".png")));
|
||||
|
||||
entries.put(new ResourceLocation(keyBase + "intro"), new EntryText(ritualPages, TextHelper.localize("Test"), true));
|
||||
|
||||
return entries;
|
||||
}
|
||||
|
|
|
@ -16,13 +16,16 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class CategoryRitual {
|
||||
public class CategoryRitual
|
||||
{
|
||||
|
||||
public static Map<ResourceLocation, EntryAbstract> buildCategory() {
|
||||
public static Map<ResourceLocation, EntryAbstract> buildCategory()
|
||||
{
|
||||
Map<ResourceLocation, EntryAbstract> entries = new HashMap<ResourceLocation, EntryAbstract>();
|
||||
String keyBase = Constants.Mod.DOMAIN + "ritual_";
|
||||
|
||||
for (Ritual ritual : RitualRegistry.getRituals()) {
|
||||
for (Ritual ritual : RitualRegistry.getRituals())
|
||||
{
|
||||
List<IPage> ritualPages = new ArrayList<IPage>();
|
||||
ritualPages.addAll(PageHelper.pagesForLongText(TextHelper.localize(ritual.getUnlocalizedName() + ".info")));
|
||||
ritualPages.add(new PageImage(new ResourceLocation("bloodmagicguide", "textures/guide/" + ritual.getName() + ".png")));
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
//@ParametersAreNonnullByDefault
|
||||
//@MethodsReturnNonnullByDefault
|
||||
//package WayofTime.bloodmagic.compat.guideapi;
|
||||
package WayofTime.bloodmagic.compat.guideapi;
|
||||
|
||||
//
|
||||
//import mcp.MethodsReturnNonnullByDefault;
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue