Moving some spell classes, moved BloodUtils API stuff for books into main code

This commit is contained in:
WayofTime 2014-11-13 08:42:49 -05:00
parent beea2e875a
commit 8c1396421a
169 changed files with 227 additions and 250 deletions

View file

@ -0,0 +1,70 @@
package WayofTime.alchemicalWizardry.api.spell;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import java.util.ArrayList;
import java.util.List;
public class SpellParadigmMelee extends SpellParadigm
{
private List<IMeleeSpellEntityEffect> entityEffectList;
private List<IMeleeSpellWorldEffect> worldEffectList;
public SpellParadigmMelee()
{
this.entityEffectList = new ArrayList();
this.worldEffectList = new ArrayList();
}
@Override
public void enhanceParadigm(SpellEnhancement enh)
{
}
@Override
public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack)
{
int cost = this.getTotalCost();
if(!EnergyItems.syphonBatteries(itemStack, entityPlayer, cost))
{
return;
}
for (IMeleeSpellEntityEffect effect : entityEffectList)
{
effect.onEntityImpact(world, entityPlayer);
}
for (IMeleeSpellWorldEffect effect : worldEffectList)
{
effect.onWorldEffect(world, entityPlayer);
}
}
public void addEntityEffect(IMeleeSpellEntityEffect eff)
{
if (eff != null)
{
this.entityEffectList.add(eff);
}
}
public void addWorldEffect(IMeleeSpellWorldEffect eff)
{
if (eff != null)
{
this.worldEffectList.add(eff);
}
}
@Override
public int getDefaultCost()
{
return 0;
}
}