use of am2.particles.ParticleApproachEntity in project ArsMagica2 by Mithion.
the class Entangle 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, "plant", x, y, z);
if (particle != null) {
particle.addRandomOffset(1, 2, 1);
particle.AddParticleController(new ParticleApproachEntity(particle, target, 0.15f, 0.4f, 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);
}
}
}
}
Aggregations