Started work on Fire spell effects

This commit is contained in:
WayofTime 2014-01-18 21:03:14 -05:00
parent e116b021c9
commit 0a023c6a0b
12 changed files with 263 additions and 15 deletions

View file

@ -0,0 +1,177 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmMelee;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmProjectile;
import WayofTime.alchemicalWizardry.common.spell.complex.SpellParadigmSelf;
public class SpellEffectFire extends SpellEffect
{
@Override
public void defaultModificationProjectile(SpellParadigmProjectile parad)
{
}
@Override
public void offensiveModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
}
@Override
public void defensiveModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
}
@Override
public void environmentalModificationProjectile(SpellParadigmProjectile parad)
{
// TODO Auto-generated method stub
}
@Override
public void defaultModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
}
@Override
public void offensiveModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
}
@Override
public void defensiveModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
}
@Override
public void environmentalModificationSelf(SpellParadigmSelf parad)
{
// TODO Auto-generated method stub
}
@Override
public void defaultModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
}
@Override
public void offensiveModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
}
@Override
public void defensiveModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
}
@Override
public void environmentalModificationMelee(SpellParadigmMelee parad)
{
// TODO Auto-generated method stub
}
@Override
protected int getCostForDefaultProjectile()
{
// TODO Auto-generated method stub
return 0;
}
@Override
protected int getCostForOffenseProjectile()
{
// TODO Auto-generated method stub
return 0;
}
@Override
protected int getCostForDefenseProjectile()
{
// TODO Auto-generated method stub
return 0;
}
@Override
protected int getCostForEnvironmentProjectile()
{
// TODO Auto-generated method stub
return 0;
}
@Override
protected int getCostForDefaultSelf()
{
// TODO Auto-generated method stub
return 0;
}
@Override
protected int getCostForOffenseSelf()
{
// TODO Auto-generated method stub
return 0;
}
@Override
protected int getCostForDefenseSelf()
{
// TODO Auto-generated method stub
return 0;
}
@Override
protected int getCostForEnvironmentSelf()
{
// TODO Auto-generated method stub
return 0;
}
@Override
protected int getCostForDefaultMelee()
{
// TODO Auto-generated method stub
return 0;
}
@Override
protected int getCostForOffenseMelee()
{
// TODO Auto-generated method stub
return 0;
}
@Override
protected int getCostForDefenseMelee()
{
// TODO Auto-generated method stub
return 0;
}
@Override
protected int getCostForEnvironmentMelee()
{
// TODO Auto-generated method stub
return 0;
}
}

View file

@ -0,0 +1,53 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects;
import java.util.List;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public abstract class ExtrapolatedMeleeEntityEffect implements IMeleeSpellEntityEffect
{
protected float range;
protected float radius;
public ExtrapolatedMeleeEntityEffect(int range, int radius)
{
this.range = range;
this.radius = radius;
}
@Override
public void onEntityImpact(World world, EntityPlayer entityPlayer)
{
Vec3 lookVec = entityPlayer.getLook(range);
double x = entityPlayer.posX + lookVec.xCoord;
double y = entityPlayer.posY + entityPlayer.getEyeHeight() + lookVec.yCoord;
double z = entityPlayer.posZ + lookVec.zCoord;
List<Entity> entities = world.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(x-0.5f, y-0.5f, z-0.5f, x + 0.5f, y + 0.5f, z + 0.5f).expand(radius, radius, radius));
if(entities!=null)
{
for(Entity entity : entities)
{
this.entityEffect(world, entity);
}
}
}
protected abstract void entityEffect(World world, Entity entity);
public void setRange(float range)
{
this.range = range;
}
public void setRadius(float radius)
{
this.radius = radius;
}
}

View file

@ -0,0 +1,9 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
public interface IMeleeSpellEntityEffect
{
public void onEntityImpact(World world, EntityPlayer entityPlayer);
}

View file

@ -0,0 +1,10 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public interface IMeleeSpellWorldEffect
{
public void onWorldEffect(World world, EntityPlayer entityPlayer);
}

View file

@ -0,0 +1,10 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects;
import net.minecraft.entity.Entity;
import net.minecraft.util.MovingObjectPosition;
public interface IProjectileImpactEffect
{
public void onEntityImpact(Entity mop);
public void onTileImpact(MovingObjectPosition mop);
}

View file

@ -0,0 +1,8 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects;
import net.minecraft.entity.Entity;
public interface IProjectileUpdateEffect
{
public void onUpdateEffect(Entity projectile);
}

View file

@ -0,0 +1,9 @@
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
public interface ISelfSpellEffect
{
public void onSelfUse(World world, EntityPlayer player);
}