Performance Commit 2

This commit is contained in:
Arcaratus 2015-07-28 13:49:26 -04:00
parent 603db8ee2a
commit c447106cb1
61 changed files with 96 additions and 368 deletions

View file

@ -201,7 +201,6 @@ public class BloodMagicConfiguration
// PlayerSacrificeHandler.scalingOfSacrifice = (float) config.get("TestIncenseSettings", "ScalingFactor", 0.0025f).getDouble(); // PlayerSacrificeHandler.scalingOfSacrifice = (float) config.get("TestIncenseSettings", "ScalingFactor", 0.0025f).getDouble();
// PlayerSacrificeHandler.soulFrayDuration = config.get("TestIncenseSettings", "SoulFrayDuration", 400).getInt(); // PlayerSacrificeHandler.soulFrayDuration = config.get("TestIncenseSettings", "SoulFrayDuration", 400).getInt();
Side side = FMLCommonHandler.instance().getSide(); Side side = FMLCommonHandler.instance().getSide();
if (side == Side.CLIENT) if (side == Side.CLIENT)
{ {
@ -217,7 +216,6 @@ public class BloodMagicConfiguration
public static void set(String categoryName, String propertyName, String newValue) public static void set(String categoryName, String propertyName, String newValue)
{ {
config.load(); config.load();
if (config.getCategoryNames().contains(categoryName)) if (config.getCategoryNames().contains(categoryName))
{ {
@ -227,8 +225,6 @@ public class BloodMagicConfiguration
} }
} }
config.save(); config.save();
} }
public static void loadBlacklist() public static void loadBlacklist()
@ -252,185 +248,47 @@ public class BloodMagicConfiguration
public static void blacklistRituals() public static void blacklistRituals()
{ {
if (AlchemicalWizardry.ritualDisabledWater) if (AlchemicalWizardry.ritualDisabledWater) r("AW001Water");
{ if (AlchemicalWizardry.ritualDisabledLava) r("AW002Lava");
Rituals.ritualMap.remove("AW001Water"); if (AlchemicalWizardry.ritualDisabledGreenGrove) r("AW003GreenGrove");
Rituals.keyList.remove("AW001Water"); if (AlchemicalWizardry.ritualDisabledInterdiction) r("AW004Interdiction");
} if (AlchemicalWizardry.ritualDisabledContainment) r("AW005Containment");
if (AlchemicalWizardry.ritualDisabledLava) if (AlchemicalWizardry.ritualDisabledBinding) r("AW006Binding");
{ if (AlchemicalWizardry.ritualDisabledUnbinding) r("AW007Unbinding"); // "A medium dry martini, lemon peel. Shaken, not stirred."
Rituals.ritualMap.remove("AW002Lava"); if (AlchemicalWizardry.ritualDisabledHighJump) r("AW008HighJump");
Rituals.keyList.remove("AW002Lava"); if (AlchemicalWizardry.ritualDisabledMagnetism) r("AW009Magnetism");
} if (AlchemicalWizardry.ritualDisabledCrusher) r("AW010Crusher");
if (AlchemicalWizardry.ritualDisabledGreenGrove) if (AlchemicalWizardry.ritualDisabledSpeed) r("AW011Speed");
{ if (AlchemicalWizardry.ritualDisabledAnimalGrowth) r("AW012AnimalGrowth");
Rituals.ritualMap.remove("AW003GreenGrove"); if (AlchemicalWizardry.ritualDisabledSuffering) r("AW013Suffering");
Rituals.keyList.remove("AW003GreenGrove"); if (AlchemicalWizardry.ritualDisabledRegen) r("AW014Regen");
} if (AlchemicalWizardry.ritualDisabledFeatheredKnife) r("AW015FeatheredKnife");
if (AlchemicalWizardry.ritualDisabledInterdiction) if (AlchemicalWizardry.ritualDisabledFeatheredEarth) r("AW016FeatheredEarth");
{ if (AlchemicalWizardry.ritualDisabledGaia) r("AW017Gaia");
Rituals.ritualMap.remove("AW004Interdiction"); if (AlchemicalWizardry.ritualDisabledCondor) r("AW018Condor");
Rituals.keyList.remove("AW004Interdiction"); if (AlchemicalWizardry.ritualDisabledFallingTower) r("AW019FallingTower");
} if (AlchemicalWizardry.ritualDisabledBalladOfAlchemy) r("AW020BalladOfAlchemy");
if (AlchemicalWizardry.ritualDisabledContainment) if (AlchemicalWizardry.ritualDisabledExpulsion) r("AW021Expulsion");
{ if (AlchemicalWizardry.ritualDisabledSuppression) r("AW022Suppression");
Rituals.ritualMap.remove("AW005Containment"); if (AlchemicalWizardry.ritualDisabledZephyr) r("AW023Zephyr");
Rituals.keyList.remove("AW005Containment"); if (AlchemicalWizardry.ritualDisabledHarvest) r("AW024Harvest");
} if (AlchemicalWizardry.ritualDisabledConduit) r("AW025Conduit");
if (AlchemicalWizardry.ritualDisabledBinding) if (AlchemicalWizardry.ritualDisabledEllipsoid) r("AW026Ellipsoid");
{ if (AlchemicalWizardry.ritualDisabledEvaporation) r("AW027Evaporation");
Rituals.ritualMap.remove("AW006Binding"); if (AlchemicalWizardry.ritualDisabledSpawnWard) r("AW028SpawnWard");
Rituals.keyList.remove("AW006Binding"); if (AlchemicalWizardry.ritualDisabledVeilOfEvil) r("AW029VeilOfEvil");
} if (AlchemicalWizardry.ritualDisabledFullStomach) r("AW030FullStomach");
if (AlchemicalWizardry.ritualDisabledUnbinding) if (AlchemicalWizardry.ritualDisabledConvocation) r("AW031Convocation");
{ if (AlchemicalWizardry.ritualDisabledSymmetry) r("AW032Symmetry");
Rituals.ritualMap.remove("AW007Unbinding");//007 reporting for duty if (AlchemicalWizardry.ritualDisabledStalling) r("AW033Stalling");
Rituals.keyList.remove("AW007Unbinding"); if (AlchemicalWizardry.ritualDisabledCrafting) r("AW034Crafting");
} if (AlchemicalWizardry.ritualDisabledPhantomHands) r("AW035PhantomHands");
if (AlchemicalWizardry.ritualDisabledHighJump) if (AlchemicalWizardry.ritualDisabledSphereIsland) r("AW036SphereIsland");
{ }
Rituals.ritualMap.remove("AW008HighJump");
Rituals.keyList.remove("AW008HighJump"); private static void r(String ritualID)
} {
if (AlchemicalWizardry.ritualDisabledMagnetism) Rituals.ritualMap.remove(ritualID);
{ Rituals.keyList.remove(ritualID);
Rituals.ritualMap.remove("AW009Magnetism");
Rituals.keyList.remove("AW009Magnetism");
}
if (AlchemicalWizardry.ritualDisabledCrusher)
{
Rituals.ritualMap.remove("AW010Crusher");
Rituals.keyList.remove("AW010Crusher");
}
if (AlchemicalWizardry.ritualDisabledSpeed)
{
Rituals.ritualMap.remove("AW011Speed");
Rituals.keyList.remove("AW011Speed");
}
if (AlchemicalWizardry.ritualDisabledAnimalGrowth)
{
Rituals.ritualMap.remove("AW012AnimalGrowth");
Rituals.keyList.remove("AW012AnimalGrowth");
}
if (AlchemicalWizardry.ritualDisabledSuffering)
{
Rituals.ritualMap.remove("AW013Suffering");
Rituals.keyList.remove("AW013Suffering");
}
if (AlchemicalWizardry.ritualDisabledRegen)
{
Rituals.ritualMap.remove("AW014Regen");
Rituals.keyList.remove("AW014Regen");
}
if (AlchemicalWizardry.ritualDisabledFeatheredKnife)
{
Rituals.ritualMap.remove("AW015FeatheredKnife");
Rituals.keyList.remove("AW015FeatheredKnife");
}
if (AlchemicalWizardry.ritualDisabledFeatheredEarth)
{
Rituals.ritualMap.remove("AW016FeatheredEarth");
Rituals.keyList.remove("AW016FeatheredEarth");
}
if (AlchemicalWizardry.ritualDisabledGaia)
{
Rituals.ritualMap.remove("AW017Gaia");
Rituals.keyList.remove("AW017Gaia");
}
if (AlchemicalWizardry.ritualDisabledCondor)
{
Rituals.ritualMap.remove("AW018Condor");
Rituals.keyList.remove("AW018Condor");
}
if (AlchemicalWizardry.ritualDisabledFallingTower)
{
Rituals.ritualMap.remove("AW019FallingTower");
Rituals.keyList.remove("AW019FallingTower");
}
if (AlchemicalWizardry.ritualDisabledBalladOfAlchemy)
{
Rituals.ritualMap.remove("AW020BalladOfAlchemy");
Rituals.keyList.remove("AW020BalladOfAlchemy");
}
if (AlchemicalWizardry.ritualDisabledExpulsion)
{
Rituals.ritualMap.remove("AW021Expulsion");
Rituals.keyList.remove("AW021Expulsion");
}
if (AlchemicalWizardry.ritualDisabledSuppression)
{
Rituals.ritualMap.remove("AW022Suppression");
Rituals.keyList.remove("AW022Suppression");
}
if (AlchemicalWizardry.ritualDisabledZephyr)
{
Rituals.ritualMap.remove("AW023Zephyr");
Rituals.keyList.remove("AW023Zephyr");
}
if (AlchemicalWizardry.ritualDisabledHarvest)
{
Rituals.ritualMap.remove("AW024Harvest");
Rituals.keyList.remove("AW024Harvest");
}
if (AlchemicalWizardry.ritualDisabledConduit)
{
Rituals.ritualMap.remove("AW025Conduit");
Rituals.keyList.remove("AW025Conduit");
}
if (AlchemicalWizardry.ritualDisabledEllipsoid)
{
Rituals.ritualMap.remove("AW026Ellipsoid");
Rituals.keyList.remove("AW026Ellipsoid");
}
if (AlchemicalWizardry.ritualDisabledEvaporation)
{
Rituals.ritualMap.remove("AW027Evaporation");
Rituals.keyList.remove("AW027Evaporation");
}
if (AlchemicalWizardry.ritualDisabledSpawnWard)
{
Rituals.ritualMap.remove("AW028SpawnWard");
Rituals.keyList.remove("AW028SpawnWard");
}
if (AlchemicalWizardry.ritualDisabledVeilOfEvil)
{
Rituals.ritualMap.remove("AW029VeilOfEvil");
Rituals.keyList.remove("AW029VeilOfEvil");
}
if (AlchemicalWizardry.ritualDisabledFullStomach)
{
Rituals.ritualMap.remove("AW030FullStomach");
Rituals.keyList.remove("AW030FullStomach");
}
if (AlchemicalWizardry.ritualDisabledConvocation)
{
Rituals.ritualMap.remove("AW031Convocation");
Rituals.keyList.remove("AW031Convocation");
}
if (AlchemicalWizardry.ritualDisabledSymmetry)
{
Rituals.ritualMap.remove("AW032Symmetry");
Rituals.keyList.remove("AW032Symmetry");
}
if (AlchemicalWizardry.ritualDisabledStalling)
{
Rituals.ritualMap.remove("AW033Stalling");
Rituals.keyList.remove("AW033Stalling");
}
if (AlchemicalWizardry.ritualDisabledCrafting)
{
Rituals.ritualMap.remove("AW034Crafting");
Rituals.keyList.remove("AW034Crafting");
}
if (AlchemicalWizardry.ritualDisabledPhantomHands)
{
Rituals.ritualMap.remove("AW035PhantomHands");
Rituals.keyList.remove("AW035PhantomHands");
}
if (AlchemicalWizardry.ritualDisabledSphereIsland)
{
Rituals.ritualMap.remove("AW036SphereIsland");
Rituals.keyList.remove("AW036SphereIsland");
}
} }
} }

