Spell Work
Need to work on how the EntitySpellProjectile saves its data. Does not work properly. Perhaps it was not registered?
This commit is contained in:
parent
5dcef131dc
commit
112b4e6b53
15 changed files with 314 additions and 92 deletions
|
@ -1,15 +1,27 @@
|
|||
package WayofTime.alchemicalWizardry.common.tileEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatMessageComponent;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigm;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf;
|
||||
|
||||
public class TESpellParadigmBlock extends TESpellBlock
|
||||
{
|
||||
public SpellParadigm getSpellParadigm()
|
||||
{
|
||||
int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
|
||||
switch(meta)
|
||||
{
|
||||
case 0: return new SpellParadigmProjectile();
|
||||
case 1: return new SpellParadigmSelf();
|
||||
case 2: return new SpellParadigmMelee();
|
||||
}
|
||||
return new SpellParadigmSelf();
|
||||
}
|
||||
|
||||
|
@ -28,6 +40,33 @@ public class TESpellParadigmBlock extends TESpellBlock
|
|||
{
|
||||
SpellParadigm parad = this.getSpellParadigm();
|
||||
this.modifySpellParadigm(parad);
|
||||
parad.castSpell(world, entity, spellCasterStack);
|
||||
// if(parad instanceof SpellParadigmSelf)
|
||||
// {
|
||||
// List<String> stringList = parad.effectList;
|
||||
// SpellParadigmSelf spellParadSelf = SpellParadigmSelf.getParadigmForStringArray(stringList);
|
||||
// for(String str : stringList)
|
||||
// {
|
||||
// ChatMessageComponent chat = new ChatMessageComponent();
|
||||
// chat.addText(str);
|
||||
// entity.sendChatToPlayer(chat);
|
||||
// }
|
||||
// spellParadSelf.castSpell(world, entity, spellCasterStack);
|
||||
// }
|
||||
// else if(parad instanceof SpellParadigmProjectile)
|
||||
// {
|
||||
// List<String> stringList = parad.effectList;
|
||||
// SpellParadigmProjectile spellParadSelf = SpellParadigmProjectile.getParadigmForStringArray(stringList);
|
||||
// for(String str : stringList)
|
||||
// {
|
||||
// ChatMessageComponent chat = new ChatMessageComponent();
|
||||
// chat.addText(str);
|
||||
// entity.sendChatToPlayer(chat);
|
||||
// }
|
||||
// spellParadSelf.castSpell(world, entity, spellCasterStack);
|
||||
// }else
|
||||
{
|
||||
parad.castSpell(world, entity, spellCasterStack);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue