diff --git a/MODSRC/vazkii/botania/client/lib/LibResources.java b/MODSRC/vazkii/botania/client/lib/LibResources.java index fcb5d4d10..513217784 100644 --- a/MODSRC/vazkii/botania/client/lib/LibResources.java +++ b/MODSRC/vazkii/botania/client/lib/LibResources.java @@ -49,6 +49,7 @@ public final class LibResources { public static final String ENTRY_PORTAL2 = PREFIX_ENTRIES + "portal2.png"; public static final String ENTRY_PORTAL3 = PREFIX_ENTRIES + "portal3.png"; public static final String ENTRY_PORTAL4 = PREFIX_ENTRIES + "portal4.png"; + public static final String ENTRY_ELVEN_GARDE = PREFIX_ENTRIES + "elvenGarde.png"; public static final String MODEL_ALTAR = PREFIX_MODEL + "altar.png"; public static final String MODEL_SPREADER = PREFIX_MODEL + "spreader.png"; diff --git a/MODSRC/vazkii/botania/common/block/tile/TileAlfPortal.java b/MODSRC/vazkii/botania/common/block/tile/TileAlfPortal.java index abfe2788c..b3eb02343 100644 --- a/MODSRC/vazkii/botania/common/block/tile/TileAlfPortal.java +++ b/MODSRC/vazkii/botania/common/block/tile/TileAlfPortal.java @@ -28,6 +28,7 @@ import vazkii.botania.api.recipe.RecipeElvenTrade; import vazkii.botania.common.Botania; import vazkii.botania.common.block.ModBlocks; import vazkii.botania.common.block.tile.mana.TilePool; +import vazkii.botania.common.item.ItemLexicon; import com.google.common.base.Function; @@ -179,6 +180,7 @@ public class TileAlfPortal extends TileMod { for(ItemStack stack : stacksIn) { if(stack.getItem() instanceof ILexicon) { ((ILexicon) stack.getItem()).unlockKnowledge(stack, BotaniaAPI.elvenKnowledge); + ItemLexicon.forceMessage(stack, true); spawnItem(stack); stacksIn.remove(i); return; diff --git a/MODSRC/vazkii/botania/common/item/ItemLexicon.java b/MODSRC/vazkii/botania/common/item/ItemLexicon.java index a73433dba..b3301f059 100644 --- a/MODSRC/vazkii/botania/common/item/ItemLexicon.java +++ b/MODSRC/vazkii/botania/common/item/ItemLexicon.java @@ -38,6 +38,7 @@ import vazkii.botania.api.recipe.IElvenItem; import vazkii.botania.common.Botania; import vazkii.botania.common.core.helper.ItemNBTHelper; import vazkii.botania.common.core.helper.MathHelper; +import vazkii.botania.common.lexicon.LexiconData; import vazkii.botania.common.lib.LibGuiIDs; import vazkii.botania.common.lib.LibItemNames; import vazkii.botania.common.lib.LibMisc; @@ -45,7 +46,8 @@ import vazkii.botania.common.lib.LibMisc; public class ItemLexicon extends ItemMod implements ILexicon, IElvenItem { private static final String TAG_KNOWLEDGE_PREFIX = "knowledge."; - + private static final String TAG_FORCED_MESSAGE = "forcedMessage"; + public ItemLexicon() { super(); setMaxStackSize(1); @@ -116,6 +118,10 @@ public class ItemLexicon extends ItemMod implements ILexicon, IElvenItem { @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { + if(isMessageForced(par1ItemStack)) { + Botania.proxy.setEntryToOpen(LexiconData.elvenMessage); + forceMessage(par1ItemStack, false); + } par3EntityPlayer.openGui(Botania.instance, LibGuiIDs.LEXICON, par2World, 0, 0, 0); return par1ItemStack; } @@ -134,6 +140,14 @@ public class ItemLexicon extends ItemMod implements ILexicon, IElvenItem { public void unlockKnowledge(ItemStack stack, KnowledgeType knowledge) { ItemNBTHelper.setBoolean(stack, TAG_KNOWLEDGE_PREFIX + knowledge.id, true); } + + public static void forceMessage(ItemStack stack, boolean forced) { + ItemNBTHelper.setBoolean(stack, TAG_FORCED_MESSAGE, forced); + } + + public static boolean isMessageForced(ItemStack stack) { + return ItemNBTHelper.getBoolean(stack, TAG_FORCED_MESSAGE, false); + } @Override public boolean isElvenItem(ItemStack stack) { diff --git a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java index 2fb57a31d..36473c2f3 100644 --- a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java +++ b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java @@ -142,6 +142,7 @@ public final class LexiconData { public static LexiconEntry flightTiara; public static LexiconEntry alfhomancyIntro; + public static LexiconEntry elvenMessage; public static LexiconEntry elvenResources; public static LexiconEntry unstableBlocks; @@ -453,12 +454,15 @@ public final class LexiconData { // ALFHOMANCY ENTRIES alfhomancyIntro = new BLexiconEntry(LibLexicon.ALF_INTRO, categoryAlfhomancy); - alfhomancyIntro.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCrafingRecipes.recipeAlfPortal), new PageCraftingRecipe("3", ModCrafingRecipes.recipeNaturaPylon), + alfhomancyIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCrafingRecipes.recipeAlfPortal), new PageCraftingRecipe("3", ModCrafingRecipes.recipeNaturaPylon), new PageImage("4", LibResources.ENTRY_PORTAL0), new PageImage("5", LibResources.ENTRY_PORTAL1), new PageImage("6", LibResources.ENTRY_PORTAL2), new PageImage("7", LibResources.ENTRY_PORTAL3), new PageImage("8", LibResources.ENTRY_PORTAL4), new PageText("9"), new PageText("10"), new PageText("11")); + elvenMessage = new ALexiconEntry(LibLexicon.ALF_MESSAGE, categoryAlfhomancy); + elvenMessage.setPriority().setLexiconPages(new PageImage("0", LibResources.ENTRY_ELVEN_GARDE), new PageText("1")); + elvenResources = new ALexiconEntry(LibLexicon.ALF_RESOURCES, categoryAlfhomancy); - elvenResources.setLexiconPages(new PageText("0")); + elvenResources.setPriority().setLexiconPages(new PageText("0")); // MISCLENAEOUS ENTRIES unstableBlocks = new BLexiconEntry(LibLexicon.MISC_UNSTABLE_BLOCKS, categoryMisc); diff --git a/MODSRC/vazkii/botania/common/lib/LibLexicon.java b/MODSRC/vazkii/botania/common/lib/LibLexicon.java index 8833551ed..c3af05951 100644 --- a/MODSRC/vazkii/botania/common/lib/LibLexicon.java +++ b/MODSRC/vazkii/botania/common/lib/LibLexicon.java @@ -122,6 +122,7 @@ public final class LibLexicon { public static final String BAUBLE_FLIGHT_TIARA = "flightTiara"; public static final String ALF_INTRO = "aIntro"; + public static final String ALF_MESSAGE = "elfMessage"; public static final String ALF_RESOURCES = "elfResources"; public static final String MISC_UNSTABLE_BLOCKS = "unstableBlocks"; diff --git a/resources/assets/botania/lang/en_US.lang b/resources/assets/botania/lang/en_US.lang index 9ffb2878e..5e46a8cc1 100644 --- a/resources/assets/botania/lang/en_US.lang +++ b/resources/assets/botania/lang/en_US.lang @@ -1065,6 +1065,12 @@ botania.page.aIntro9=To open up the portal, simply right click the core with a & botania.page.aIntro10=The amount of &4Mana&0 required to open up the portal is orders of magnitude higher than that to keep it maintained, thus closing the portal to prevent &4Mana&0 loss is a poor strategy.
Furthermore, the link isn't strong enough to allow living beings to go through it, but it seems that &4items&0 can. botania.page.aIntro11=The amount of information about &1Alfheim&0 stored in this lexicon is resumed to this entry alone, perhaps &4letting the Elves have a look at it&0 might prove beneficial. +# -- A MESSAGE FROM ELVEN GARDE +botania.entry.elfMessage=A Message from Elven Garde +botania.page.elfMessage0= +# ^ This is blank on purpose +botania.page.elfMessage1=WIP + # -- THE RESOURCES OF ALFHEIM botania.entry.elfResources=The Resources of Alfheim botania.page.elfResources0=WIP diff --git a/resources/assets/botania/textures/gui/entries/elvenGarde.png b/resources/assets/botania/textures/gui/entries/elvenGarde.png new file mode 100644 index 000000000..6ade3a274 Binary files /dev/null and b/resources/assets/botania/textures/gui/entries/elvenGarde.png differ