From 1860539aeecc81d5711e50b9cc00ffd2613fe0d4 Mon Sep 17 00:00:00 2001 From: Lizbeth Rika Date: Sat, 30 May 2015 16:40:09 +0100 Subject: [PATCH] Recipe/docs for the hourglass. --- .../vazkii/botania/common/block/BlockHourglass.java | 10 +++++++++- .../botania/common/crafting/ModCraftingRecipes.java | 10 ++++++++++ .../vazkii/botania/common/lexicon/LexiconData.java | 4 ++++ .../java/vazkii/botania/common/lib/LibLexicon.java | 1 + src/main/resources/assets/botania/lang/en_US.lang | 9 +++++++++ 5 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/main/java/vazkii/botania/common/block/BlockHourglass.java b/src/main/java/vazkii/botania/common/block/BlockHourglass.java index c2a60b7e3..784838e21 100644 --- a/src/main/java/vazkii/botania/common/block/BlockHourglass.java +++ b/src/main/java/vazkii/botania/common/block/BlockHourglass.java @@ -28,6 +28,8 @@ import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import vazkii.botania.api.internal.IManaBurst; import vazkii.botania.api.internal.VanillaPacketDispatcher; +import vazkii.botania.api.lexicon.ILexiconable; +import vazkii.botania.api.lexicon.LexiconEntry; import vazkii.botania.api.mana.IManaTrigger; import vazkii.botania.api.wand.IWandHUD; import vazkii.botania.api.wand.IWandable; @@ -35,9 +37,10 @@ import vazkii.botania.client.lib.LibRenderIDs; import vazkii.botania.common.block.tile.TileHourglass; import vazkii.botania.common.block.tile.TileSimpleInventory; import vazkii.botania.common.item.ModItems; +import vazkii.botania.common.lexicon.LexiconData; import vazkii.botania.common.lib.LibBlockNames; -public class BlockHourglass extends BlockModContainer implements IManaTrigger, IWandable, IWandHUD { +public class BlockHourglass extends BlockModContainer implements IManaTrigger, IWandable, IWandHUD, ILexiconable { Random random; @@ -195,5 +198,10 @@ public class BlockHourglass extends BlockModContainer implements IManaTrigger, I TileHourglass tile = (TileHourglass) world.getTileEntity(x, y, z); tile.renderHUD(res); } + + @Override + public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) { + return LexiconData.hourglass; + } } diff --git a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java index 3a2cbcf83..9fd62151e 100644 --- a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java +++ b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java @@ -260,6 +260,7 @@ public final class ModCraftingRecipes { public static IRecipe recipeIncenseStick; public static IRecipe recipeIncensePlate; public static IRecipe recipeTerraAxe; + public static IRecipe recipeHourglass; public static void init() { // Lexicon Recipe @@ -1737,6 +1738,15 @@ public final class ModCraftingRecipes { 'S', LibOreDict.LIVINGWOOD_TWIG); recipeTerraAxe = BotaniaAPI.getLatestAddedRecipe(); + // Hovering Hourglass Recipe + addOreDictRecipe(new ItemStack(ModBlocks.hourglass), + "GMG", "RSR", "GMG", + 'G', "ingotGold", + 'M', new ItemStack(ModBlocks.manaGlass), + 'R', new ItemStack(Items.redstone), + 'S', LibOreDict.MANA_STEEL); + recipeHourglass = BotaniaAPI.getLatestAddedRecipe(); + // Storage Block Recipes addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0), "III", "III", "III", diff --git a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java index 8fa7a16f2..6df567cac 100644 --- a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java +++ b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java @@ -145,6 +145,7 @@ public final class LexiconData { public static LexiconEntry flasks; public static LexiconEntry complexBrews; public static LexiconEntry incense; + public static LexiconEntry hourglass; public static LexiconEntry manaBlaster; public static LexiconEntry grassSeeds; @@ -585,6 +586,9 @@ public final class LexiconData { incense = new BLexiconEntry(LibLexicon.DEVICE_INCENSE, categoryDevices); incense.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageText("5"), new PageCraftingRecipe("3", ModCraftingRecipes.recipeIncenseStick), new PageCraftingRecipe("4", ModCraftingRecipes.recipeIncensePlate)); + hourglass = new BLexiconEntry(LibLexicon.DEVICE_HOURGLASS, categoryDevices); + hourglass.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageText("3"), new PageText("4"), new PageCraftingRecipe("5", ModCraftingRecipes.recipeHourglass)); + // TOOLS ENTRIES manaBlaster = new BLexiconEntry(LibLexicon.TOOL_MANA_BLASTER, categoryTools); manaBlaster.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageCraftingRecipe("3", ModCraftingRecipes.recipeManaBlaster)); diff --git a/src/main/java/vazkii/botania/common/lib/LibLexicon.java b/src/main/java/vazkii/botania/common/lib/LibLexicon.java index 84a0023ae..ae62bb69a 100644 --- a/src/main/java/vazkii/botania/common/lib/LibLexicon.java +++ b/src/main/java/vazkii/botania/common/lib/LibLexicon.java @@ -117,6 +117,7 @@ public final class LibLexicon { public static final String DEVICE_FLASKS = "flasks"; public static final String DEVICE_COMPLEX_BREWS = "complexBrews"; public static final String DEVICE_INCENSE = "incense"; + public static final String DEVICE_HOURGLASS = "hourglass"; public static final String TOOL_MANA_BLASTER = "manaBlaster"; public static final String TOOL_GRASS_SEEDS = "grassSeeds"; diff --git a/src/main/resources/assets/botania/lang/en_US.lang b/src/main/resources/assets/botania/lang/en_US.lang index c9910480a..56269db1a 100644 --- a/src/main/resources/assets/botania/lang/en_US.lang +++ b/src/main/resources/assets/botania/lang/en_US.lang @@ -2061,6 +2061,15 @@ botania.page.craftCrate6=Made in Portugal botania.page.craftCrate8=The &1Crafty Crate&0 can also be augmented with patterns. A pattern locks specific slots in the recipe, disallowing items from going into those slots and making them count as if there were placeholders there.
There's only a few basic patterns, which can be applied by right clicking on the crate (this doesn't consume them). botania.page.craftCrate9=9 different patterns +# -- HOVERING HOURGLASS +botania.entry.hourglass=Hovering Hourglass +botania.page.hourglass0=The ability to count time is an essential one to anyone who wishes to develop any redstonic contraptions. A single timer, however, can take a up both a lot of space and be slow in general. The &1Hovering Hourglass&0 is a simple, accurate, sand based timer. As the name implies, it's a hourglass that hovers and turns by itself. +botania.page.hourglass1=The hourglass contains an inventory, in which up to a stack of &1Sand&0, &1Red Sand&0 or &1Soul Sand&0 can be added via a right click. Right clicking again removes it. The sand will then fall from one of the chambers into another, and when is done, release a single redstone pulse and turn over, starting the process again. +botania.page.hourglass2=The amount of time for each pulse is dependent on how much and what type of sand is in the chamber. &1Sand&0 will count for one second per block, &1Red Sand&0 ten seconds per and &1Soul Sand&0 one minute per. Sand types can't be mixed. The time for each pulse can be seen by hovering over the block with a &1Wand of the Forest&0. +botania.page.hourglass3=Note that the sand is added all at once, so the size of the stack to be added needs to be set in the inventory.
Sand can't be added to the hourglass after it already has some in, trying to do so will end up removing the sand there instead. The sand in the block can be taken and added by &1Hoppers&0 or other methods. +botania.page.hourglass4=Right clicking the block with a &1Wand of the Forest&0 locks (and unlocks) it. When locked, sand can't be added or removed, just in case someone right clicks it on accident.
If a &4Mana Burst&0 collides with the block, it'll stop the flow of sand and pause the timer, colliding again continues it. +botania.page.hourglass5=The sands of time + # - MYSTICAL INSTRUMENTS # -- MANA BLASTER botania.entry.manaBlaster=Mana Blaster