Add test cases for new particle effects; to be applied to everything once spells have been reorganised

This commit is contained in:
Electroblob
2018-06-05 21:18:01 +01:00
parent 0341a603d5
commit b9ba25c116
3 changed files with 13 additions and 0 deletions
@@ -43,6 +43,17 @@ public class EntityMagicMissile extends EntityMagicArrow {
@Override
public void onEntityHit(EntityLivingBase entityHit){
this.playSound(SoundEvents.ENTITY_GENERIC_HURT, 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
if(this.world.isRemote) spawnImpactParticles();
}
@Override
public void onBlockHit(){
if(this.world.isRemote) spawnImpactParticles();
}
private void spawnImpactParticles(){
ParticleBuilder.create(Type.FLASH).pos(posX, posY, posZ).colour(0.5f + rand.nextFloat()/2, 0.5f + rand.nextFloat()/2,
0.5f + rand.nextFloat()/2).spawn(world);
}
@Override
@@ -40,6 +40,7 @@ public class Agility extends Spell {
ParticleBuilder.create(Type.SPARKLE).pos(x1, y1, z1).vel(0, 0.1F, 0)
.lifetime(48 + world.rand.nextInt(12)).colour(0.4f, 1.0f, 0.8f).spawn(world);
}
Wizardry.proxy.spawnEntityParticle(world, caster, 15, 0.4f, 1.0f, 0.8f);
}
WizardryUtilities.playSoundAtPlayer(caster, WizardrySounds.SPELL_HEAL, 0.7F,
@@ -38,6 +38,7 @@ public class Heal extends Spell {
Wizardry.proxy.spawnParticle(Type.SPARKLE, world, d0, d1, d2, 0, 0.1F, 0,
48 + world.rand.nextInt(12), 1.0f, 1.0f, 0.3f);
}
Wizardry.proxy.spawnEntityParticle(world, caster, 15, 1.0f, 1.0f, 0.3f);
}
WizardryUtilities.playSoundAtPlayer(caster, WizardrySounds.SPELL_HEAL, 0.7F,