mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 20:22:33 +00:00
Added the Brew of Absolution.
This commit is contained in:
1 parent
85447fb6c7
commit
6a95defc18
11 files changed
+59
-5
No files matched your search
@@ -37,6 +37,7 @@ public class ModBrews {
|
||||
public static Brew emptiness;
|
||||
public static Brew bloodthirst;
|
||||
public static Brew overload;
|
||||
public static Brew clear;
|
||||
|
||||
public static Brew warpWard;
|
||||
|
||||
@@ -61,6 +62,7 @@ public class ModBrews {
|
||||
emptiness = new BrewModPotion(LibBrewNames.EMPTINESS, 30000, new PotionEffect(ModPotions.emptiness.id, 7200, 0));
|
||||
bloodthirst = new BrewModPotion(LibBrewNames.BLOODTHIRST, 20000, new PotionEffect(ModPotions.bloodthrst.id, 7200, 0));
|
||||
allure = new BrewModPotion(LibBrewNames.ALLURE, 2000, new PotionEffect(ModPotions.allure.id, 4800, 0));
|
||||
clear = new BrewModPotion(LibBrewNames.CLEAR, 4000, new PotionEffect(ModPotions.clear.id, 0, 0));
|
||||
}
|
||||
|
||||
public static void initTC() {
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.lang.reflect.Modifier;
|
||||
import net.minecraft.potion.Potion;
|
||||
import vazkii.botania.common.brew.potion.PotionAllure;
|
||||
import vazkii.botania.common.brew.potion.PotionBloodthirst;
|
||||
import vazkii.botania.common.brew.potion.PotionClear;
|
||||
import vazkii.botania.common.brew.potion.PotionEmptiness;
|
||||
import vazkii.botania.common.brew.potion.PotionFeatherfeet;
|
||||
import vazkii.botania.common.brew.potion.PotionSoulCross;
|
||||
@@ -27,6 +28,7 @@ public class ModPotions {
|
||||
public static Potion emptiness;
|
||||
public static Potion bloodthrst;
|
||||
public static Potion allure;
|
||||
public static Potion clear;
|
||||
|
||||
public static void init() {
|
||||
if(Potion.potionTypes.length < 256)
|
||||
@@ -37,6 +39,7 @@ public class ModPotions {
|
||||
emptiness = new PotionEmptiness();
|
||||
bloodthrst = new PotionBloodthirst();
|
||||
allure = new PotionAllure();
|
||||
clear = new PotionClear();
|
||||
}
|
||||
|
||||
private static void extendPotionArray() {
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. 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 the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Jul 25, 2015, 6:08:52 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.brew.potion;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
import vazkii.botania.common.lib.LibPotionNames;
|
||||
|
||||
public class PotionClear extends PotionMod {
|
||||
|
||||
public PotionClear() {
|
||||
super(ConfigHandler.potionIDClear, LibPotionNames.CLEAR, false, 0xFFFFFF, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInstant() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void affectEntity(EntityLivingBase e, EntityLivingBase e1, int t, double d) {
|
||||
e1.curePotionEffects(new ItemStack(Items.milk_bucket));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,7 +27,7 @@ public class PotionEmptiness extends PotionMod {
|
||||
private static final int RANGE = 128;
|
||||
|
||||
public PotionEmptiness() {
|
||||
super(ConfigHandler.potionIDEmptiness, LibPotionNames.EMPTINESS, false, 0xE7E7E7, 2);
|
||||
super(ConfigHandler.potionIDEmptiness, LibPotionNames.EMPTINESS, false, 0xFACFFF, 2);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ public final class ConfigHandler {
|
||||
public static int potionIDEmptiness = 93;
|
||||
public static int potionIDBloodthirst = 94;
|
||||
public static int potionIDAllure = 95;
|
||||
public static int potionIDClear = 96;
|
||||
|
||||
public static void loadConfig(File configFile) {
|
||||
config = new Configuration(configFile);
|
||||
@@ -206,6 +207,7 @@ public final class ConfigHandler {
|
||||
potionIDEmptiness = loadPropPotionId(LibPotionNames.EMPTINESS, potionIDEmptiness);
|
||||
potionIDBloodthirst = loadPropPotionId(LibPotionNames.BLOODTHIRST, potionIDBloodthirst);
|
||||
potionIDAllure = loadPropPotionId(LibPotionNames.ALLURE, potionIDAllure);
|
||||
potionIDClear = loadPropPotionId(LibPotionNames.CLEAR, potionIDClear);
|
||||
|
||||
if(config.hasChanged())
|
||||
config.save();
|
||||
|
||||
@@ -41,6 +41,7 @@ public class ModBrewRecipes {
|
||||
public static RecipeBrew emptinessBrew;
|
||||
public static RecipeBrew bloodthirstBrew;
|
||||
public static RecipeBrew allureBrew;
|
||||
public static RecipeBrew clearBrew;
|
||||
|
||||
public static RecipeBrew warpWardBrew;
|
||||
|
||||
@@ -65,6 +66,7 @@ public class ModBrewRecipes {
|
||||
emptinessBrew = BotaniaAPI.registerBrewRecipe(ModBrews.emptiness, new ItemStack(Items.nether_wart), new ItemStack(Items.gunpowder), new ItemStack(Items.rotten_flesh), new ItemStack(Items.bone), new ItemStack(Items.string), new ItemStack(Items.ender_pearl));
|
||||
bloodthirstBrew = BotaniaAPI.registerBrewRecipe(ModBrews.bloodthirst, new ItemStack(Items.nether_wart), new ItemStack(Items.fermented_spider_eye), new ItemStack(Items.dye, 1, 4), new ItemStack(Items.fire_charge), new ItemStack(Items.iron_ingot));
|
||||
allureBrew = BotaniaAPI.registerBrewRecipe(ModBrews.allure, new ItemStack(Items.nether_wart), new ItemStack(Items.fish), new ItemStack(Items.quartz), new ItemStack(Items.golden_carrot));
|
||||
clearBrew = BotaniaAPI.registerBrewRecipe(ModBrews.clear, new ItemStack(Items.nether_wart), new ItemStack(Items.quartz), new ItemStack(Items.emerald), new ItemStack(Items.melon));
|
||||
}
|
||||
|
||||
public static void initTC() {
|
||||
|
||||
@@ -79,7 +79,10 @@ public abstract class ItemBrewBase extends ItemMod implements IBrewItem {
|
||||
if(!world.isRemote) {
|
||||
for(PotionEffect effect : getBrew(stack).getPotionEffects(stack)) {
|
||||
PotionEffect newEffect = new PotionEffect(effect.getPotionID(), effect.getDuration(), effect.getAmplifier(), true);
|
||||
player.addPotionEffect(newEffect);
|
||||
Potion potion = Potion.potionTypes[newEffect.getPotionID()];
|
||||
if(potion.isInstant())
|
||||
potion.affectEntity(player, player, newEffect.getAmplifier(), 1F);
|
||||
else player.addPotionEffect(newEffect);
|
||||
}
|
||||
|
||||
if(world.rand.nextBoolean())
|
||||
|
||||
@@ -604,7 +604,8 @@ public final class LexiconData {
|
||||
complexBrews.setLexiconPages(new PageText("0"),
|
||||
new PageBrew(ModBrewRecipes.overloadBrew, "1a", "1b"), new PageBrew(ModBrewRecipes.soulCrossBrew, "2a", "2b"),
|
||||
new PageBrew(ModBrewRecipes.featherFeetBrew, "3a", "3b"), new PageBrew(ModBrewRecipes.emptinessBrew, "4a", "4b"),
|
||||
new PageBrew(ModBrewRecipes.bloodthirstBrew, "5a", "5b"), new PageBrew(ModBrewRecipes.allureBrew, "6a", "6b")).setIcon(((IBrewContainer) ModItems.vial).getItemForBrew(ModBrews.jumpBoost, new ItemStack(ModItems.vial)));
|
||||
new PageBrew(ModBrewRecipes.bloodthirstBrew, "5a", "5b"), new PageBrew(ModBrewRecipes.allureBrew, "6a", "6b"),
|
||||
new PageBrew(ModBrewRecipes.clearBrew, "7a", "7b")).setIcon(((IBrewContainer) ModItems.vial).getItemForBrew(ModBrews.jumpBoost, new ItemStack(ModItems.vial)));
|
||||
|
||||
incense = new BLexiconEntry(LibLexicon.DEVICE_INCENSE, categoryDevices);
|
||||
incense.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageText("5"), new PageCraftingRecipe("3", ModCraftingRecipes.recipeIncenseStick), new PageCraftingRecipe("4", ModCraftingRecipes.recipeIncensePlate));
|
||||
|
||||
@@ -32,6 +32,7 @@ public final class LibBrewNames {
|
||||
public static final String BLOODTHIRST = "bloodthirst";
|
||||
public static final String OVERLOAD = "overload";
|
||||
public static final String ALLURE = "allure";
|
||||
public static final String CLEAR = "clear";
|
||||
|
||||
public static final String WARP_WARD = "warpWard";
|
||||
|
||||
|
||||
@@ -17,5 +17,6 @@ public final class LibPotionNames {
|
||||
public static final String EMPTINESS = "emptiness";
|
||||
public static final String BLOODTHIRST = "bloodthirst";
|
||||
public static final String ALLURE = "allure";
|
||||
public static final String CLEAR = "clear";
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user