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