Moving some spell classes, moved BloodUtils API stuff for books into main code
This commit is contained in:
parent
beea2e875a
commit
8c1396421a
169 changed files with 227 additions and 250 deletions
|
@ -0,0 +1,58 @@
|
|||
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 SpellParadigmSelf extends SpellParadigm
|
||||
{
|
||||
public List<ISelfSpellEffect> selfSpellEffectList;
|
||||
|
||||
public SpellParadigmSelf()
|
||||
{
|
||||
selfSpellEffectList = new ArrayList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enhanceParadigm(SpellEnhancement enh)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
public void addSelfSpellEffect(ISelfSpellEffect eff)
|
||||
{
|
||||
if (eff != null)
|
||||
{
|
||||
this.selfSpellEffectList.add(eff);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDefaultCost()
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue