Search in sources :

Example 6 with ParticleOrbitEntity

use of am2.particles.ParticleOrbitEntity in project ArsMagica2 by Mithion.

the class Storm 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, "symbols", x, y - 1, z);
    if (particle != null) {
        particle.AddParticleController(new ParticleOrbitEntity(particle, target, 0.2f, 2, false).SetTargetDistance(1));
        particle.setMaxAge(40);
        particle.setParticleScale(0.1f);
        if (colorModifier > -1) {
            particle.setRGBColorF(((colorModifier >> 16) & 0xFF) / 255.0f, ((colorModifier >> 8) & 0xFF) / 255.0f, (colorModifier & 0xFF) / 255.0f);
        }
    }
}
Also used : AMParticle(am2.particles.AMParticle) ParticleOrbitEntity(am2.particles.ParticleOrbitEntity)

Example 7 with ParticleOrbitEntity

use of am2.particles.ParticleOrbitEntity in project ArsMagica2 by Mithion.

the class Regeneration 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(0.1f, 1f, 0.8f);
            if (colorModifier > -1) {
                particle.setRGBColorF(((colorModifier >> 16) & 0xFF) / 255.0f, ((colorModifier >> 8) & 0xFF) / 255.0f, (colorModifier & 0xFF) / 255.0f);
            }
        }
    }
}
Also used : AMParticle(am2.particles.AMParticle) ParticleOrbitEntity(am2.particles.ParticleOrbitEntity) ParticleFloatUpward(am2.particles.ParticleFloatUpward)

Example 8 with ParticleOrbitEntity

use of am2.particles.ParticleOrbitEntity in project ArsMagica2 by Mithion.

the class Fury 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 * AMCore.config.getGFXLevel(); ++i) {
        AMParticle particle = (AMParticle) AMCore.proxy.particleManager.spawn(world, "pulse", x, y, z);
        if (particle != null) {
            particle.addRandomOffset(1, 1, 1);
            particle.setRGBColorF(1, 0, 0);
            particle.AddParticleController(new ParticleOrbitEntity(particle, target, 0.15f, 1, false).SetTargetDistance(world.rand.nextDouble() + 1f).setIgnoreYCoordinate(true));
            particle.AddParticleController(new ParticleFloatUpward(particle, 0, 0.1f, 1, false));
            particle.setMaxAge(10);
        }
    }
}
Also used : AMParticle(am2.particles.AMParticle) ParticleOrbitEntity(am2.particles.ParticleOrbitEntity) ParticleFloatUpward(am2.particles.ParticleFloatUpward)

Example 9 with ParticleOrbitEntity

use of am2.particles.ParticleOrbitEntity in project ArsMagica2 by Mithion.

the class TrueSight 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 ParticleOrbitEntity(particle, target, 0.1f, 2, false).setOrbitY(0.5).SetTargetDistance(1f));
            particle.setMaxAge(40);
            particle.setParticleScale(0.2f);
            if (rand.nextBoolean())
                particle.setRGBColorF(0.7f, 0.1f, 0.7f);
            if (colorModifier > -1) {
                particle.setRGBColorF(((colorModifier >> 16) & 0xFF) / 255.0f, ((colorModifier >> 8) & 0xFF) / 255.0f, (colorModifier & 0xFF) / 255.0f);
            }
        }
    }
}
Also used : AMParticle(am2.particles.AMParticle) ParticleOrbitEntity(am2.particles.ParticleOrbitEntity)

Example 10 with ParticleOrbitEntity

use of am2.particles.ParticleOrbitEntity in project ArsMagica2 by Mithion.

the class DivineIntervention 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 < 100; ++i) {
        AMParticle particle = (AMParticle) AMCore.proxy.particleManager.spawn(world, "arcane", x, y - 1, z);
        if (particle != null) {
            particle.addRandomOffset(1, 1, 1);
            if (rand.nextBoolean())
                particle.AddParticleController(new ParticleOrbitEntity(particle, target, 0.1f, 1, false).SetTargetDistance(rand.nextDouble() + 0.5));
            else
                particle.AddParticleController(new ParticleOrbitPoint(particle, x, y, z, 1, false).SetOrbitSpeed(0.1f).SetTargetDistance(rand.nextDouble() + 0.5));
            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);
            }
        }
    }
}
Also used : AMParticle(am2.particles.AMParticle) ParticleOrbitEntity(am2.particles.ParticleOrbitEntity) ParticleOrbitPoint(am2.particles.ParticleOrbitPoint) ParticleOrbitPoint(am2.particles.ParticleOrbitPoint)

Aggregations

AMParticle (am2.particles.AMParticle)19 ParticleOrbitEntity (am2.particles.ParticleOrbitEntity)19 ParticleFloatUpward (am2.particles.ParticleFloatUpward)7 ParticleFadeOut (am2.particles.ParticleFadeOut)1 ParticleOrbitPoint (am2.particles.ParticleOrbitPoint)1 ExtendedProperties (am2.playerextensions.ExtendedProperties)1 EntityPlayer (net.minecraft.entity.player.EntityPlayer)1 World (net.minecraft.world.World)1