use of am2.particles.AMParticle in project ArsMagica2 by Mithion.
the class BuffList method addParticleToBuff.
public static boolean addParticleToBuff(AMParticle particle, EntityLiving ent, int priority, boolean exclusive, int buffID) {
if (particlesForBuffID.get(buffID) >= maxParticlesPerBuff) {
return false;
}
int count = particlesForBuffID.get(buffID);
count++;
particlesForBuffID.put(buffID, count);
particle.AddParticleController(new ParticleLiveForBuffDuration(particle, ent, buffID, priority, exclusive));
return true;
}
use of am2.particles.AMParticle in project ArsMagica2 by Mithion.
the class Absorption 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, "sparkle", x, y - 1, z);
if (particle != null) {
particle.addRandomOffset(1, 1, 1);
particle.AddParticleController(new ParticleFloatUpward(particle, 0, 0.1f, 1, false));
particle.AddParticleController(new ParticleOrbitEntity(particle, target, 0.5f, 2, false).setIgnoreYCoordinate(true).SetTargetDistance(0.3f + rand.nextDouble() * 0.3));
particle.setMaxAge(20);
particle.setParticleScale(0.2f);
particle.setRGBColorF(0f, 0.5f, 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 Appropriation 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 + 5 * AMCore.config.getGFXLevel(); ++i) {
AMParticle particle = (AMParticle) AMCore.proxy.particleManager.spawn(world, "water_ball", x, y, z);
if (particle != null) {
particle.addRandomOffset(1, 1, 1);
particle.setMaxAge(10);
particle.setParticleScale(0.1f);
particle.AddParticleController(new ParticleOrbitPoint(particle, x, y, z, 1, false).SetTargetDistance(world.rand.nextDouble() + 0.1f).SetOrbitSpeed(0.2f));
}
}
}
use of am2.particles.AMParticle in project ArsMagica2 by Mithion.
the class Attract method spawnParticles.
@Override
public void spawnParticles(World world, double x, double y, double z, EntityLivingBase caster, Entity target, Random rand, int colorModifier) {
AMParticle effect = (AMParticle) AMCore.instance.proxy.particleManager.spawn(world, "arcane", x, y, z);
if (effect != null) {
effect.addRandomOffset(1, 1, 1);
effect.AddParticleController(new ParticleApproachPoint(effect, x, y, z, 0.025f, 0.025f, 1, false));
effect.setRGBColorF(0.8f, 0.3f, 0.7f);
if (colorModifier > -1) {
effect.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 BanishRain 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, "water_ball", x, y, z);
if (particle != null) {
particle.addRandomOffset(5, 4, 5);
particle.AddParticleController(new ParticleFloatUpward(particle, 0f, 0.5f, 1, false));
particle.setMaxAge(25 + rand.nextInt(10));
if (colorModifier > -1) {
particle.setRGBColorF(((colorModifier >> 16) & 0xFF) / 255.0f, ((colorModifier >> 8) & 0xFF) / 255.0f, (colorModifier & 0xFF) / 255.0f);
}
}
}
}
Aggregations