View file

@ -284,7 +284,7 @@ public class ModItems
energyBazooka = new EnergyBazooka().setUnlocalizedName("energyBazooka"); energyBazooka = new EnergyBazooka().setUnlocalizedName("energyBazooka");
itemBloodLightSigil = new SigilBloodLight().setUnlocalizedName("bloodLightSigil"); itemBloodLightSigil = new SigilBloodLight().setUnlocalizedName("bloodLightSigil");
itemComplexSpellCrystal = new ItemComplexSpellCrystal().setUnlocalizedName("itemComplexSpellCrystal"); itemComplexSpellCrystal = new ItemComplexSpellCrystal().setUnlocalizedName("itemComplexSpellCrystal");
bucketLife = (new LifeBucket(ModBlocks.blockLifeEssence)).setUnlocalizedName("bucketLife").setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc); bucketLife = new LifeBucket(ModBlocks.blockLifeEssence).setUnlocalizedName("bucketLife").setContainerItem(Items.bucket).setCreativeTab(CreativeTabs.tabMisc);
itemSigilOfEnderSeverance = (new SigilOfEnderSeverance()).setUnlocalizedName("itemSigilOfEnderSeverance"); itemSigilOfEnderSeverance = (new SigilOfEnderSeverance()).setUnlocalizedName("itemSigilOfEnderSeverance");
baseItems = new ItemComponents().setUnlocalizedName("baseItems"); baseItems = new ItemComponents().setUnlocalizedName("baseItems");
baseAlchemyItems = new ItemAlchemyBase().setUnlocalizedName("baseAlchemyItems"); baseAlchemyItems = new ItemAlchemyBase().setUnlocalizedName("baseAlchemyItems");

View file

@ -1,6 +1,7 @@
package WayofTime.alchemicalWizardry.common; package WayofTime.alchemicalWizardry.common;
import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
public class LifeEssence extends Fluid public class LifeEssence extends Fluid
{ {
@ -18,7 +19,7 @@ public class LifeEssence extends Fluid
} }
@Override @Override
public String getLocalizedName() public String getLocalizedName(FluidStack fluidStack)
{ {
return "Life Essence"; return "Life Essence";
} }

View file

@ -1,21 +0,0 @@
package WayofTime.alchemicalWizardry.common.spell.complex;
public class SpellModifier
{
public static final int DEFAULT = 0;
public static final int OFFENSIVE = 1;
public static final int DEFENSIVE = 2;
public static final int ENVIRONMENTAL = 3;
private int modifier;
protected SpellModifier(int modifier)
{
this.modifier = modifier;
}
public int getModifier()
{
return this.modifier;
}
}

View file

@ -1,9 +0,0 @@
package WayofTime.alchemicalWizardry.common.spell.complex;
public class SpellModifierDefault extends SpellModifier
{
public SpellModifierDefault()
{
super(SpellModifier.DEFAULT);
}
}

View file

@ -1,9 +0,0 @@
package WayofTime.alchemicalWizardry.common.spell.complex;
public class SpellModifierDefensive extends SpellModifier
{
public SpellModifierDefensive()
{
super(SpellModifier.DEFENSIVE);
}
}

View file

@ -1,9 +0,0 @@
package WayofTime.alchemicalWizardry.common.spell.complex;
public class SpellModifierEnvironmental extends SpellModifier
{
public SpellModifierEnvironmental()
{
super(SpellModifier.ENVIRONMENTAL);
}
}

View file

@ -1,9 +0,0 @@
package WayofTime.alchemicalWizardry.common.spell.complex;
public class SpellModifierOffensive extends SpellModifier
{
public SpellModifierOffensive()
{
super(SpellModifier.OFFENSIVE);
}
}

View file

@ -17,7 +17,6 @@ public class CSEMeleeDefaultEarth extends ComplexSpellEffect
public CSEMeleeDefaultEarth(int power, int cost, int potency) public CSEMeleeDefaultEarth(int power, int cost, int potency)
{ {
this(); this();
this.powerEnhancement = power; this.powerEnhancement = power;
this.costEnhancement = cost; this.costEnhancement = cost;
this.potencyEnhancement = potency; this.potencyEnhancement = potency;

View file

@ -17,7 +17,6 @@ public class CSEMeleeDefensiveEarth extends ComplexSpellEffect
public CSEMeleeDefensiveEarth(int power, int cost, int potency) public CSEMeleeDefensiveEarth(int power, int cost, int potency)
{ {
this(); this();
this.powerEnhancement = power; this.powerEnhancement = power;
this.costEnhancement = cost; this.costEnhancement = cost;
this.potencyEnhancement = potency; this.potencyEnhancement = potency;

View file

@ -17,7 +17,6 @@ public class CSEMeleeEnvironmentalEarth extends ComplexSpellEffect
public CSEMeleeEnvironmentalEarth(int power, int cost, int potency) public CSEMeleeEnvironmentalEarth(int power, int cost, int potency)
{ {
this(); this();
this.powerEnhancement = power; this.powerEnhancement = power;
this.costEnhancement = cost; this.costEnhancement = cost;
this.potencyEnhancement = potency; this.potencyEnhancement = potency;

View file

@ -17,7 +17,6 @@ public class CSEMeleeOffensiveEarth extends ComplexSpellEffect
public CSEMeleeOffensiveEarth(int power, int cost, int potency) public CSEMeleeOffensiveEarth(int power, int cost, int potency)
{ {
this(); this();
this.powerEnhancement = power; this.powerEnhancement = power;
this.costEnhancement = cost; this.costEnhancement = cost;
this.potencyEnhancement = potency; this.potencyEnhancement = potency;

View file

@ -17,7 +17,6 @@ public class CSEProjectileDefaultEarth extends ComplexSpellEffect
public CSEProjectileDefaultEarth(int power, int cost, int potency) public CSEProjectileDefaultEarth(int power, int cost, int potency)
{ {
this(); this();
this.powerEnhancement = power; this.powerEnhancement = power;
this.costEnhancement = cost; this.costEnhancement = cost;
this.potencyEnhancement = potency; this.potencyEnhancement = potency;

View file

@ -17,7 +17,6 @@ public class CSEProjectileEnvironmentalEarth extends ComplexSpellEffect
public CSEProjectileEnvironmentalEarth(int power, int cost, int potency) public CSEProjectileEnvironmentalEarth(int power, int cost, int potency)
{ {
this(); this();
this.powerEnhancement = power; this.powerEnhancement = power;
this.costEnhancement = cost; this.costEnhancement = cost;
this.potencyEnhancement = potency; this.potencyEnhancement = potency;

View file

@ -17,7 +17,6 @@ public class CSEProjectileOffensiveEarth extends ComplexSpellEffect
public CSEProjectileOffensiveEarth(int power, int cost, int potency) public CSEProjectileOffensiveEarth(int power, int cost, int potency)
{ {
this(); this();
this.powerEnhancement = power; this.powerEnhancement = power;
this.costEnhancement = cost; this.costEnhancement = cost;
this.potencyEnhancement = potency; this.potencyEnhancement = potency;

View file

@ -17,7 +17,6 @@ public class CSESelfDefaultEarth extends ComplexSpellEffect
public CSESelfDefaultEarth(int power, int cost, int potency) public CSESelfDefaultEarth(int power, int cost, int potency)
{ {
this(); this();
this.powerEnhancement = power; this.powerEnhancement = power;
this.costEnhancement = cost; this.costEnhancement = cost;
this.potencyEnhancement = potency; this.potencyEnhancement = potency;

View file

@ -17,7 +17,6 @@ public class CSESelfDefensiveEarth extends ComplexSpellEffect
public CSESelfDefensiveEarth(int power, int cost, int potency) public CSESelfDefensiveEarth(int power, int cost, int potency)
{ {
this(); this();
this.powerEnhancement = power; this.powerEnhancement = power;
this.costEnhancement = cost; this.costEnhancement = cost;
this.potencyEnhancement = potency; this.potencyEnhancement = potency;

View file

@ -17,7 +17,6 @@ public class CSESelfOffensiveEarth extends ComplexSpellEffect
public CSESelfOffensiveEarth(int power, int cost, int potency) public CSESelfOffensiveEarth(int power, int cost, int potency)
{ {
this(); this();
this.powerEnhancement = power; this.powerEnhancement = power;
this.costEnhancement = cost; this.costEnhancement = cost;
this.potencyEnhancement = potency; this.potencyEnhancement = potency;

View file

@ -29,10 +29,8 @@ public class CSEToolDefaultEarth extends ComplexSpellEffect
{ {
String toolClass = "pickaxe"; String toolClass = "pickaxe";
float digSpeed = 7.0f; float digSpeed = 7.0f;
switch (this.powerEnhancement) switch (this.powerEnhancement)
{ {
case 1: case 1:
@ -52,10 +50,8 @@ public class CSEToolDefaultEarth extends ComplexSpellEffect
break; break;
} }
((SpellParadigmTool)parad).setDigSpeed(toolClass, digSpeed); ((SpellParadigmTool)parad).setDigSpeed(toolClass, digSpeed);
int hlvl = this.potencyEnhancement + 2; int hlvl = this.potencyEnhancement + 2;
((SpellParadigmTool)parad).setHarvestLevel(toolClass, hlvl); ((SpellParadigmTool)parad).setHarvestLevel(toolClass, hlvl);
} }

View file

@ -17,7 +17,6 @@ public class CSEToolEnvironmentalEarth extends ComplexSpellEffect
public CSEToolEnvironmentalEarth(int power, int cost, int potency) public CSEToolEnvironmentalEarth(int power, int cost, int potency)
{ {
this(); this();
this.powerEnhancement = power; this.powerEnhancement = power;
this.costEnhancement = cost; this.costEnhancement = cost;
this.potencyEnhancement = potency; this.potencyEnhancement = potency;

View file

@ -17,7 +17,6 @@ public class CSEToolOffensiveEarth extends ComplexSpellEffect
public CSEToolOffensiveEarth(int power, int cost, int potency) public CSEToolOffensiveEarth(int power, int cost, int potency)
{ {
this(); this();
this.powerEnhancement = power; this.powerEnhancement = power;
this.costEnhancement = cost; this.costEnhancement = cost;
this.potencyEnhancement = potency; this.potencyEnhancement = potency;

View file

@ -41,6 +41,6 @@ public class CSEMeleeEnvironmentalIce extends ComplexSpellEffect
@Override @Override
public int getCostOfEffect() public int getCostOfEffect()
{ {
return (int) (20 * (0.5 * potencyEnhancement + 1) * (0 * powerEnhancement + 1) * Math.pow(0.85, costEnhancement)); return (int) (20 * (0.5 * potencyEnhancement + 1) * 1 * Math.pow(0.85, costEnhancement)); //where the lone 1 is: (0 * potencyEnhancement + 1)
} }
} }

View file

@ -17,7 +17,6 @@ public class CSEMeleeDefaultWind extends ComplexSpellEffect
public CSEMeleeDefaultWind(int power, int cost, int potency) public CSEMeleeDefaultWind(int power, int cost, int potency)
{ {
this(); this();
this.powerEnhancement = power; this.powerEnhancement = power;
this.costEnhancement = cost; this.costEnhancement = cost;
this.potencyEnhancement = potency; this.potencyEnhancement = potency;

View file

@ -40,6 +40,6 @@ public class CSEProjectileDefensiveWind extends ComplexSpellEffect
@Override @Override
public int getCostOfEffect() public int getCostOfEffect()
{ {
return (int) (100 * (this.potencyEnhancement + 1)); return (100 * (this.potencyEnhancement + 1));
} }
} }

View file

@ -22,8 +22,8 @@ public class ProjectileDefensiveEarth extends ProjectileImpactEffect
@Override @Override
public void onTileImpact(World world, MovingObjectPosition mop) public void onTileImpact(World world, MovingObjectPosition mop)
{ {
int horizRange = (int) (this.powerUpgrades); int horizRange = this.powerUpgrades;
int vertRange = (int) (this.potencyUpgrades); int vertRange = this.potencyUpgrades;
int posX = mop.blockX; int posX = mop.blockX;
int posY = mop.blockY; int posY = mop.blockY;

View file

@ -19,8 +19,8 @@ public class ProjectileOffensiveEarth extends ProjectileImpactEffect
@Override @Override
public void onEntityImpact(Entity mop, Entity proj) public void onEntityImpact(Entity mop, Entity proj)
{ {
int horizRange = (int) (this.powerUpgrades); int horizRange = this.powerUpgrades;
int vertDepth = (int) (3 * this.potencyUpgrades + 1); int vertDepth = 3 * this.potencyUpgrades + 1;
Vec3 blockVector = SpellHelper.getEntityBlockVector(mop); Vec3 blockVector = SpellHelper.getEntityBlockVector(mop);

View file

@ -3,7 +3,6 @@ package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.e
import java.util.List; import java.util.List;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;

View file

@ -8,7 +8,6 @@ import net.minecraft.world.World;
public class SelfOffensiveEarth extends SelfSpellEffect public class SelfOffensiveEarth extends SelfSpellEffect
{ {
public SelfOffensiveEarth(int power, int potency, int cost) public SelfOffensiveEarth(int power, int potency, int cost)
{ {
super(power, potency, cost); super(power, potency, cost);

View file

@ -1,6 +1,5 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth; package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.earth;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.ItemManipulator; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.ItemManipulator;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
@ -10,24 +9,20 @@ import net.minecraft.item.ItemStack;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
public class ToolOffensiveEarth extends ItemManipulator public class ToolOffensiveEarth extends ItemManipulator
{ {
public static Block[] mundaneList = new Block[]{Blocks.stone, Blocks.cobblestone, Blocks.sand, Blocks.gravel, Blocks.netherrack, Blocks.dirt}; public static Block[] mundaneList = new Block[]{Blocks.stone, Blocks.cobblestone, Blocks.sand, Blocks.gravel, Blocks.netherrack, Blocks.dirt};
public ToolOffensiveEarth(int power, int potency, int cost) public ToolOffensiveEarth(int power, int potency, int cost)
{ {
super(power, potency, cost); super(power, potency, cost);
} }
@Override @Override
public List<ItemStack> handleItemsOnBlockBroken(ItemStack toolStack, List<ItemStack> itemList) public List<ItemStack> handleItemsOnBlockBroken(ItemStack toolStack, List<ItemStack> itemList)
{ {
List<ItemStack> newList = new LinkedList(); List<ItemStack> newList = new LinkedList();
for (ItemStack stack : itemList) for (ItemStack stack : itemList)
{ {
if (stack != null && stack.getItem() instanceof ItemBlock && !this.isMundaneBlock(((ItemBlock) stack.getItem()).field_150939_a)) if (stack != null && stack.getItem() instanceof ItemBlock && !this.isMundaneBlock(((ItemBlock) stack.getItem()).field_150939_a))
@ -36,7 +31,6 @@ public class ToolOffensiveEarth extends ItemManipulator
} }
} }
return newList; return newList;
} }
@ -51,7 +45,6 @@ public class ToolOffensiveEarth extends ItemManipulator
} }
} }
return false; return false;
} }
} }

View file

@ -22,8 +22,8 @@ public class ProjectileDefensiveFire extends ProjectileImpactEffect
@Override @Override
public void onTileImpact(World world, MovingObjectPosition mop) public void onTileImpact(World world, MovingObjectPosition mop)
{ {
int horizRange = (int) ((this.powerUpgrades)); int horizRange = this.powerUpgrades;
int vertRange = (int) ((this.powerUpgrades)); int vertRange = this.powerUpgrades;
int posX = mop.blockX; int posX = mop.blockX;
int posY = mop.blockY; int posY = mop.blockY;

View file

@ -18,8 +18,8 @@ public class ProjectileOffensiveFire extends ProjectileImpactEffect
@Override @Override
public void onEntityImpact(Entity mop, Entity proj) public void onEntityImpact(Entity mop, Entity proj)
{ {
int horizRange = (int) (this.powerUpgrades); int horizRange = this.powerUpgrades;
int vertDepth = (int) (3 * this.potencyUpgrades + 1); int vertDepth = 3 * this.potencyUpgrades + 1;
Vec3 blockVector = SpellHelper.getEntityBlockVector(mop); Vec3 blockVector = SpellHelper.getEntityBlockVector(mop);

View file

@ -18,8 +18,8 @@ public class SelfDefensiveFire extends SelfSpellEffect
@Override @Override
public void onSelfUse(World world, EntityPlayer player) public void onSelfUse(World world, EntityPlayer player)
{ {
int horizRange = (int) (this.powerUpgrades); int horizRange = this.powerUpgrades;
int vertDepth = (int) (3 * this.potencyUpgrades + 1); int vertDepth = 3 * this.potencyUpgrades + 1;
Vec3 blockVector = SpellHelper.getEntityBlockVector(player); Vec3 blockVector = SpellHelper.getEntityBlockVector(player);

View file

@ -7,7 +7,6 @@ import net.minecraft.world.World;
public class MeleeDefaultIce extends ExtrapolatedMeleeEntityEffect public class MeleeDefaultIce extends ExtrapolatedMeleeEntityEffect
{ {
public MeleeDefaultIce(int power, int potency, int cost) public MeleeDefaultIce(int power, int potency, int cost)
{ {
super(power, potency, cost); super(power, potency, cost);

View file

@ -27,9 +27,7 @@ public class MeleeOffensiveIce extends ExtrapolatedMeleeEntityEffect
int posY = (int) (blockVector.yCoord); int posY = (int) (blockVector.yCoord);
int posZ = (int) (blockVector.zCoord); int posZ = (int) (blockVector.zCoord);
double yVel = 1 * (0.3 * this.powerUpgrades + 0.90); entity.motionY = 1 * (0.3 * this.powerUpgrades + 0.90);
entity.motionY = yVel;
for (int i = 0; i < 2; i++) for (int i = 0; i < 2; i++)
{ {

View file

@ -17,15 +17,12 @@ public class ProjectileDefaultIce extends ProjectileImpactEffect
@Override @Override
public void onEntityImpact(Entity mop, Entity proj) public void onEntityImpact(Entity mop, Entity proj)
{ {
return;
} }
@Override @Override
public void onTileImpact(World world, MovingObjectPosition mop) public void onTileImpact(World world, MovingObjectPosition mop)
{ {
int horizRadius = this.powerUpgrades + 1;
int vertRadius = this.potencyUpgrades;
ForgeDirection sideHit = ForgeDirection.getOrientation(mop.sideHit); ForgeDirection sideHit = ForgeDirection.getOrientation(mop.sideHit);
int posX = mop.blockX + sideHit.offsetX; int posX = mop.blockX + sideHit.offsetX;

View file

@ -17,7 +17,7 @@ public class ProjectileDefensiveIce extends ProjectileImpactEffect
@Override @Override
public void onEntityImpact(Entity mop, Entity proj) public void onEntityImpact(Entity mop, Entity proj)
{ {
return;
} }
@Override @Override

View file

@ -27,6 +27,6 @@ public class ProjectileOffensiveIce extends ProjectileImpactEffect
@Override @Override
public void onTileImpact(World world, MovingObjectPosition mop) public void onTileImpact(World world, MovingObjectPosition mop)
{ {
return;
} }
} }

View file

@ -1,13 +1,11 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice; package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ice;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.LeftClickEffect; import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.tool.LeftClickEffect;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect; import net.minecraft.potion.PotionEffect;
public class ToolDefaultIce extends LeftClickEffect public class ToolDefaultIce extends LeftClickEffect
{ {
public ToolDefaultIce(int power, int potency, int cost) public ToolDefaultIce(int power, int potency, int cost)
@ -15,16 +13,13 @@ public class ToolDefaultIce extends LeftClickEffect
super(power, potency, cost); super(power, potency, cost);
} }
@Override @Override
public int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder) public int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder)
{ {
int duration = 200; int duration = 200;
attacked.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, duration, this.powerUpgrades)); attacked.addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, duration, this.powerUpgrades));
return 0; return 0;
} }
} }

View file

@ -37,7 +37,6 @@ public class DigAreaEffect implements IDigAreaEffect
int x = blockPos.blockX; int x = blockPos.blockX;
int y = blockPos.blockY; int y = blockPos.blockY;
int z = blockPos.blockZ; int z = blockPos.blockZ;
ForgeDirection sidehit = ForgeDirection.getOrientation(blockPos.sideHit);
for (int xPos = x - 1; xPos <= x + 1; xPos++) for (int xPos = x - 1; xPos <= x + 1; xPos++)
{ {
@ -82,13 +81,11 @@ public class DigAreaEffect implements IDigAreaEffect
isEffective = true; isEffective = true;
} }
if (localBlock.getMaterial().isToolNotRequired()) if (localBlock.getMaterial().isToolNotRequired())
{ {
isEffective = true; isEffective = true;
} }
if (!player.capabilities.isCreativeMode) if (!player.capabilities.isCreativeMode)
{ {
if (isEffective) if (isEffective)

View file

@ -29,7 +29,7 @@ public class MeleeEnvironmentalWind extends MeleeSpellCenteredWorldEffect
if (entity instanceof EntityItem) if (entity instanceof EntityItem)
{ {
((EntityItem) entity).delayBeforeCanPickup = 0; ((EntityItem) entity).delayBeforeCanPickup = 0;
entity.onCollideWithPlayer((EntityPlayer) player); entity.onCollideWithPlayer(player);
} }
} }
} }

View file

@ -15,16 +15,13 @@ public class ProjectileDefaultWind extends ProjectileImpactEffect
@Override @Override
public void onEntityImpact(Entity mop, Entity proj) public void onEntityImpact(Entity mop, Entity proj)
{ {
float wantedYVel = (float) ((0.5) * (0.5 * this.potencyUpgrades + 1));
mop.motionX = proj.motionX; mop.motionX = proj.motionX;
mop.motionY = mop.motionY += wantedYVel;
mop.motionZ = proj.motionZ; mop.motionZ = proj.motionZ;
} }
@Override @Override
public void onTileImpact(World world, MovingObjectPosition mop) public void onTileImpact(World world, MovingObjectPosition mop)
{ {
return;
} }
} }

View file

@ -6,7 +6,6 @@ import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.Vec3;
import net.minecraft.world.World; import net.minecraft.world.World;
import java.util.List; import java.util.List;
@ -21,8 +20,6 @@ public class ProjectileEnvironmentalWind extends ProjectileUpdateEffect
@Override @Override
public void onUpdateEffect(Entity projectile) public void onUpdateEffect(Entity projectile)
{ {
Vec3 posVec = SpellHelper.getEntityBlockVector(projectile);
int horizRange = this.powerUpgrades + 1; int horizRange = this.powerUpgrades + 1;
int vertRange = 1 * this.potencyUpgrades + 1; int vertRange = 1 * this.potencyUpgrades + 1;

View file

@ -11,7 +11,6 @@ import WayofTime.alchemicalWizardry.api.spell.ProjectileImpactEffect;
public class ProjectileOffensiveWind extends ProjectileImpactEffect public class ProjectileOffensiveWind extends ProjectileImpactEffect
{ {
public ProjectileOffensiveWind(int power, int potency, int cost) public ProjectileOffensiveWind(int power, int potency, int cost)
{ {
super(power, potency, cost); super(power, potency, cost);
@ -22,13 +21,13 @@ public class ProjectileOffensiveWind extends ProjectileImpactEffect
{ {
if (mop instanceof EntityLivingBase) if (mop instanceof EntityLivingBase)
{ {
((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, (int) (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), this.potencyUpgrades)); ((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), this.potencyUpgrades));
} }
} }
@Override @Override
public void onTileImpact(World world, MovingObjectPosition mop) public void onTileImpact(World world, MovingObjectPosition mop)
{ {
return;
} }
} }

View file

@ -7,7 +7,6 @@ import net.minecraft.util.Vec3;
public class ToolDefensiveWind extends LeftClickEffect public class ToolDefensiveWind extends LeftClickEffect
{ {
public ToolDefensiveWind(int power, int potency, int cost) public ToolDefensiveWind(int power, int potency, int cost)
{ {
super(power, potency, cost); super(power, potency, cost);

View file

@ -22,9 +22,8 @@ public class ToolEnvironmentalWind extends OnBreakBlockEffect
public int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z, ForgeDirection sideBroken) public int onBlockBroken(ItemStack container, World world, EntityPlayer player, Block block, int meta, int x, int y, int z, ForgeDirection sideBroken)
{ {
double vertRange = 0.5 + (this.powerUpgrades * this.powerUpgrades + this.powerUpgrades) / 2; double vertRange = 0.5 + (this.powerUpgrades * this.powerUpgrades + this.powerUpgrades) / 2;
double horizRange = vertRange;
List<EntityItem> itemList = SpellHelper.getItemsInRange(world, x + 0.5f, y + 0.5f, z + 0.5f, horizRange, vertRange); List<EntityItem> itemList = SpellHelper.getItemsInRange(world, x + 0.5f, y + 0.5f, z + 0.5f, vertRange, vertRange);
for (EntityItem entity : itemList) for (EntityItem entity : itemList)
{ {
@ -37,5 +36,4 @@ public class ToolEnvironmentalWind extends OnBreakBlockEffect
return 0; return 0;
} }
} }

View file

@ -16,7 +16,7 @@ public class ToolOffensiveWind extends LeftClickEffect
@Override @Override
public int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder) public int onLeftClickEntity(ItemStack stack, EntityLivingBase attacked, EntityLivingBase weilder)
{ {
attacked.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, (int) (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), this.potencyUpgrades)); attacked.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionHeavyHeart.id, (100 * (2 * this.powerUpgrades + 1) * (1 / (this.potencyUpgrades + 1))), this.potencyUpgrades));
return (int) (100 * (0.5 * this.potencyUpgrades + 1) * (this.powerUpgrades + 1) * Math.pow(0.85, costUpgrades)); return (int) (100 * (0.5 * this.potencyUpgrades + 1) * (this.powerUpgrades + 1) * Math.pow(0.85, costUpgrades));
} }

View file

@ -6,7 +6,6 @@ public class HomSpellComponent
{ {
public HomSpell spell; public HomSpell spell;
public ItemStack item; public ItemStack item;
public int blockID;
public HomSpellComponent(ItemStack item, HomSpell spell) public HomSpellComponent(ItemStack item, HomSpell spell)
{ {

View file

@ -6,11 +6,11 @@ import net.minecraft.world.World;
public interface ISimpleSpell public interface ISimpleSpell
{ {
public abstract ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); ItemStack onOffensiveRangedRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer);
public abstract ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); ItemStack onOffensiveMeleeRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer);
public abstract ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); ItemStack onDefensiveRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer);
public abstract ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer); ItemStack onEnvironmentalRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer);
} }

View file

@ -92,7 +92,7 @@ public class SpellFireBurst extends HomSpell
par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
int d0 = 2; int d0 = 2;
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (par3EntityPlayer.posX + 1), (par3EntityPlayer.posY + 2), (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0);
List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
Iterator iterator = list.iterator(); Iterator iterator = list.iterator();
@ -128,7 +128,6 @@ public class SpellFireBurst extends HomSpell
} }
par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
World worldObj = par2World;
for (int i = -1; i <= 1; i++) for (int i = -1; i <= 1; i++)
{ {
@ -136,11 +135,11 @@ public class SpellFireBurst extends HomSpell
{ {
for (int k = -1; k <= 1; k++) for (int k = -1; k <= 1; k++)
{ {
if (worldObj.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k)) if (par2World.isAirBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k))
{ {
if (worldObj.rand.nextFloat() < 0.8F) if (par2World.rand.nextFloat() < 0.8F)
{ {
worldObj.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k, Blocks.fire); par2World.setBlock((int) par3EntityPlayer.posX + i, (int) par3EntityPlayer.posY + j, (int) par3EntityPlayer.posZ + k, Blocks.fire);
} }
} }
} }

View file

@ -168,9 +168,6 @@ public class SpellFrozenWater extends HomSpell
} }
int radius = 3; int radius = 3;
int posX = (int) par3EntityPlayer.posX;
int posY = (int) par3EntityPlayer.posY;
int posZ = (int) par3EntityPlayer.posZ;
for (int i = -radius; i <= radius; i++) for (int i = -radius; i <= radius; i++)
{ {

View file

@ -140,7 +140,7 @@ public class SpellHolyBlast extends HomSpell
} }
int d0 = 3; int d0 = 3;
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (par3EntityPlayer.posX + 1), (par3EntityPlayer.posY + 2), (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0);
List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
Iterator iterator = list.iterator(); Iterator iterator = list.iterator();

View file

@ -4,9 +4,7 @@ import WayofTime.alchemicalWizardry.common.entity.projectile.TeleportProjectile;
import WayofTime.alchemicalWizardry.common.items.EnergyItems; import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper; import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntityEnderman;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -45,7 +43,6 @@ public class SpellTeleport extends HomSpell
par2World.spawnEntityInWorld(new TeleportProjectile(par2World, par3EntityPlayer, 8, true)); par2World.spawnEntityInWorld(new TeleportProjectile(par2World, par3EntityPlayer, 8, true));
par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
EntityEnderman g;
return par1ItemStack; return par1ItemStack;
} }
@ -108,7 +105,7 @@ public class SpellTeleport extends HomSpell
if (!par2World.isRemote) if (!par2World.isRemote)
{ {
int d0 = 3; int d0 = 3;
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (par3EntityPlayer.posX + 1), (par3EntityPlayer.posY + 2), (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0);
List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
Iterator iterator = list.iterator(); Iterator iterator = list.iterator();
@ -146,14 +143,14 @@ public class SpellTeleport extends HomSpell
double z = entityLiving.posZ; double z = entityLiving.posZ;
Random rand = new Random(); Random rand = new Random();
double d0 = x + (rand.nextDouble() - 0.5D) * distance; double d0 = x + (rand.nextDouble() - 0.5D) * distance;
double d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2); double d1 = y + (rand.nextInt((int) distance) - (distance) / 2);
double d2 = z + (rand.nextDouble() - 0.5D) * distance; double d2 = z + (rand.nextDouble() - 0.5D) * distance;
int i = 0; int i = 0;
while (!SpellTeleport.teleportTo(entityLiving, d0, d1, d2, x, y, z) && i < 100) while (!SpellTeleport.teleportTo(entityLiving, d0, d1, d2, x, y, z) && i < 100)
{ {
d0 = x + (rand.nextDouble() - 0.5D) * distance; d0 = x + (rand.nextDouble() - 0.5D) * distance;
d1 = y + (double) (rand.nextInt((int) distance) - (distance) / 2); d1 = y + (rand.nextInt((int) distance) - (distance) / 2);
d2 = z + (rand.nextDouble() - 0.5D) * distance; d2 = z + (rand.nextDouble() - 0.5D) * distance;
i++; i++;
} }
@ -175,9 +172,6 @@ public class SpellTeleport extends HomSpell
return false; return false;
} }
double d3 = lastX;
double d4 = lastY;
double d5 = lastZ;
SpellTeleport.moveEntityViaTeleport(entityLiving, event.targetX, event.targetY, event.targetZ); SpellTeleport.moveEntityViaTeleport(entityLiving, event.targetX, event.targetY, event.targetZ);
boolean flag = false; boolean flag = false;
int i = MathHelper.floor_double(entityLiving.posX); int i = MathHelper.floor_double(entityLiving.posX);
@ -216,7 +210,7 @@ public class SpellTeleport extends HomSpell
if (!flag) if (!flag)
{ {
SpellTeleport.moveEntityViaTeleport(entityLiving, d3, d4, d5); SpellTeleport.moveEntityViaTeleport(entityLiving, lastX, lastY, lastZ);
return false; return false;
} else } else
{ {
@ -228,9 +222,9 @@ public class SpellTeleport extends HomSpell
float f = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; float f = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F;
float f1 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; float f1 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F;
float f2 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F; float f2 = (entityLiving.worldObj.rand.nextFloat() - 0.5F) * 0.2F;
double d7 = d3 + (entityLiving.posX - d3) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; double d7 = lastX + (entityLiving.posX - lastX) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D;
double d8 = d4 + (entityLiving.posY - d4) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height; double d8 = lastY + (entityLiving.posY - lastY) * d6 + entityLiving.worldObj.rand.nextDouble() * (double) entityLiving.height;
double d9 = d5 + (entityLiving.posZ - d5) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D; double d9 = lastZ + (entityLiving.posZ - lastZ) * d6 + (entityLiving.worldObj.rand.nextDouble() - 0.5D) * (double) entityLiving.width * 2.0D;
entityLiving.worldObj.spawnParticle("portal", d7, d8, d9, (double) f, (double) f1, (double) f2); entityLiving.worldObj.spawnParticle("portal", d7, d8, d9, (double) f, (double) f1, (double) f2);
} }
return true; return true;
@ -252,7 +246,7 @@ public class SpellTeleport extends HomSpell
{ {
if (entityLiving.isRiding()) if (entityLiving.isRiding())
{ {
entityLiving.mountEntity((Entity) null); entityLiving.mountEntity(null);
} }
entityLiving.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ); entityLiving.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ);
} }

View file

@ -86,7 +86,7 @@ public class SpellWateryGrave extends HomSpell
} }
int d0 = 3; int d0 = 3;
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (par3EntityPlayer.posX + 1), (par3EntityPlayer.posY + 2), (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0);
List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
Iterator iterator = list.iterator(); Iterator iterator = list.iterator();

View file

@ -106,8 +106,7 @@ public class SpellWindGust extends HomSpell
{ {
EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy()); EnergyItems.syphonAndDamageWhileInContainer(par1ItemStack, par3EntityPlayer, this.getDefensiveEnergy());
} }
int distance = 3;
double yaw = par3EntityPlayer.rotationYaw / 180 * Math.PI; double yaw = par3EntityPlayer.rotationYaw / 180 * Math.PI;
double pitch = par3EntityPlayer.rotationPitch / 180 * Math.PI; double pitch = par3EntityPlayer.rotationPitch / 180 * Math.PI;
double wantedVelocity = 5; double wantedVelocity = 5;
@ -147,7 +146,7 @@ public class SpellWindGust extends HomSpell
} }
int d0 = 3; int d0 = 3;
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox((double) par3EntityPlayer.posX, (double) par3EntityPlayer.posY, (double) par3EntityPlayer.posZ, (double) (par3EntityPlayer.posX + 1), (double) (par3EntityPlayer.posY + 2), (double) (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0); AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, (par3EntityPlayer.posX + 1), (par3EntityPlayer.posY + 2), (par3EntityPlayer.posZ + 1)).expand(d0, d0, d0);
List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb); List list = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityLivingBase.class, axisalignedbb);
Iterator iterator = list.iterator(); Iterator iterator = list.iterator();
double xCoord = par3EntityPlayer.posX; double xCoord = par3EntityPlayer.posX;

View file

@ -25,9 +25,6 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
protected int bufferTransferRate = 20; protected int bufferTransferRate = 20;
private int lpPerTick = 10;
private int ticksPerReagent = 200;
public int progress; public int progress;
public TEAlchemicCalcinator() public TEAlchemicCalcinator()
@ -54,7 +51,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
for (int i = 0; i < tagList.tagCount(); i++) for (int i = 0; i < tagList.tagCount(); i++)
{ {
NBTTagCompound savedTag = (NBTTagCompound) tagList.getCompoundTagAt(i); NBTTagCompound savedTag = tagList.getCompoundTagAt(i);
if (savedTag.getBoolean("Empty")) if (savedTag.getBoolean("Empty"))
{ {
@ -83,7 +80,6 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
for (int i = 0; i < inv.length; i++) for (int i = 0; i < inv.length; i++)
{ {
ItemStack stack = inv[i];
NBTTagCompound savedTag = new NBTTagCompound(); NBTTagCompound savedTag = new NBTTagCompound();
if (inv[i] != null) if (inv[i] != null)
@ -126,6 +122,8 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
public void tickProgress() public void tickProgress()
{ {
int lpPerTick = 10;
int ticksPerReagent = 200;
ItemStack reagentItemStack = this.getStackInSlot(1); ItemStack reagentItemStack = this.getStackInSlot(1);
if (reagentItemStack == null) if (reagentItemStack == null)
{ {
@ -163,7 +161,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord);
} }
if (progress >= this.ticksPerReagent) if (progress >= ticksPerReagent)
{ {
progress = 0; progress = 0;
this.bufferTank.fill(possibleReagent, true); this.bufferTank.fill(possibleReagent, true);
@ -198,7 +196,7 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
for (int i = 0; i < invTagList.tagCount(); i++) for (int i = 0; i < invTagList.tagCount(); i++)
{ {
NBTTagCompound savedTag = (NBTTagCompound) invTagList.getCompoundTagAt(i); NBTTagCompound savedTag = invTagList.getCompoundTagAt(i);
if (savedTag.getBoolean("Empty")) if (savedTag.getBoolean("Empty"))
{ {
@ -233,7 +231,6 @@ public class TEAlchemicCalcinator extends TEReagentConduit implements IInventory
for (int i = 0; i < inv.length; i++) for (int i = 0; i < inv.length; i++)
{ {
ItemStack stack = inv[i];
NBTTagCompound savedTag = new NBTTagCompound(); NBTTagCompound savedTag = new NBTTagCompound();
if (inv[i] != null) if (inv[i] != null)

View file

@ -497,7 +497,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
ReagentStack remainingStack = resource.copy(); ReagentStack remainingStack = resource.copy();
remainingStack.amount = maxFill - totalFill; remainingStack.amount = maxFill - totalFill;
boolean doesReagentMatch = tanks[i].getReagent() == null ? false : tanks[i].getReagent().isReagentEqual(remainingStack); boolean doesReagentMatch = tanks[i].getReagent() != null && tanks[i].getReagent().isReagentEqual(remainingStack);
if (doesReagentMatch) if (doesReagentMatch)
{ {
@ -650,7 +650,7 @@ public class TEMasterStone extends TileEntity implements IMasterRitualStone
return; return;
} }
this.attunedTankMap.put(reagent, new Integer(total)); this.attunedTankMap.put(reagent, total);
} }
@Override @Override

View file

@ -55,7 +55,7 @@ public class TEMimicBlock extends TileEntity
for (int i = 0; i < tagList.tagCount(); i++) for (int i = 0; i < tagList.tagCount(); i++)
{ {
NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i); NBTTagCompound tag = tagList.getCompoundTagAt(i);
int slot = tag.getByte("Slot"); int slot = tag.getByte("Slot");
if (slot >= 0 && slot < inv.length) if (slot >= 0 && slot < inv.length)
@ -76,8 +76,6 @@ public class TEMimicBlock extends TileEntity
for (int i = 0; i < inv.length; i++) for (int i = 0; i < inv.length; i++)
{ {
ItemStack stack = inv[i];
if (inv[i] != null) if (inv[i] != null)
{ {
NBTTagCompound tag = new NBTTagCompound(); NBTTagCompound tag = new NBTTagCompound();
@ -194,8 +192,7 @@ public class TEMimicBlock extends TileEntity
{ {
if (item.getItem() instanceof ItemBlock) if (item.getItem() instanceof ItemBlock)
{ {
Block block = ((ItemBlock) item.getItem()).field_150939_a; return ((ItemBlock) item.getItem()).field_150939_a;
return block;
} }
} }
return null; return null;

View file

@ -5,7 +5,6 @@ import java.util.List;
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler; import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;

View file

@ -1,7 +1,6 @@
package WayofTime.alchemicalWizardry.common.tileEntity.gui; package WayofTime.alchemicalWizardry.common.tileEntity.gui;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World; import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.items.sigil.holding.ContainerHolding; import WayofTime.alchemicalWizardry.common.items.sigil.holding.ContainerHolding;
@ -52,8 +51,6 @@ public class GuiHandler implements IGuiHandler
{ {
TileEntity tileEntity; TileEntity tileEntity;
ItemStack held = player.getHeldItem();
switch (id) switch (id)
{ {
case 0: case 0:

View file

@ -2,7 +2,6 @@ package WayofTime.alchemicalWizardry.common.tileEntity.gui;
import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.TETeleposer;
import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer; import WayofTime.alchemicalWizardry.common.tileEntity.container.ContainerTeleposer;
import net.minecraft.client.gui.inventory.GuiBrewingStand;
import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;

View file

@ -516,7 +516,6 @@ achievement.alchemicalwizardry:demons.desc=Kill a Demon
achievement.alchemicalwizardry:trancsendentOrb=OVERPOWERED achievement.alchemicalwizardry:trancsendentOrb=OVERPOWERED
achievement.alchemicalwizardry:trancsendentOrb.desc=Pickup a Transcendent Blood Orb achievement.alchemicalwizardry:trancsendentOrb.desc=Pickup a Transcendent Blood Orb
#G-API Downloading #G-API Downloading
bm.versioning.getGAPI=["[BM] You don't have Guide-API installed! Install it to get it to unlock the book! [",{"text":"Download","color":"red","hoverEvent":{"action":"show_text","value":{"text":"Click this to auto-magically download the latest version","color":"red"}},"clickEvent":{"action":"run_command","value":"/bloodmagic-download-g-api"}},"]"] bm.versioning.getGAPI=["[BM] You don't have Guide-API installed! Install it to get it to unlock the book! [",{"text":"Download","color":"red","hoverEvent":{"action":"show_text","value":{"text":"Click this to auto-magically download the latest version","color":"red"}},"clickEvent":{"action":"run_command","value":"/bloodmagic-download-g-api"}},"]"]
bm.versioning.startingDownload=[{"text":"Starting download of %s Please do not remove your hard disk.", "color":"orange"}] bm.versioning.startingDownload=[{"text":"Starting download of %s Please do not remove your hard disk.", "color":"orange"}]