diff --git a/MODSRC/vazkii/botania/common/core/BotaniaCreativeTab.java b/MODSRC/vazkii/botania/common/core/BotaniaCreativeTab.java index 297f3381f..527d83f13 100644 --- a/MODSRC/vazkii/botania/common/core/BotaniaCreativeTab.java +++ b/MODSRC/vazkii/botania/common/core/BotaniaCreativeTab.java @@ -85,6 +85,7 @@ public final class BotaniaCreativeTab extends CreativeTabs { addItem(ModItems.manasteelAxe); addItem(ModItems.manasteelShears); addItem(ModItems.manasteelSword); + addItem(ModItems.enderDagger); addItem(ModItems.manasteelHelm); addItem(ModItems.manasteelChest); addItem(ModItems.manasteelLegs); diff --git a/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java b/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java index 22fe7f854..6609e945a 100644 --- a/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java +++ b/MODSRC/vazkii/botania/common/crafting/ModCrafingRecipes.java @@ -123,6 +123,7 @@ public final class ModCrafingRecipes { public static IRecipe recipeFlightTiara; public static List recipesShinyFlowers; public static IRecipe recipePlatform; + public static IRecipe recipeEnderDagger; public static void init() { // Lexicon Recipe @@ -672,6 +673,14 @@ public final class ModCrafingRecipes { '4', new ItemStack(ModBlocks.livingwood, 0, 4)); recipePlatform = BotaniaAPI.getLatestAddedRecipe(); + // Soulscribe Recipe + addOreDictRecipe(new ItemStack(ModItems.enderDagger), + "P", "S", "T", + 'P', LibOreDict.MANA_PEARL, + 'S', LibOreDict.MANA_STEEL, + 'T', LibOreDict.LIVINGWOOD_TWIG); + recipeEnderDagger = BotaniaAPI.getLatestAddedRecipe(); + // Mana and Terrasteel Block Recipes addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0), "III", "III", "III", diff --git a/MODSRC/vazkii/botania/common/crafting/ModPetalRecipes.java b/MODSRC/vazkii/botania/common/crafting/ModPetalRecipes.java index 351d67a9f..2b9921dbc 100644 --- a/MODSRC/vazkii/botania/common/crafting/ModPetalRecipes.java +++ b/MODSRC/vazkii/botania/common/crafting/ModPetalRecipes.java @@ -14,7 +14,6 @@ package vazkii.botania.common.crafting; import java.util.Arrays; import net.minecraft.init.Items; -import net.minecraft.item.ItemSkull; import net.minecraft.item.ItemStack; import vazkii.botania.api.BotaniaAPI; import vazkii.botania.api.recipe.RecipePetals; diff --git a/MODSRC/vazkii/botania/common/item/ModItems.java b/MODSRC/vazkii/botania/common/item/ModItems.java index 743136c57..0613a049a 100644 --- a/MODSRC/vazkii/botania/common/item/ModItems.java +++ b/MODSRC/vazkii/botania/common/item/ModItems.java @@ -38,6 +38,7 @@ import vazkii.botania.common.item.equipment.bauble.ItemMiningRing; import vazkii.botania.common.item.equipment.bauble.ItemTinyPlanet; import vazkii.botania.common.item.equipment.bauble.ItemTravelBelt; import vazkii.botania.common.item.equipment.bauble.ItemWaterRing; +import vazkii.botania.common.item.equipment.tool.ItemEnderDagger; import vazkii.botania.common.item.equipment.tool.ItemManasteelAxe; import vazkii.botania.common.item.equipment.tool.ItemManasteelPick; import vazkii.botania.common.item.equipment.tool.ItemManasteelShears; @@ -98,6 +99,7 @@ public final class ModItems { public static Item terraPick; public static Item divaCharm; public static Item flightTiara; + public static Item enderDagger; public static void init() { lexicon = new ItemLexicon(); @@ -149,7 +151,8 @@ public final class ModItems { terraPick = new ItemTerraPick(); divaCharm = new ItemDivaCharm(); flightTiara = new ItemFlightTiara(); - + enderDagger = new ItemEnderDagger(); + OreDictionary.registerOre(LibOreDict.LEXICON, lexicon); for(int i = 0; i < 16; i++) { OreDictionary.registerOre(LibOreDict.PETAL[i], new ItemStack(petal, 1, i)); diff --git a/MODSRC/vazkii/botania/common/item/equipment/tool/ItemEnderDagger.java b/MODSRC/vazkii/botania/common/item/equipment/tool/ItemEnderDagger.java new file mode 100644 index 000000000..fe7c0e25f --- /dev/null +++ b/MODSRC/vazkii/botania/common/item/equipment/tool/ItemEnderDagger.java @@ -0,0 +1,75 @@ +/** + * This class was created by . It's distributed as + * part of the Botania Mod. Get the Source Code in github: + * https://github.com/Vazkii/Botania + * + * Botania is Open Source and distributed under a + * Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License + * (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB) + * + * File Created @ [Jun 10, 2014, 11:48:12 PM (GMT)] + */ +package vazkii.botania.common.item.equipment.tool; + +import java.awt.Color; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.monster.EntityEnderman; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.util.IIcon; +import vazkii.botania.api.BotaniaAPI; +import vazkii.botania.client.core.helper.IconHelper; +import vazkii.botania.common.lib.LibItemNames; + +public class ItemEnderDagger extends ItemManasteelSword { + + IIcon iconFront, iconOverlay; + + public ItemEnderDagger() { + super(BotaniaAPI.manasteelToolMaterial, LibItemNames.ENDER_DAGGER); + setMaxDamage(69); // What you looking at? + } + + @Override + public void registerIcons(IIconRegister par1IconRegister) { + super.registerIcons(par1IconRegister); + iconFront = IconHelper.forItem(par1IconRegister, this, 0); + iconOverlay = IconHelper.forItem(par1IconRegister, this, 1); + } + + @Override + public boolean requiresMultipleRenderPasses() { + return true; + } + + @Override + public IIcon getIcon(ItemStack stack, int pass) { + return pass == 0 ? iconFront : iconOverlay; + } + + @Override + public int getColorFromItemStack(ItemStack par1ItemStack, int par2) { + if(par2 == 0) + return 0xFFFFFF; + + return Color.HSBtoRGB(0.75F, 1F, 1.5F - (float) Math.min(1F, Math.sin(System.currentTimeMillis() / 100D) * 0.5 + 1.2F)); + } + + @Override + public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) { + if(par2EntityLivingBase instanceof EntityEnderman && par3EntityLivingBase instanceof EntityPlayer) + par2EntityLivingBase.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) par3EntityLivingBase), 20); + return true; + } + + @Override + public boolean usesMana(ItemStack stack) { + return false; + } + +} diff --git a/MODSRC/vazkii/botania/common/item/equipment/tool/ItemManasteelSword.java b/MODSRC/vazkii/botania/common/item/equipment/tool/ItemManasteelSword.java index 27569ce6a..3b9f47afc 100644 --- a/MODSRC/vazkii/botania/common/item/equipment/tool/ItemManasteelSword.java +++ b/MODSRC/vazkii/botania/common/item/equipment/tool/ItemManasteelSword.java @@ -66,7 +66,8 @@ public class ItemManasteelSword extends ItemSword implements IManaUsingItem { @Override public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) { - ManasteelToolCommons.damageItem(par1ItemStack, 1, par3EntityLivingBase, MANA_PER_DAMAGE); + if(usesMana(par1ItemStack)) + ManasteelToolCommons.damageItem(par1ItemStack, 1, par3EntityLivingBase, MANA_PER_DAMAGE); return true; } @@ -82,7 +83,7 @@ public class ItemManasteelSword extends ItemSword implements IManaUsingItem { @Override public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase entity) { - if (block.getBlockHardness(world, x, y, z) != 0F) + if(usesMana(stack) && block.getBlockHardness(world, x, y, z) != 0F) ManasteelToolCommons.damageItem(stack, 1, entity, MANA_PER_DAMAGE); return true; @@ -97,5 +98,5 @@ public class ItemManasteelSword extends ItemSword implements IManaUsingItem { 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 a4da7e6c0..0bf986a48 100644 --- a/MODSRC/vazkii/botania/common/lexicon/LexiconData.java +++ b/MODSRC/vazkii/botania/common/lexicon/LexiconData.java @@ -123,6 +123,7 @@ public final class LexiconData { public static LexiconEntry grassHorn; public static LexiconEntry terraBlade; public static LexiconEntry terraPick; + public static LexiconEntry enderDagger; public static LexiconEntry baublesIntro; public static LexiconEntry tinyPlanet; @@ -400,6 +401,9 @@ public final class LexiconData { terraPick = new BLexiconEntry(LibLexicon.TOOL_TERRA_PICK, categoryTools); terraPick.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageText("3"), new PageText("4"), new PageCraftingRecipe("5", ModCrafingRecipes.recipeTerraPick)); + enderDagger = new BLexiconEntry(LibLexicon.TOOL_ENDER_DAGGER, categoryTools); + enderDagger.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCrafingRecipes.recipeEnderDagger)); + // 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/LibItemNames.java b/MODSRC/vazkii/botania/common/lib/LibItemNames.java index fcc796ba1..5da500fb0 100644 --- a/MODSRC/vazkii/botania/common/lib/LibItemNames.java +++ b/MODSRC/vazkii/botania/common/lib/LibItemNames.java @@ -62,6 +62,7 @@ public final class LibItemNames { public static final String TERRA_PICK = "terraPick"; public static final String DIVA_CHARM = "divaCharm"; public static final String FLIGHT_TIARA = "flightTiara"; + public static final String ENDER_DAGGER = "enderDagger"; public static final String[] LENS_NAMES = new String[] { "lensNormal", diff --git a/MODSRC/vazkii/botania/common/lib/LibLexicon.java b/MODSRC/vazkii/botania/common/lib/LibLexicon.java index 5be880276..e39341183 100644 --- a/MODSRC/vazkii/botania/common/lib/LibLexicon.java +++ b/MODSRC/vazkii/botania/common/lib/LibLexicon.java @@ -104,6 +104,7 @@ public final class LibLexicon { public static final String TOOL_GRASS_HORN = "grassHorn"; public static final String TOOL_TERRA_SWORD = "terraSword"; public static final String TOOL_TERRA_PICK = "terraPick"; + public static final String TOOL_ENDER_DAGGER = "enderDagger"; 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 6ef9214d9..502f7264a 100644 --- a/resources/assets/botania/lang/en_US.lang +++ b/resources/assets/botania/lang/en_US.lang @@ -393,6 +393,7 @@ item.botania:miningRing.name=Ring of the Mantle item.botania:terraPick.name=Terra Shatterer item.botania:divaCharm.name=Charm of the Diva item.botania:flightTiara.name=Flügel Tiara +item.botania:enderDagger.name=Soulscribe # GUI TEXT botania.gui.lexicon.header=Lexica Botania Index - Pick which category you would like to study: @@ -897,6 +898,12 @@ botania.page.terraPick3=While the tool is active, it enables it to break blocks botania.page.terraPick4=Lastly, the tool takes damage for every single block broken, so a good supply of &4Mana&0 in the wielder's inventory is a must for the higher ranks, as the tool does function like normal &1Manasteel Tools&0, in which it'll use &4Mana&0 instead of actually taking damage, given it's made of &1Terrasteel&0.
It also won't despawn like regular dropped items. botania.page.terraPick5=Stronger than a Gastrea +# -- SOULSCRIBE +botania.entry.enderDagger=Soulscribe +botania.page.enderDagger0=Those &4Endermen&0. They're the second more pesky thing since &4Creepers&0. I swear, the person who came up with them must have taken a &onotch&r too much of their drink.
However, by infusing a standard dagger with some of their energy, one can create the &1Soulscribe&0, a dagger that tears through &1Endermen&0 as if they were butter. +botania.page.enderDagger1=Due of the type of infusion, though, the dagger only lasts for a few kills, and the energy that radiates from it prevents the &1Manasteel&0 from gathering &4Mana&0 to avoid damage, like typical tools would. Still, all in the name of killing those monsters. +botania.page.enderDagger2=Strike my Soul + # - BAUBLES # -- AN INTRODUCTION TO BAUBLES botania.entry.bIntro=An Introduction to Baubles diff --git a/resources/assets/botania/textures/items/enderDagger0.png b/resources/assets/botania/textures/items/enderDagger0.png new file mode 100644 index 000000000..adb8aa55b Binary files /dev/null and b/resources/assets/botania/textures/items/enderDagger0.png differ diff --git a/resources/assets/botania/textures/items/enderDagger1.png b/resources/assets/botania/textures/items/enderDagger1.png new file mode 100644 index 000000000..221eac6a6 Binary files /dev/null and b/resources/assets/botania/textures/items/enderDagger1.png differ