More code, testing things
This commit is contained in:
parent
9713fdb042
commit
276504acbd
8 changed files with 106 additions and 11 deletions
|
@ -1,5 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.enhancement.SpellEnhancement;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -7,6 +11,13 @@ import net.minecraft.world.World;
|
|||
|
||||
public class SpellParadigmSelf extends SpellParadigm
|
||||
{
|
||||
public List<ISelfSpellEffect> selfSpellEffectList;
|
||||
|
||||
public SpellParadigmSelf()
|
||||
{
|
||||
selfSpellEffectList = new ArrayList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enhanceParadigm(SpellEnhancement enh)
|
||||
{
|
||||
|
@ -16,14 +27,27 @@ public class SpellParadigmSelf extends SpellParadigm
|
|||
@Override
|
||||
public void castSpell(World world, EntityPlayer entityPlayer, ItemStack itemStack)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
for(ISelfSpellEffect eff : selfSpellEffectList)
|
||||
{
|
||||
eff.onSelfUse(world, entityPlayer);
|
||||
}
|
||||
|
||||
int cost = this.getTotalCost();
|
||||
|
||||
EnergyItems.syphonBatteries(itemStack, entityPlayer, cost);
|
||||
}
|
||||
|
||||
public void addSelfSpellEffect(ISelfSpellEffect eff)
|
||||
{
|
||||
if(eff!=null)
|
||||
{
|
||||
this.selfSpellEffectList.add(eff);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDefaultCost()
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue