diff --git a/MODSRC/vazkii/botania/client/lib/LibResources.java b/MODSRC/vazkii/botania/client/lib/LibResources.java index 17b878ac2..2f4fd3bf2 100644 --- a/MODSRC/vazkii/botania/client/lib/LibResources.java +++ b/MODSRC/vazkii/botania/client/lib/LibResources.java @@ -28,6 +28,7 @@ public final class LibResources { public static final String GUI_CRAFTING_OVERLAY = PREFIX_GUI + "craftingOverlay.png"; public static final String ENTRY_FLOWERS = PREFIX_ENTRIES + "flowers.png"; + public static final String ENTRY_APOTHECARY = PREFIX_ENTRIES + "apothecary.png"; public static final String MODEL_ALTAR = PREFIX_MODEL + "altar.png"; diff --git a/MODSRC/vazkii/botania/common/block/BlockAltar.java b/MODSRC/vazkii/botania/common/block/BlockAltar.java index b1053e1e8..b8d71abe7 100644 --- a/MODSRC/vazkii/botania/common/block/BlockAltar.java +++ b/MODSRC/vazkii/botania/common/block/BlockAltar.java @@ -21,13 +21,16 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Icon; import net.minecraft.world.World; +import vazkii.botania.api.ILexiconable; +import vazkii.botania.api.LexiconEntry; import vazkii.botania.client.lib.LibRenderIDs; import vazkii.botania.common.block.tile.TileAltar; +import vazkii.botania.common.lexicon.LexiconData; import vazkii.botania.common.lib.LibBlockIDs; import vazkii.botania.common.lib.LibBlockNames; import cpw.mods.fml.common.network.PacketDispatcher; -public class BlockAltar extends BlockModContainer { +public class BlockAltar extends BlockModContainer implements ILexiconable { protected BlockAltar() { super(LibBlockIDs.idAltar, Material.rock); @@ -88,4 +91,9 @@ public class BlockAltar extends BlockModContainer { return new TileAltar(); } + @Override + public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) { + return LexiconData.apothecary; + } + } diff --git a/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java b/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java index 53d6ea19f..5e0f73d03 100644 --- a/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java +++ b/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java @@ -13,6 +13,7 @@ package vazkii.botania.common.crafting; import java.util.List; +import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; @@ -28,16 +29,17 @@ import cpw.mods.fml.common.registry.GameRegistry; public final class ModCrafingRecipes { - public static IRecipe lexiconRecipe; + public static IRecipe recipeLexicon; public static List recipesPetals; public static List recipesDyes; public static IRecipe recipePestleAndMortar; public static List recipesTwigWand; + public static List recipesApothecary; public static void init() { // Lexicon Recipe addShapelessOreDictRecipe(new ItemStack(ModItems.lexicon), "treeSapling", Item.book); - lexiconRecipe = BotaniaAPI.getLatestAddedRecipe(); + recipeLexicon = BotaniaAPI.getLatestAddedRecipe(); // Petal/Dye Recipes for(int i = 0; i < 16; i++) @@ -66,7 +68,16 @@ public final class ModCrafingRecipes { 'S', "stickWood"); } recipesTwigWand = BotaniaAPI.getLatestAddedRecipes(256); - + + // Petal Apothecary Recipes + for(int i = 0; i < 16; i++) + addOreDictRecipe(new ItemStack(ModBlocks.altar), + "SPS", " C ", "CCC", + 'S', new ItemStack(Block.stoneSingleSlab, 1, 3), + 'P', LibOreDict.PETAL[i], + 'C', "cobblestone"); + recipesApothecary = BotaniaAPI.getLatestAddedRecipes(16); + } private static void addOreDictRecipe(ItemStack output, Object... recipe) { diff --git a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java index 5ad6edd24..1a9ea556b 100644 --- a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java +++ b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java @@ -24,18 +24,23 @@ import vazkii.botania.common.lib.LibLexicon; public final class LexiconData { public static LexiconCategory categoryBasics; - public static LexiconCategory categoryEnergy; - public static LexiconCategory categoryFlowers; + public static LexiconCategory categoryMana; + public static LexiconCategory categoryFunctionalFlowers; + public static LexiconCategory categoryGenerationFlowers; public static LexiconCategory categoryDevices; public static LexiconCategory categoryTools; public static LexiconCategory categoryMisc; - + public static LexiconEntry flowers; + public static LexiconEntry apothecary; + public static LexiconEntry lexicon; + public static LexiconEntry wand; public static void init() { BotaniaAPI.addCategory(categoryBasics = new LexiconCategory(LibLexicon.CATEGORY_BASICS)); - BotaniaAPI.addCategory(categoryEnergy = new LexiconCategory(LibLexicon.CATEGORY_ENERGY)); - BotaniaAPI.addCategory(categoryFlowers = new LexiconCategory(LibLexicon.CATEGORY_FLOWERS)); + BotaniaAPI.addCategory(categoryMana = new LexiconCategory(LibLexicon.CATEGORY_MANA)); + BotaniaAPI.addCategory(categoryFunctionalFlowers = new LexiconCategory(LibLexicon.CATEGORY_FUNCTIONAL_FLOWERS)); + BotaniaAPI.addCategory(categoryGenerationFlowers = new LexiconCategory(LibLexicon.CATEGORY_GENERATION_FLOWERS)); BotaniaAPI.addCategory(categoryDevices = new LexiconCategory(LibLexicon.CATEGORY_DEVICES)); BotaniaAPI.addCategory(categoryTools = new LexiconCategory(LibLexicon.CATEGORY_TOOLS)); BotaniaAPI.addCategory(categoryMisc = new LexiconCategory(LibLexicon.CATEGORY_MISC)); @@ -44,15 +49,14 @@ public final class LexiconData { flowers = new BLexiconEntry(LibLexicon.BASICS_FLOWERS, categoryBasics); flowers.setPriority().setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_FLOWERS), new PageText("2"), new PageCraftingRecipes("3", ModCrafingRecipes.recipesPetals), new PageCraftingRecipes("4", ModCrafingRecipes.recipePestleAndMortar), new PageCraftingRecipes("5", ModCrafingRecipes.recipesDyes)); - // ENERGY ENTRIES - - // FLOWERS ENTRIES - - // DEVICES ENTRIES - - // TOOLS ENTRIES - - // MISC ENTRIES + apothecary = new BLexiconEntry(LibLexicon.BASICS_APOTHECARY, categoryBasics); + apothecary.setPriority().setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_APOTHECARY), new PageText("2"), new PageText("3"), new PageCraftingRecipes("4", ModCrafingRecipes.recipesApothecary)); + + lexicon = new BLexiconEntry(LibLexicon.BASICS_LEXICON, categoryBasics); + lexicon.setPriority().setLexiconPages(new PageText("0"), new PageCraftingRecipes("1", ModCrafingRecipes.recipeLexicon)); + + wand = new BLexiconEntry(LibLexicon.BASICS_WAND, categoryBasics); + wand.setPriority().setLexiconPages(new PageText("0"), new PageCraftingRecipes("1", ModCrafingRecipes.recipesTwigWand)); } } diff --git a/MODSRC/vazkii/botania/common/lexicon/page/PageCraftingRecipes.java b/MODSRC/vazkii/botania/common/lexicon/page/PageCraftingRecipes.java index db58abe94..d9fd1da26 100644 --- a/MODSRC/vazkii/botania/common/lexicon/page/PageCraftingRecipes.java +++ b/MODSRC/vazkii/botania/common/lexicon/page/PageCraftingRecipes.java @@ -195,6 +195,10 @@ public class PageCraftingRecipes extends LexiconPage { public void renderItemAtGridPos(IGuiLexiconEntry gui, int x, int y, ItemStack stack, boolean accountForContainer) { if(stack == null || stack.getItem() == null) return; + stack = stack.copy(); + + if(stack.getItemDamage() == Short.MAX_VALUE) + stack.setItemDamage(0); int xPos = gui.getLeft() + x * 29 + 7; int yPos = gui.getTop() + y * 29 + 24 - (y == 0 ? 7 : 0); diff --git a/MODSRC/vazkii/botania/common/lib/LibLexicon.java b/MODSRC/vazkii/botania/common/lib/LibLexicon.java index 4ad05407e..a1d530912 100644 --- a/MODSRC/vazkii/botania/common/lib/LibLexicon.java +++ b/MODSRC/vazkii/botania/common/lib/LibLexicon.java @@ -16,12 +16,16 @@ public final class LibLexicon { public static final String CATEGORY_PREFIX = "botania.category."; public static final String CATEGORY_BASICS = CATEGORY_PREFIX + "basics"; - public static final String CATEGORY_ENERGY = CATEGORY_PREFIX + "energy"; - public static final String CATEGORY_FLOWERS = CATEGORY_PREFIX + "flowers"; + public static final String CATEGORY_MANA = CATEGORY_PREFIX + "mana"; + public static final String CATEGORY_FUNCTIONAL_FLOWERS = CATEGORY_PREFIX + "functionalFlowers"; + public static final String CATEGORY_GENERATION_FLOWERS = CATEGORY_PREFIX + "generationFlowers"; public static final String CATEGORY_DEVICES = CATEGORY_PREFIX + "devices"; public static final String CATEGORY_TOOLS = CATEGORY_PREFIX + "tools"; public static final String CATEGORY_MISC = CATEGORY_PREFIX + "misc"; - + public static final String BASICS_FLOWERS = "flowers"; + public static final String BASICS_APOTHECARY = "apothecary"; + public static final String BASICS_LEXICON = "lexicon"; + public static final String BASICS_WAND = "wand"; } diff --git a/resources/assets/botania/lang/en_US.lang b/resources/assets/botania/lang/en_US.lang index e227f05e3..092196111 100644 --- a/resources/assets/botania/lang/en_US.lang +++ b/resources/assets/botania/lang/en_US.lang @@ -68,8 +68,9 @@ botania.gui.lexicon.header=Lexica Botania Index - Pick which category you would # LEXICON CATEGORIES botania.category.basics=Basics -botania.category.energy=Energy and Mana -botania.category.flowers=Magical Flora +botania.category.mana=Mana Manipulation +botania.category.functionalFlowers=Functional Flora +botania.category.generationFlowers=Generating Flora botania.category.devices=Natural Apparatus botania.category.tools=Mystical Instruments botania.category.misc=Miscellaneous @@ -77,17 +78,29 @@ botania.category.misc=Miscellaneous # LEXICON ENTRIES # - BASIC -# -- THE WORLD +# -- LEXICA BOTANIA +botania.entry.lexicon=Lexica Botania +botania.page.lexicon0=The &1Lexica Botania&0 is the repository of all knowledge for all botany related matters. But you probably knew that already.
All information is stored here, as expected. For convenience, if a block happens to have an entry in here, it can be right clicked with the Lexica Botania to open that entry. +botania.page.lexicon1=Crafting the &1Lexica Botania&0. + +# -- MYSTICAL FLOWERS botania.entry.flowers=Mystical Flowers botania.page.flowers0=Around the world, you may stumble upon a large variety of Mystical Flora. Spotting these doesn't take much work as the flowers themselves emit a fair amount of shine.
They come in a total of &416 &0different colors.
It's also possible to grow these flowers using &1Bone Meal&0. botania.page.flowers1=Flowers as far as the eye can see... botania.page.flowers2=These flowers can be plucked for &1Mystical Petals&0, that can be used for making magical instruments and plants alike.
These petals can also be crushed into &1Floral Dye&0, by the use of a &1Pestle and Mortar&0, which function much alike any mundane piece of dye. -botania.page.flowers3=Plucking Petals off Flowers -botania.page.flowers4=Crafting the &1Pestle and Mortar -botania.page.flowers5=Grinding Petals into Dye +botania.page.flowers3=Plucking Petals off Flowers. +botania.page.flowers4=Crafting the &1Pestle and Mortar&0. +botania.page.flowers5=Grinding Petals into Dye. -# -- BASIC CONCEPTS -botania.entry.basicConcepts=Basic Concepts +# -- PETAL APOTHECARY +botania.entry.apothecary=Petal Apothecary +botania.page.apothecary0=In order for a Botanist to create plantlife that can do it's bidding, one would need special means of infusing plants with mystical energy.
Luckilly, the &1Petal Apothecary&0 does just that. +botania.page.apothecary1=The &1Petal Apothecary&0. +botania.page.apothecary2=This block, when placed in the world and given some water (by use of a water bucket), will accept any &1Mystical Petals&0 thrown at it, releasing their energies.
Once one has set the correct petals in, throwing some &1Seeds&0 in will finalize the proccess. +botania.page.apothecary3=Quite a few plants can be made using this method, for more information, read on the &4Functional Flora&0 and &4Generation Flora&0 sections of this Lexicon. +botania.page.apothecary4=Crafting the &1Petal Apothecary&0. -# -- GETTING STARTED -botania.entry.gettingStarted=Getting Started \ No newline at end of file +# -- WAND OF THE FOREST +botania.entry.wand=Wand of the Forest +botania.page.wand0=The general multi use tool for a botanist is the &1Wand of the Forest&0.
This wand, made by, effectively, strapping a pair of &1Mystical Petals&0 of any color to a few &1Sticks&0 is required for a good amount of tasks. +botania.page.wand1=The petals use determine the colors. \ No newline at end of file diff --git a/resources/assets/botania/textures/gui/entries/apothecary.png b/resources/assets/botania/textures/gui/entries/apothecary.png new file mode 100644 index 000000000..ea2481b27 Binary files /dev/null and b/resources/assets/botania/textures/gui/entries/apothecary.png differ