diff --git a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java index 90a798907..6cc5d53e1 100644 --- a/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java +++ b/src/main/java/vazkii/botania/common/crafting/ModCraftingRecipes.java @@ -282,6 +282,11 @@ public final class ModCraftingRecipes { public static IRecipe recipeFireChakram; public static IRecipe recipeThunderSword; public static IRecipe recipeBellows; + public static IRecipe recipeManaweaveCloth; + public static IRecipe recipeManaweaveHelm; + public static IRecipe recipeManaweaveChest; + public static IRecipe recipeManaweaveLegs; + public static IRecipe recipeManaweaveBoots; // Garden of Glass public static IRecipe recipeRootToSapling; @@ -1934,6 +1939,30 @@ public final class ModCraftingRecipes { 'L', new ItemStack(Items.leather)); recipeBellows = BotaniaAPI.getLatestAddedRecipe(); + // Manaweave Cloth Recipe + addOreDictRecipe(new ItemStack(ModItems.manaResource, 1, 22), + "SS", "SS", + 'S', LibOreDict.MANA_STRING); + recipeManaweaveCloth = BotaniaAPI.getLatestAddedRecipe(); + + // Manaweave Armor Recipes + addOreDictRecipe(new ItemStack(ModItems.manaweaveHelm), + "SSS", "S S", + 'S', LibOreDict.MANAWEAVE_CLOTH); + recipeManaweaveHelm = BotaniaAPI.getLatestAddedRecipe(); + addOreDictRecipe(new ItemStack(ModItems.manaweaveChest), + "S S", "SSS", "SSS", + 'S', LibOreDict.MANAWEAVE_CLOTH); + recipeManaweaveChest = BotaniaAPI.getLatestAddedRecipe(); + addOreDictRecipe(new ItemStack(ModItems.manaweaveLegs), + "SSS", "S S", "S S", + 'S', LibOreDict.MANAWEAVE_CLOTH); + recipeManaweaveLegs = BotaniaAPI.getLatestAddedRecipe(); + addOreDictRecipe(new ItemStack(ModItems.manaweaveBoots), + "S S", "S S", + 'S', LibOreDict.MANAWEAVE_CLOTH); + recipeManaweaveBoots = BotaniaAPI.getLatestAddedRecipe(); + /////////////////////////////////////////////////////////////////////////////////////////////////////////// // Storage Block/Nugget Recipes diff --git a/src/main/java/vazkii/botania/common/item/equipment/armor/manaweave/ItemManaweaveHelm.java b/src/main/java/vazkii/botania/common/item/equipment/armor/manaweave/ItemManaweaveHelm.java index 464446a04..4756fd24a 100644 --- a/src/main/java/vazkii/botania/common/item/equipment/armor/manaweave/ItemManaweaveHelm.java +++ b/src/main/java/vazkii/botania/common/item/equipment/armor/manaweave/ItemManaweaveHelm.java @@ -10,14 +10,21 @@ */ package vazkii.botania.common.item.equipment.armor.manaweave; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.DamageSource; +import net.minecraft.world.World; import vazkii.botania.api.item.IManaProficiencyArmor; import vazkii.botania.api.mana.IManaDiscountArmor; +import vazkii.botania.api.mana.ManaItemHandler; +import vazkii.botania.common.item.equipment.tool.ToolCommons; import vazkii.botania.common.lib.LibItemNames; public class ItemManaweaveHelm extends ItemManaweaveArmor implements IManaDiscountArmor, IManaProficiencyArmor { + private static final int MANA_PER_DAMAGE = 30; + public ItemManaweaveHelm() { super(0, LibItemNames.MANAWEAVE_HELM); } @@ -32,4 +39,15 @@ public class ItemManaweaveHelm extends ItemManaweaveArmor implements IManaDiscou return hasArmorSet(player); } + @Override + public void onArmorTick(World world, EntityPlayer player, ItemStack stack) { + if(!world.isRemote && stack.getItemDamage() > 0 && ManaItemHandler.requestManaExact(stack, player, MANA_PER_DAMAGE * 2, true)) + stack.setItemDamage(stack.getItemDamage() - 1); + } + + @Override + public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) { + ToolCommons.damageItem(stack, damage, entity, MANA_PER_DAMAGE); + } + } diff --git a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java index 883a0b0da..350e025bd 100644 --- a/src/main/java/vazkii/botania/common/lexicon/LexiconData.java +++ b/src/main/java/vazkii/botania/common/lexicon/LexiconData.java @@ -198,6 +198,7 @@ public final class LexiconData { public static LexiconEntry obedienceStick; public static LexiconEntry slimeBottle; public static LexiconEntry exchangeRod; + public static LexiconEntry manaweave; public static LexiconEntry enderAir; public static LexiconEntry enderEyeBlock; @@ -769,6 +770,9 @@ public final class LexiconData { exchangeRod = new BLexiconEntry(LibLexicon.TOOL_EXCHANGE_ROD, categoryTools); exchangeRod.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageCraftingRecipe("3", ModCraftingRecipes.recipeExchangeRod)); + manaweave = new BLexiconEntry(LibLexicon.TOOL_MANAWEAVE, categoryTools); + manaweave.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCraftingRecipes.recipeManaweaveCloth), new PageCraftingRecipe("3", ModCraftingRecipes.recipeManaweaveHelm), new PageCraftingRecipe("4", ModCraftingRecipes.recipeManaweaveChest), new PageCraftingRecipe("5", ModCraftingRecipes.recipeManaweaveLegs), new PageCraftingRecipe("6", ModCraftingRecipes.recipeManaweaveBoots)); + // ENDER ENTRIES enderAir = new BLexiconEntry(LibLexicon.ENDER_AIR, categoryEnder); enderAir.setPriority().setLexiconPages(new PageText("0")); diff --git a/src/main/java/vazkii/botania/common/lib/LibLexicon.java b/src/main/java/vazkii/botania/common/lib/LibLexicon.java index 3f4554c14..8e40feba5 100644 --- a/src/main/java/vazkii/botania/common/lib/LibLexicon.java +++ b/src/main/java/vazkii/botania/common/lib/LibLexicon.java @@ -167,6 +167,7 @@ public final class LibLexicon { public static final String TOOL_OBEDIENCE_STICK = "obedienceStick"; public static final String TOOL_SLIME_BOTTLE = "slimeBottle"; public static final String TOOL_EXCHANGE_ROD = "exchangeRod"; + public static final String TOOL_MANAWEAVE = "manaweave"; public static final String ENDER_AIR = "enderAir"; public static final String ENDER_ENDER_EYE_BLOCK = "enderEyeBlock"; diff --git a/src/main/resources/assets/botania/lang/en_US.lang b/src/main/resources/assets/botania/lang/en_US.lang index eec473668..c03e4d860 100644 --- a/src/main/resources/assets/botania/lang/en_US.lang +++ b/src/main/resources/assets/botania/lang/en_US.lang @@ -2766,6 +2766,16 @@ botania.page.exchangeRod1=Right clicking on a block in the world will start a la botania.page.exchangeRod2=Other rods or devices can be used to extend the power of the &1Rod of the Shifting Crust&0.
For example, having a &1Rod of the Lands&0 in one's inventory provides the &1Rod of the Shifting Crust&0 with an endless supply of &1Dirt&0, assuming the &4Mana&0 cost for the &1Rod of the Lands&0' dirt conjuration is fulfiled. botania.page.exchangeRod3=Bootlegged equal trade +# -- MANAWEAVE CLOTH +botania.entry.manaweave=Manaweave Cloth +botania.page.manaweave0=&1Manaweave Cloth&0 is a type of fabric with powerful ties to the primal energies contained in &4Mana&0.
Armor can be made of this cloth, &1Manaweave Robes&0, while they aren't very strong when it comes to raw resistance and strength, the robes make up for it with a powerful set bonus, making tools and rods cheaper to use, &4Mana&0 wise, and making the latter more powerful. +botania.page.manaweave1=Wearing the full set of &1Manaweave Robes&0 grants the wearer with increased proficiency when operating magical rods, increasing the power or range of them, or just their cost, for some of the more simpleton ones.
&1Manaweave Robes&0 can use &4Mana&0 from one's inventory to repair themselves, similarly to &1Manasteel Armor&0, but, due to their affinities with the primal energies, at a lower mana cost. +botania.page.manaweave2=Weaving the threads of mana +botania.page.manaweave3=Creating the Cowl +botania.page.manaweave4=Creating the Robe Top +botania.page.manaweave5=Creating the Robe Bottom +botania.page.manaweave6=Creating the Boots + # - ENDER ARTEFACTS # -- EXTRACTING ENDER AIR botania.entry.enderAir=Extracting Ender Air