Search in sources :

Example 11 with ParticleHoldPosition

use of am2.particles.ParticleHoldPosition 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);
        }
    }
}
Also used : AMParticle(am2.particles.AMParticle) ParticleHoldPosition(am2.particles.ParticleHoldPosition)

Aggregations

ParticleHoldPosition (am2.particles.ParticleHoldPosition)11 AMParticle (am2.particles.AMParticle)10 ParticleColorShift (am2.particles.ParticleColorShift)2 ParticleFloatUpward (am2.particles.ParticleFloatUpward)2 List (java.util.List)2 Block (net.minecraft.block.Block)2 Entity (net.minecraft.entity.Entity)2 AMVector3 (am2.api.math.AMVector3)1 ISpellModifier (am2.api.spell.component.interfaces.ISpellModifier)1 BuffList (am2.buffs.BuffList)1 ParticleChangeSize (am2.particles.ParticleChangeSize)1 ParticleFadeOut (am2.particles.ParticleFadeOut)1 ParticleOrbitPoint (am2.particles.ParticleOrbitPoint)1 Colour (am2.spell.modifiers.Colour)1 SideOnly (cpw.mods.fml.relauncher.SideOnly)1 ArrayList (java.util.ArrayList)1 EntityLivingBase (net.minecraft.entity.EntityLivingBase)1 EntityDragonPart (net.minecraft.entity.boss.EntityDragonPart)1 EntityPlayer (net.minecraft.entity.player.EntityPlayer)1 ItemStack (net.minecraft.item.ItemStack)1