From 98406793a1f9b5cbef3b6b5d71b78bf9a2904f88 Mon Sep 17 00:00:00 2001 From: WayofTime Date: Tue, 26 Jul 2016 19:44:42 -0400 Subject: [PATCH] Added the Potion Flask and a few of the potion effects - max amount of effects that can be added to a single flask is currently 3 --- changelog.txt | 1 + .../bloodmagic/item/ItemComponent.java | 4 +++ .../AlchemyTablePotionAugmentRecipe.java | 1 + .../AlchemyTablePotionRecipe.java | 4 +-- .../bloodmagic/registry/ModRecipes.java | 27 ++++++++++++++++-- .../blockstates/item/ItemComponent.json | 10 +++++++ .../assets/bloodmagic/lang/en_US.lang | 4 +++ .../items/MundaneLengtheningCatalyst.png | Bin 0 -> 336 bytes .../textures/items/MundanePowerCatalyst.png | Bin 0 -> 342 bytes 9 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 src/main/resources/assets/bloodmagic/textures/items/MundaneLengtheningCatalyst.png create mode 100644 src/main/resources/assets/bloodmagic/textures/items/MundanePowerCatalyst.png diff --git a/changelog.txt b/changelog.txt index 83dfa3c6..92d70fc4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Version 2.0.3-54 ------------------------------------------------------ - Eliminated some of the "wonkiness" from the Air Sigil - Fixed the Hellfire Forge so that swapping Tartaric gems will not give free stuff. +- Added the Potion Flask and a few of the potion effects - max amount of effects that can be added to a single flask is currently 3. ------------------------------------------------------ Version 2.0.3-53 diff --git a/src/main/java/WayofTime/bloodmagic/item/ItemComponent.java b/src/main/java/WayofTime/bloodmagic/item/ItemComponent.java index 26f2b936..e0f58123 100644 --- a/src/main/java/WayofTime/bloodmagic/item/ItemComponent.java +++ b/src/main/java/WayofTime/bloodmagic/item/ItemComponent.java @@ -51,6 +51,8 @@ public class ItemComponent extends Item implements IVariantProvider public static final String NEURO_TOXIN = "neurotoxin"; public static final String ANTISEPTIC = "antiseptic"; public static final String REAGENT_HOLDING = "reagentHolding"; + public static final String CATALYST_LENGTH_1 = "mundaneLength"; + public static final String CATALYST_POWER_1 = "mundanePower"; public ItemComponent() { @@ -93,6 +95,8 @@ public class ItemComponent extends Item implements IVariantProvider names.add(25, NEURO_TOXIN); names.add(26, ANTISEPTIC); names.add(27, REAGENT_HOLDING); + names.add(28, CATALYST_LENGTH_1); + names.add(29, CATALYST_POWER_1); } @Override diff --git a/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTablePotionAugmentRecipe.java b/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTablePotionAugmentRecipe.java index 0597060c..bcb12fb4 100644 --- a/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTablePotionAugmentRecipe.java +++ b/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTablePotionAugmentRecipe.java @@ -33,6 +33,7 @@ public class AlchemyTablePotionAugmentRecipe extends AlchemyTablePotionRecipe this.wantedPotion = baseEffect.getPotion(); this.lengthAugment = lengthAugment; + this.powerAugment = powerAugment; } public AlchemyTablePotionAugmentRecipe(int lpDrained, int ticksRequired, int tierRequired, ItemStack inputItem, PotionEffect baseEffect, double lengthAugment, int powerAugment) diff --git a/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTablePotionRecipe.java b/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTablePotionRecipe.java index 505d1fb5..d13e57ab 100644 --- a/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTablePotionRecipe.java +++ b/src/main/java/WayofTime/bloodmagic/recipe/alchemyTable/AlchemyTablePotionRecipe.java @@ -132,7 +132,7 @@ public class AlchemyTablePotionRecipe extends AlchemyTableRecipe public boolean isPotionFlaskValidInput(ItemStack stack) { List effectList = PotionUtils.getEffectsFromStack(stack); - if (effectList.size() + 1 >= temporaryMaximumEffectsOnThePotionFlaskYesThisIsALongFieldItIsJustSoIRemember) + if (effectList.size() >= temporaryMaximumEffectsOnThePotionFlaskYesThisIsALongFieldItIsJustSoIRemember) { return false; } @@ -164,7 +164,7 @@ public class AlchemyTablePotionRecipe extends AlchemyTableRecipe ItemStack outputStack = inputStack.copy(); - List effectList = new ArrayList(); + List effectList = PotionUtils.getEffectsFromStack(outputStack); effectList.add(baseEffect); PotionUtils.appendEffects(outputStack, effectList); diff --git a/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java b/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java index dc32586f..f18e928f 100644 --- a/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java +++ b/src/main/java/WayofTime/bloodmagic/registry/ModRecipes.java @@ -359,6 +359,8 @@ public class ModRecipes AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableDyeableRecipe(0, 100, 0, new ItemStack(ModItems.sigilHolding))); AlchemyTableRecipeRegistry.registerRecipe(new ItemStack(ModItems.potionFlask), 1000, 200, 2, new ItemStack(Items.POTIONITEM), Items.NETHER_WART, Items.REDSTONE, Items.GLOWSTONE_DUST); + AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.CATALYST_LENGTH_1), 1000, 100, 2, Items.GUNPOWDER, Items.NETHER_WART, "gemLapis"); + AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.CATALYST_POWER_1), 1000, 100, 2, Items.GUNPOWDER, Items.NETHER_WART, "dustRedstone"); } public static void addOreDoublingAlchemyRecipes() @@ -384,7 +386,28 @@ public class ModRecipes public static void addPotionRecipes() { - AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTablePotionRecipe(0, 100, 0, new ItemStack(Items.BLAZE_POWDER), new PotionEffect(MobEffects.STRENGTH, 3600, 0))); - AlchemyTableRecipeRegistry.registerRecipe(BMPotionUtils.getLengthAugmentRecipe(0, 100, 0, new ItemStack(Items.BLAZE_ROD), new PotionEffect(MobEffects.STRENGTH, 3600, 0), 1)); + addPotionRecipe(1000, 1, new ItemStack(Items.GHAST_TEAR), new PotionEffect(MobEffects.REGENERATION, 450)); + addPotionRecipe(1000, 1, new ItemStack(Items.GOLDEN_CARROT), new PotionEffect(MobEffects.NIGHT_VISION, 2 * 60 * 20)); + addPotionRecipe(1000, 1, new ItemStack(Items.MAGMA_CREAM), new PotionEffect(MobEffects.FIRE_RESISTANCE, 2 * 60 * 20)); + addPotionRecipe(1000, 1, new ItemStack(Items.WATER_BUCKET), new PotionEffect(MobEffects.WATER_BREATHING, 2 * 60 * 20)); + addPotionRecipe(1000, 1, new ItemStack(Items.SUGAR), new PotionEffect(MobEffects.SPEED, 2 * 60 * 20)); + } + + static ItemStack mundaneLengtheningStack = ItemComponent.getStack(ItemComponent.CATALYST_LENGTH_1); + static ItemStack mundanePowerStack = ItemComponent.getStack(ItemComponent.CATALYST_POWER_1); + + public static void addPotionRecipe(int lpDrained, int tier, ItemStack inputStack, PotionEffect baseEffect) + { + AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTablePotionRecipe(lpDrained, 100, tier, inputStack, baseEffect)); + + List lengtheningList = new ArrayList(); + lengtheningList.add(inputStack); + lengtheningList.add(mundaneLengtheningStack); + AlchemyTableRecipeRegistry.registerRecipe(BMPotionUtils.getLengthAugmentRecipe(lpDrained, 100, tier, lengtheningList, baseEffect, 1)); + + List powerList = new ArrayList(); + powerList.add(inputStack); + powerList.add(mundanePowerStack); + AlchemyTableRecipeRegistry.registerRecipe(BMPotionUtils.getPowerAugmentRecipe(lpDrained, 100, tier, powerList, baseEffect, 1)); } } diff --git a/src/main/resources/assets/bloodmagic/blockstates/item/ItemComponent.json b/src/main/resources/assets/bloodmagic/blockstates/item/ItemComponent.json index 477b3ece..3366196d 100644 --- a/src/main/resources/assets/bloodmagic/blockstates/item/ItemComponent.json +++ b/src/main/resources/assets/bloodmagic/blockstates/item/ItemComponent.json @@ -145,6 +145,16 @@ "textures": { "layer0": "bloodmagic:items/ReagentHolding" } + }, + "mundanelength": { + "textures": { + "layer0": "bloodmagic:items/MundaneLengtheningCatalyst" + } + }, + "mundanepower": { + "textures": { + "layer0": "bloodmagic:items/MundanePowerCatalyst" + } } } } diff --git a/src/main/resources/assets/bloodmagic/lang/en_US.lang b/src/main/resources/assets/bloodmagic/lang/en_US.lang index 7f256990..9af36c1b 100644 --- a/src/main/resources/assets/bloodmagic/lang/en_US.lang +++ b/src/main/resources/assets/bloodmagic/lang/en_US.lang @@ -100,6 +100,10 @@ item.BloodMagic.baseComponent.antiseptic.name=Antiseptic item.BloodMagic.cuttingFluid.basicCuttingFluid.name=Basic Cutting Fluid item.BloodMagic.cuttingFluid.explosive.name=Explosive Powder +item.BloodMagic.baseComponent.mundaneLength.name=Simple Lengthening Catalyst +item.BloodMagic.baseComponent.mundanePower.name=Simple Power Catalyst + + item.BloodMagic.demonCrystal.crystalDefault.name=Demon Will Crystal item.BloodMagic.demonCrystal.crystalCorrosive.name=Corrosive Will Crystal item.BloodMagic.demonCrystal.crystalDestructive.name=Destructive Will Crystal diff --git a/src/main/resources/assets/bloodmagic/textures/items/MundaneLengtheningCatalyst.png b/src/main/resources/assets/bloodmagic/textures/items/MundaneLengtheningCatalyst.png new file mode 100644 index 0000000000000000000000000000000000000000..6162e225c9f0b220c7808e815d1a0193116ba458 GIT binary patch literal 336 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)3Hc4lul!Q9bo2P=vF< zBeIx*fm;}a85w5HkpK#^mw5WRvft+tsWZRl)t zGT`A!P+a10=6a)}kLTO{Gg@SrxtWa*uRG=C_9*7Vd->*qGVA7TYfsm2weWAd(&Et; zZJsCezUk=t_l7&FSN)&< zJLBAk-w%V?^4j8Ccm=w-k_4tt`FB2B>v)3J;$s3;35v|0o2T>qU$;MD$EE~B7 zIhujHEneF%pDA_N{@8z>|L^xFRMb8-JUsd6X^GChR{8buh8*|AlPl^Tb28gMuAeij fa92W$YAS=uIrr#Ghp&nQJ<8ze>gTe~DWM4fFFS`B literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/bloodmagic/textures/items/MundanePowerCatalyst.png b/src/main/resources/assets/bloodmagic/textures/items/MundanePowerCatalyst.png new file mode 100644 index 0000000000000000000000000000000000000000..80590eac7e6a4123b07fa933de4a32c7ca0931c4 GIT binary patch literal 342 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4$}E;1y^Tu^QRif|Tq zL>4nJa0`PlBg3pY5H=O_WNA?f=bG&ai4Yog&uplIEGl9PX6=%zdf^RLuaFt z0S`}tqFdnX-kbG&d~$4TVq$DSaBPw6?hbcQ7Px|x!WkO6mMccmd98YeRd{_7Hbiv#I_H1qS|0UDs?eAGMO)%Q)%_gJY z>rZ~`Z+r-J!S49~#xa$DXEg#r;km`?M|M8=HhViy`M*MgoZ5dAAF>H6Gk5Qh2s>*L eYj9|i5kv2PFT;{n;cr0iGI+ZBxvX