From 294617dad3252e964f2dffca60bc381a4eb8fe44 Mon Sep 17 00:00:00 2001 From: Lizbeth Rika Date: Thu, 31 Jul 2014 22:52:39 +0100 Subject: [PATCH] Finish off the Hand of Ender. --- .../botania/common/core/handler/ConfigHandler.java | 1 + .../botania/common/crafting/ModCrafingRecipes.java | 10 ++++++++++ MODSRC/vazkii/botania/common/item/ItemEnderHand.java | 11 +++++++++-- MODSRC/vazkii/botania/common/lexicon/LexiconData.java | 4 ++++ MODSRC/vazkii/botania/common/lib/LibLexicon.java | 1 + resources/assets/botania/lang/en_US.lang | 9 ++++++++- 6 files changed, 33 insertions(+), 3 deletions(-) diff --git a/MODSRC/vazkii/botania/common/core/handler/ConfigHandler.java b/MODSRC/vazkii/botania/common/core/handler/ConfigHandler.java index ffed6344f..12cef171f 100644 --- a/MODSRC/vazkii/botania/common/core/handler/ConfigHandler.java +++ b/MODSRC/vazkii/botania/common/core/handler/ConfigHandler.java @@ -43,6 +43,7 @@ public final class ConfigHandler { public static boolean versionCheckEnabled = true; public static int spreaderPositionShift = 1; public static boolean flowerForceCheck = true; + public static boolean enderPickpocketEnabled = true; public static boolean fallenKanadeEnabled = true; public static boolean darkQuartzEnabled = true; diff --git a/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java b/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java index 601285833..fed3618f9 100644 --- a/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java +++ b/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java @@ -183,6 +183,7 @@ public final class ModCrafingRecipes { public static IRecipe recipeEnderEyeBlock; public static IRecipe recipeItemFinder; public static IRecipe recipeSuperLavaPendant; + public static IRecipe recipeEnderHand; public static void init() { // Lexicon Recipe @@ -1136,6 +1137,15 @@ public final class ModCrafingRecipes { 'G', LibOreDict.LIFE_ESSENCE); recipeSuperLavaPendant = BotaniaAPI.getLatestAddedRecipe(); + // Hand of Ender Recipe + addOreDictRecipe(new ItemStack(ModItems.enderHand), + "PLO", "LEL", "OL ", + 'P', LibOreDict.PIXIE_DUST, + 'L', new ItemStack(Items.leather), + 'E', new ItemStack(Blocks.ender_chest), + 'O', new ItemStack(Blocks.obsidian)); + recipeEnderHand = BotaniaAPI.getLatestAddedRecipe(); + // Mana and Terrasteel Block Recipes addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0), "III", "III", "III", diff --git a/MODSRC/vazkii/botania/common/item/ItemEnderHand.java b/MODSRC/vazkii/botania/common/item/ItemEnderHand.java index 342b4b3ff..7f65a9134 100644 --- a/MODSRC/vazkii/botania/common/item/ItemEnderHand.java +++ b/MODSRC/vazkii/botania/common/item/ItemEnderHand.java @@ -15,10 +15,12 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import vazkii.botania.api.mana.IManaUsingItem; import vazkii.botania.api.mana.ManaItemHandler; +import vazkii.botania.common.core.handler.ConfigHandler; import vazkii.botania.common.lib.LibItemNames; -public class ItemEnderHand extends ItemMod { +public class ItemEnderHand extends ItemMod implements IManaUsingItem { private static final int COST_SELF = 250; private static final int COST_OTHER = 5000; @@ -40,7 +42,7 @@ public class ItemEnderHand extends ItemMod { @Override public boolean itemInteractionForEntity(ItemStack stack, EntityPlayer iplayer, EntityLivingBase entity) { - if(entity instanceof EntityPlayer && ManaItemHandler.requestManaExact(stack, iplayer, COST_OTHER, false)) { + if(ConfigHandler.enderPickpocketEnabled && entity instanceof EntityPlayer && ManaItemHandler.requestManaExact(stack, iplayer, COST_OTHER, false)) { iplayer.displayGUIChest(((EntityPlayer) entity).getInventoryEnderChest()); ManaItemHandler.requestManaExact(stack, iplayer, COST_OTHER, true); iplayer.worldObj.playSoundAtEntity(iplayer, "mob.endermen.portal", 1F, 1F); @@ -50,4 +52,9 @@ public class ItemEnderHand extends ItemMod { return false; } + @Override + public boolean usesMana(ItemStack stack) { + return true; + } + } diff --git a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java index 4c2ead9cc..ffc98735e 100644 --- a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java +++ b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java @@ -160,6 +160,7 @@ public final class LexiconData { public static LexiconEntry reachRing; public static LexiconEntry itemFinder; public static LexiconEntry superLavaPendant; + public static LexiconEntry enderHand; public static LexiconEntry alfhomancyIntro; public static LexiconEntry elvenMessage; @@ -488,6 +489,9 @@ public final class LexiconData { skyDirtRod = new ALexiconEntry(LibLexicon.TOOL_SKY_DIRT_ROD, categoryTools); skyDirtRod.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeSkyDirtRod)); + enderHand = new ALexiconEntry(LibLexicon.TOOL_ENDER_HAND, categoryTools); + enderHand.setLexiconPages(new PageText(ConfigHandler.enderPickpocketEnabled ? "0" : "0a"), new PageCraftingRecipe(ConfigHandler.enderPickpocketEnabled ? "1" : "1a", ModCrafingRecipes.recipeEnderHand)); + // BAUBLES ENTRIES baublesIntro = new BLexiconEntry(LibLexicon.BAUBLE_INTRO, categoryBaubles); baublesIntro.setPriority().setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_BAUBLES), new PageText("2")); diff --git a/MODSRC/vazkii/botania/common/lib/LibLexicon.java b/MODSRC/vazkii/botania/common/lib/LibLexicon.java index 48cb668a0..500370a15 100644 --- a/MODSRC/vazkii/botania/common/lib/LibLexicon.java +++ b/MODSRC/vazkii/botania/common/lib/LibLexicon.java @@ -117,6 +117,7 @@ public final class LibLexicon { public static final String TOOL_LAPUTA_SHARD = "laputaShard"; public static final String TOOL_VIRUS = "virus"; public static final String TOOL_SKY_DIRT_ROD = "skyDirtRod"; + public static final String TOOL_ENDER_HAND = "enderHand"; public static final String BAUBLE_INTRO = "bIntro"; public static final String BAUBLE_TINY_PLANET = "tinyPlanet"; diff --git a/resources/assets/botania/lang/en_US.lang b/resources/assets/botania/lang/en_US.lang index 6cab6543e..329673333 100644 --- a/resources/assets/botania/lang/en_US.lang +++ b/resources/assets/botania/lang/en_US.lang @@ -1295,6 +1295,13 @@ botania.entry.skyDirtRod=Rod of the Highlands botania.page.skyDirtRod0=While the &1Rod of the Lands&0 is all well and good, being able to place &1Dirt&0 without something to hold it would be great.
The &1Rod of the Highlands&0 does just that, while maintaining the original power of the &1Rod of the Lands&0, it can also place &1Dirt&0 in mid air, for an increased &4Mana&0 cost. botania.page.skyDirtRod1=Dirty Stick mk2 +# -- HAND OF ENDER +botania.entry.enderHand=Hand of Ender +botania.page.enderHand0=The &1Hand of Ender&0 allows the user to access the interdimensional ender field, on other words, their &1Ender Chest&0 inventory. This can be done anywhere by right clicking with the hand at the cost of some &4Mana&0.
Using the hand on another player will open up &otheir&r inventory instead, at a lot higher &4Mana&0 cost. +botania.page.enderHand0a=The &1Hand of Ender&0 allows the user to access the interdimensional ender field, on other words, their &1Ender Chest&0 inventory. This can be done anywhere by right clicking with the hand at the cost of some &4Mana&0. +botania.page.enderHand1=Zezima hates him! +botania.page.enderHand1a=It's like the 4G of Ender Chests + # - BAUBLES # -- AN INTRODUCTION TO BAUBLES botania.entry.bIntro=An Introduction to Baubles @@ -1394,7 +1401,7 @@ botania.page.itemFinder2=Do you hear their voices? # -- CRIMSON PENDANT botania.entry.superLavaPendant=Crimson Pendant botania.page.superLavaPendant0=The &1Crimson Pendant&0 is, in simple terms, an upgraded counterpart to the &1Pyroclast Pendant&0, wearing it provides the wearer immunity to all fire and lava damage, instead of just extinguishing them. -botania.page.superLavaPendant1=The Crimson Prince +botania.page.superLavaPendant1=Runner-up on Monolith Code # - ALFHOMANCY # -- THE PORTAL TO ALFHEIM