Fixed the projectile so that it actually work
Amazing, eh?
This commit is contained in:
parent
112b4e6b53
commit
eb46185dc8
8 changed files with 93 additions and 113 deletions
|
@ -20,6 +20,7 @@ public abstract class SpellEffect
|
|||
this.modifierState = SpellModifier.DEFAULT;
|
||||
this.powerEnhancement = 0;
|
||||
this.costEnhancement = 0;
|
||||
this.potencyEnhancement = 0;
|
||||
}
|
||||
|
||||
public void enhanceEffect(SpellEnhancement enh)
|
||||
|
@ -176,6 +177,7 @@ public abstract class SpellEffect
|
|||
NBTTagCompound tag = new NBTTagCompound();
|
||||
|
||||
tag.setString("Class", this.getClass().getName());
|
||||
tag.setInteger("modifier", modifierState);
|
||||
tag.setInteger("power", powerEnhancement);
|
||||
tag.setInteger("cost", costEnhancement);
|
||||
tag.setInteger("potency", potencyEnhancement);
|
||||
|
@ -195,6 +197,7 @@ public abstract class SpellEffect
|
|||
{
|
||||
SpellEffect eff = (SpellEffect) obj;
|
||||
|
||||
eff.modifierState = tag.getInteger("modifier");
|
||||
eff.powerEnhancement = tag.getInteger("power");
|
||||
eff.costEnhancement = tag.getInteger("cost");
|
||||
eff.potencyEnhancement = tag.getInteger("potency");
|
||||
|
|
|
@ -3,7 +3,7 @@ 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;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileDefaultFire;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.ProjectileDefaultFire;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfDefaultFire;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfDefensiveFire;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire.SelfEnvironmentalFire;
|
||||
|
@ -22,21 +22,24 @@ public class SpellEffectFire extends SpellEffect
|
|||
public void offensiveModificationProjectile(SpellParadigmProjectile parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addImpactEffect(new ProjectileDefaultFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
parad.damage+=this.potencyEnhancement;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void defensiveModificationProjectile(SpellParadigmProjectile parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addImpactEffect(new ProjectileDefaultFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
parad.damage+=this.potencyEnhancement;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void environmentalModificationProjectile(SpellParadigmProjectile parad)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
parad.addImpactEffect(new ProjectileDefaultFire(this.powerEnhancement,this.potencyEnhancement,this.costEnhancement));
|
||||
parad.damage+=this.potencyEnhancement;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects;
|
||||
package WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.fire;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.impactEffects.ProjectileImpactEffect;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
|
@ -24,10 +25,20 @@ public class ProjectileDefaultFire extends ProjectileImpactEffect
|
|||
int x = mop.blockX;
|
||||
int y = mop.blockY;
|
||||
int z = mop.blockZ;
|
||||
|
||||
if(world.isAirBlock(x, y+1, z))
|
||||
int range = 0;
|
||||
for(int i=-range; i<=range;i++)
|
||||
{
|
||||
world.setBlock(x, y+1, z, Block.fire.blockID);
|
||||
for(int j=-range; j<=range;j++)
|
||||
{
|
||||
for(int k=-range; k<=range; k++)
|
||||
{
|
||||
if(world.isAirBlock(x+i, y+j, z+k))
|
||||
{
|
||||
world.setBlock(x+i, y+j, z+k, Block.fire.blockID);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue