From 26f24d47fd2b6ce7cc757ea90c9e2f0c0553476c Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Thu, 29 Sep 2016 18:59:39 +0100 Subject: [PATCH] Recipe/docs for the animated torch --- .../botania/common/block/BlockAnimatedTorch.java | 10 +++++++++- .../botania/common/crafting/ModCraftingRecipes.java | 8 ++++++++ .../vazkii/botania/common/lexicon/LexiconData.java | 4 ++++ .../java/vazkii/botania/common/lib/LibLexicon.java | 1 + src/main/resources/assets/botania/lang/en_US.lang | 8 ++++++++ 5 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/main/java/vazkii/botania/common/block/BlockAnimatedTorch.java b/src/main/java/vazkii/botania/common/block/BlockAnimatedTorch.java index 1d73a774f..48b9057ed 100644 --- a/src/main/java/vazkii/botania/common/block/BlockAnimatedTorch.java +++ b/src/main/java/vazkii/botania/common/block/BlockAnimatedTorch.java @@ -28,13 +28,16 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import vazkii.botania.api.internal.IManaBurst; import vazkii.botania.api.item.IHourglassTrigger; +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; import vazkii.botania.common.block.tile.TileAnimatedTorch; +import vazkii.botania.common.lexicon.LexiconData; import vazkii.botania.common.lib.LibBlockNames; -public class BlockAnimatedTorch extends BlockMod implements IWandable, IManaTrigger, IHourglassTrigger, IWandHUD { +public class BlockAnimatedTorch extends BlockMod implements IWandable, IManaTrigger, IHourglassTrigger, IWandHUD, ILexiconable { private static final AxisAlignedBB AABB = new AxisAlignedBB(0, 0, 0, 1, 0.25, 1); @@ -136,4 +139,9 @@ public class BlockAnimatedTorch extends BlockMod implements IWandable, IManaTrig return true; } + @Override + public LexiconEntry getEntry(World world, BlockPos pos, EntityPlayer player, ItemStack lexicon) { + return LexiconData.animatedTorch; + } + } diff --git a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java index d99dd7daf..c182035d7 100644 --- a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java +++ b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java @@ -294,6 +294,7 @@ public final class ModCraftingRecipes { public static IRecipe recipeSpeedUpBelt; public static IRecipe recipeBaubleCase; public static IRecipe recipeDodgeRing; + public static IRecipe recipeAnimatedTorch; // Garden of Glass public static IRecipe recipeRootToSapling; @@ -1990,6 +1991,13 @@ public final class ModCraftingRecipes { 'R', LibOreDict.RUNE[3]); recipeDodgeRing = BotaniaAPI.getLatestAddedRecipe(); + // Animated Torch Recipe + addOreDictRecipe(new ItemStack(ModBlocks.animatedTorch), + "D", "T", + 'D', LibOreDict.MANA_POWDER, + 'T', new ItemStack(Blocks.REDSTONE_TORCH)); + recipeAnimatedTorch = BotaniaAPI.getLatestAddedRecipe(); + /////////////////////////////////////////////////////////////////////////////////////////////////////////// // Storage Block/Nugget Recipes diff --git a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java index 11ff9a92c..ac5bcfdf3 100644 --- a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java +++ b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java @@ -159,6 +159,7 @@ public final class LexiconData { public static LexiconEntry teruTeruBozu; public static LexiconEntry avatar; public static LexiconEntry felPumpkin; + public static LexiconEntry animatedTorch; public static LexiconEntry manaBlaster; public static LexiconEntry grassSeeds; @@ -831,6 +832,9 @@ public final class LexiconData { felPumpkin = new BasicLexiconEntry(LibLexicon.DEVICE_FEL_PUMPKIN, categoryDevices); felPumpkin.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeFelPumpkin)); + animatedTorch = new BasicLexiconEntry(LibLexicon.DEVICE_ANIMATED_TORCH, categoryDevices); + animatedTorch.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageCraftingRecipe("3", ModCraftingRecipes.recipeAnimatedTorch)); + // TOOLS ENTRIES manaBlaster = new BasicLexiconEntry(LibLexicon.TOOL_MANA_BLASTER, categoryTools); manaBlaster.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), diff --git a/src/main/java/vazkii/botania/common/lib/LibLexicon.java b/src/main/java/vazkii/botania/common/lib/LibLexicon.java index f028f4853..a2c12bc57 100644 --- a/src/main/java/vazkii/botania/common/lib/LibLexicon.java +++ b/src/main/java/vazkii/botania/common/lib/LibLexicon.java @@ -134,6 +134,7 @@ public final class LibLexicon { public static final String DEVICE_TERU_TERU_BOZU = "teruTeruBozu"; public static final String DEVICE_AVATAR = "avatar"; public static final String DEVICE_FEL_PUMPKIN = "felPumpkin"; + public static final String DEVICE_ANIMATED_TORCH = "animatedTorch"; 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 35e25ff05..1e3f1de7c 100644 --- a/src/main/resources/assets/botania/lang/en_US.lang +++ b/src/main/resources/assets/botania/lang/en_US.lang @@ -2792,6 +2792,14 @@ botania.tagline.felPumpkin=A pumpkin that can spawn blazes botania.page.felPumpkin0=A &1Fel Pumpkin&0 is a demented infusion of a &1Pumpkin&0 with the fel spirits of slain monsters. This vile pumpkin can be placed atop two &1Iron Bars&0, in a similar fashion to a &1Snow Golem&0, to spawn a &1Blaze&0.
&1Blazes&0 spawned with this method drop a fairly reasonable amount of &1Blaze Powder&0 instead of a small serving of &1Blaze Rods&0. botania.page.felPumpkin1=Spooky scary pumpkin +# -- ANIMATED TORCH +botania.entry.animatedTorch=Animated Torch +botania.tagline.animatedTorch=Compact systems with a floating redstone torch +botania.page.animatedTorch0=The &1Animated Torch&0 is no more than a floating &1Redstone Torch&0 with a spark of magical autonomy.
The torch, when placed, will face a horizontal direction, providing power towards that direction. Shift-right clicking it will rotate the torch 90 degrees, changing the power to the new direction instead. +botania.page.animatedTorch1=By default, whenever the torch is triggered, it'll turn 180 degrees, serving as a T-Flip-Flop Latch.
To trigger the torch one can either have a &4mana burst&0 collide with it, or have an adjacent &1Hovering Hourglass&0 turn. Either way will have the torch do its specified rotation. +botania.page.animatedTorch2=Using a &1Wand of the Forest&0 on the torch will change its mode. The default mode is &4Toggle&0, which was explained in the previous page.
The other two modes are &4Rotate&0, which will have the torch do a 90 degree spin every time, and &4Random&0, which will have the torch rotate towards a random direction. +botania.page.animatedTorch3=It's fallen and it can't get up + # - MYSTICAL INSTRUMENTS # -- MANA BLASTER botania.entry.manaBlaster=Mana Blaster