Changed formatting to have bracing on a new line
This commit is contained in:
parent
e5eddd6c45
commit
e48eedb874
189 changed files with 6092 additions and 4041 deletions
|
@ -8,7 +8,8 @@ import net.minecraft.util.ResourceLocation;
|
|||
import WayofTime.bloodmagic.potion.PotionBloodMagic;
|
||||
import WayofTime.bloodmagic.potion.PotionEventHandlers;
|
||||
|
||||
public class ModPotions {
|
||||
public class ModPotions
|
||||
{
|
||||
|
||||
public static Potion drowning;
|
||||
public static Potion boost;
|
||||
|
@ -16,31 +17,43 @@ public class ModPotions {
|
|||
public static Potion whirlwind;
|
||||
public static Potion planarBinding;
|
||||
|
||||
public static void init() {
|
||||
if (Potion.potionTypes.length < 256) extendPortionArray();
|
||||
public static void init()
|
||||
{
|
||||
if (Potion.potionTypes.length < 256)
|
||||
extendPortionArray();
|
||||
|
||||
new PotionEventHandlers();
|
||||
|
||||
//TODO FUTURE MAKE POTION TEXTURES
|
||||
// TODO FUTURE MAKE POTION TEXTURES
|
||||
|
||||
// final String resourceLocation = Constants.Mod.MODID + ":textures/potions/";
|
||||
// final String resourceLocation = Constants.Mod.MODID +
|
||||
// ":textures/potions/";
|
||||
|
||||
// drowning = new PotionBloodMagic("Drowning", new ResourceLocation(resourceLocation + drowning.getName().toLowerCase()), true, 0, 0, 0);
|
||||
// drowning = new PotionBloodMagic("Drowning", new
|
||||
// ResourceLocation(resourceLocation +
|
||||
// drowning.getName().toLowerCase()), true, 0, 0, 0);
|
||||
boost = new PotionBloodMagic("Boost", new ResourceLocation("boost")
|
||||
// new ResourceLocation(resourceLocation + boost.getName().toLowerCase())
|
||||
, false, 0, 0, 0);
|
||||
// new ResourceLocation(resourceLocation +
|
||||
// boost.getName().toLowerCase())
|
||||
, false, 0, 0, 0);
|
||||
whirlwind = new PotionBloodMagic("Whirlwind", new ResourceLocation("whirlwind"), false, 0, 0, 0);
|
||||
planarBinding = new PotionBloodMagic("Planar Binding", new ResourceLocation("planarBinding"), false, 0, 0, 0);
|
||||
// heavyHeart = new PotionBloodMagic("Heavy Heart", new ResourceLocation(resourceLocation + heavyHeart.getName().toLowerCase()), true, 0, 0, 0);
|
||||
// heavyHeart = new PotionBloodMagic("Heavy Heart", new
|
||||
// ResourceLocation(resourceLocation +
|
||||
// heavyHeart.getName().toLowerCase()), true, 0, 0, 0);
|
||||
}
|
||||
|
||||
public static void extendPortionArray() {
|
||||
public static void extendPortionArray()
|
||||
{
|
||||
Potion[] potionTypes;
|
||||
|
||||
for (Field f : Potion.class.getDeclaredFields()) {
|
||||
for (Field f : Potion.class.getDeclaredFields())
|
||||
{
|
||||
f.setAccessible(true);
|
||||
try {
|
||||
if (f.getName().equals("potionTypes") || f.getName().equals("field_76425_a")) {
|
||||
try
|
||||
{
|
||||
if (f.getName().equals("potionTypes") || f.getName().equals("field_76425_a"))
|
||||
{
|
||||
Field field = Field.class.getDeclaredField("modifiers");
|
||||
field.setAccessible(true);
|
||||
field.setInt(f, f.getModifiers() & ~Modifier.FINAL);
|
||||
|
@ -50,7 +63,8 @@ public class ModPotions {
|
|||
System.arraycopy(potionTypes, 0, newPotionTypes, 0, potionTypes.length);
|
||||
f.set(null, newPotionTypes);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
} catch (Exception e)
|
||||
{
|
||||
System.err.println(e);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue