More work on the implementation of events

This commit is contained in:
WayofTime 2014-11-07 13:45:02 -05:00
parent dd3a093825
commit 39b4243a82
27 changed files with 217 additions and 259 deletions
src/main/java/WayofTime/alchemicalWizardry/common/spell/complex

View file

@ -29,15 +29,18 @@ public class SpellParadigmSelf extends SpellParadigm
public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack)
{
this.applyAllSpellEffects();
int cost = this.getTotalCost();
if(!EnergyItems.syphonBatteries(itemStack, entityPlayer, cost))
{
return;
}
for (ISelfSpellEffect eff : selfSpellEffectList)
{
eff.onSelfUse(world, entityPlayer);
}
int cost = this.getTotalCost();
EnergyItems.syphonBatteries(itemStack, entityPlayer, cost);
}
public void addSelfSpellEffect(ISelfSpellEffect eff)