Search in sources :

Example 1 with ParticleExpandingCollapsingRingAtPoint

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

the class Recall 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, "arcane", x, y - 1, z);
        if (particle != null) {
            particle.addRandomOffset(1, 0, 1);
            particle.AddParticleController(new ParticleExpandingCollapsingRingAtPoint(particle, x, y - 1, z, 0.1, 3, 0.3, 1, false).setCollapseOnce());
            particle.setMaxAge(20);
            particle.setParticleScale(0.2f);
            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) ParticleExpandingCollapsingRingAtPoint(am2.particles.ParticleExpandingCollapsingRingAtPoint) ParticleExpandingCollapsingRingAtPoint(am2.particles.ParticleExpandingCollapsingRingAtPoint)

Example 2 with ParticleExpandingCollapsingRingAtPoint

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

the class BlockDesertNova method randomDisplayTick.

@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(World world, int x, int y, int z, Random par5Random) {
    if (par5Random.nextInt(10) != 0)
        return;
    int increment = AMCore.config.getGFXLevel() * 15;
    if (increment <= 0)
        return;
    for (int i = 0; i < 360; i += increment) {
        int angle = i;
        double posX = x + 0.5 + Math.cos(angle) * 3;
        double posZ = z + 0.5 + Math.sin(angle) * 3;
        double posY = y + 0.6 + par5Random.nextFloat() * 0.2f;
        AMParticle effect = (AMParticle) AMCore.instance.proxy.particleManager.spawn(world, "explosion_2", x + 0.5, posY, z + 0.5);
        if (effect != null) {
            effect.setIgnoreMaxAge(true);
            effect.AddParticleController(new ParticleExpandingCollapsingRingAtPoint(effect, posX, posY, posZ, 0.3, 3, 0.2, 1, false).setExpanding());
            //effect.AddParticleController(new ParticleOrbitPoint(effect, x+0.5, y, z+0.5, 1, false).SetTargetDistance(0.35f + par5Random.nextFloat() * 0.2f).SetOrbitSpeed(0.5f).setIgnoreYCoordinate(true));
            //effect.AddParticleController(new ParticleFloatUpward(effect, 0, 0.035f, 1, false));
            effect.AddParticleController(new ParticleFadeOut(effect, 2, false).setFadeSpeed(0.05f).setKillParticleOnFinish(true));
            effect.setParticleScale(0.05f);
        }
    }
}
Also used : AMParticle(am2.particles.AMParticle) ParticleExpandingCollapsingRingAtPoint(am2.particles.ParticleExpandingCollapsingRingAtPoint) ParticleFadeOut(am2.particles.ParticleFadeOut) ParticleExpandingCollapsingRingAtPoint(am2.particles.ParticleExpandingCollapsingRingAtPoint) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

AMParticle (am2.particles.AMParticle)2 ParticleExpandingCollapsingRingAtPoint (am2.particles.ParticleExpandingCollapsingRingAtPoint)2 ParticleFadeOut (am2.particles.ParticleFadeOut)1 SideOnly (cpw.mods.fml.relauncher.SideOnly)1