use of am2.particles.AMParticle in project ArsMagica2 by Mithion.
the class Flight method spawnParticles.
@Override
public void spawnParticles(World world, double x, double y, double z, EntityLivingBase caster, Entity target, Random rand, int colorModifier) {
for (int i = 0; i < 15; ++i) {
AMParticle particle = (AMParticle) AMCore.proxy.particleManager.spawn(world, rand.nextBoolean() ? "wind" : "ember", x, y, z);
if (particle != null) {
particle.addRandomOffset(1, 0.5, 1);
particle.AddParticleController(new ParticleOrbitEntity(particle, target, 0.2f + rand.nextFloat() * 0.2f, 1, false));
particle.setMaxAge(20);
particle.setParticleScale(0.1f);
if (colorModifier > -1) {
particle.setRGBColorF(((colorModifier >> 16) & 0xFF) / 255.0f, ((colorModifier >> 8) & 0xFF) / 255.0f, (colorModifier & 0xFF) / 255.0f);
}
}
}
}
use of am2.particles.AMParticle in project ArsMagica2 by Mithion.
the class Forge method spawnParticles.
@Override
public void spawnParticles(World world, double x, double y, double z, EntityLivingBase caster, Entity target, Random rand, int colorModifier) {
AMParticle particle = (AMParticle) AMCore.proxy.particleManager.spawn(world, "radiant", x + 0.5, y + 0.5, z + 0.5);
if (particle != null) {
particle.AddParticleController(new ParticleHoldPosition(particle, 20, 1, false));
particle.setMaxAge(20);
particle.setParticleScale(0.3f);
particle.setRGBColorF(0.7f, 0.4f, 0.2f);
particle.SetParticleAlpha(0.1f);
if (colorModifier > -1) {
particle.setRGBColorF(((colorModifier >> 16) & 0xFF) / 255.0f, ((colorModifier >> 8) & 0xFF) / 255.0f, (colorModifier & 0xFF) / 255.0f);
}
}
}
use of am2.particles.AMParticle in project ArsMagica2 by Mithion.
the class PhysicalDamage method spawnParticles.
@Override
public void spawnParticles(World world, double x, double y, double z, EntityLivingBase caster, Entity target, Random rand, int colorModifier) {
for (int i = 0; i < 5; ++i) {
AMParticle particle = (AMParticle) AMCore.proxy.particleManager.spawn(world, "ember", x, y, z);
if (particle != null) {
particle.addRandomOffset(1, 0.5, 1);
particle.addVelocity(rand.nextDouble() * 0.2 - 0.1, rand.nextDouble() * 0.2, rand.nextDouble() * 0.2 - 0.1);
particle.setAffectedByGravity();
particle.setDontRequireControllers();
particle.setMaxAge(5);
particle.setParticleScale(0.1f);
particle.setRGBColorF(0.8f, 0.2f, 0.2f);
if (colorModifier > -1) {
particle.setRGBColorF(((colorModifier >> 16) & 0xFF) / 255.0f, ((colorModifier >> 8) & 0xFF) / 255.0f, (colorModifier & 0xFF) / 255.0f);
}
}
}
}
use of am2.particles.AMParticle in project ArsMagica2 by Mithion.
the class Reflect method spawnParticles.
@Override
public void spawnParticles(World world, double x, double y, double z, EntityLivingBase caster, Entity target, Random rand, int colorModifier) {
for (int i = 0; i < 25; ++i) {
AMParticle particle = (AMParticle) AMCore.proxy.particleManager.spawn(world, "lens_flare", x, y, z);
if (particle != null) {
particle.addRandomOffset(1, 2, 1);
particle.AddParticleController(new ParticleHoldPosition(particle, 20, 1, false));
particle.setMaxAge(20);
particle.setParticleScale(0.2f);
particle.setRGBColorF(0.5f + rand.nextFloat() * 0.5f, 0.1f, 0.5f + rand.nextFloat() * 0.5f);
if (colorModifier > -1) {
particle.setRGBColorF(((colorModifier >> 16) & 0xFF) / 255.0f, ((colorModifier >> 8) & 0xFF) / 255.0f, (colorModifier & 0xFF) / 255.0f);
}
}
}
}
use of am2.particles.AMParticle in project ArsMagica2 by Mithion.
the class LightningDamage method spawnParticles.
@Override
public void spawnParticles(World world, double x, double y, double z, EntityLivingBase caster, Entity target, Random rand, int colorModifier) {
for (int i = 0; i < 5; ++i) {
AMParticle particle = (AMParticle) AMCore.proxy.particleManager.spawn(world, "lightning", x, y, z);
if (particle != null) {
particle.addRandomOffset(1, 0.5, 1);
particle.addVelocity(rand.nextDouble() * 0.2 - 0.1, rand.nextDouble() * 0.2, rand.nextDouble() * 0.2 - 0.1);
particle.setAffectedByGravity();
particle.setDontRequireControllers();
particle.setMaxAge(5);
particle.setParticleScale(0.1f);
if (colorModifier > -1) {
particle.setRGBColorF(((colorModifier >> 16) & 0xFF) / 255.0f, ((colorModifier >> 8) & 0xFF) / 255.0f, (colorModifier & 0xFF) / 255.0f);
}
}
}
}
Aggregations