use of am2.particles.ParticleFloatUpward in project ArsMagica2 by Mithion.
the class BlockInlay method randomDisplayTick.
@Override
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
int meta = world.getBlockMetadata(x, y, z);
if (world.isRemote && world.getBlock(x, y - 1, z).isAir(world, x, y, z) && AMCore.config.FullGFX() && rand.nextInt(10) < 4) {
AMParticle particle = (AMParticle) AMCore.proxy.particleManager.spawn(world, AMCore.config.FullGFX() ? "radiant" : "sparkle2", x + rand.nextFloat(), y, z + rand.nextFloat());
if (particle != null) {
particle.setMaxAge(20);
particle.setParticleScale(AMCore.config.FullGFX() ? 0.015f : 0.15f);
particle.AddParticleController(new ParticleFloatUpward(particle, 0.01f, -0.025f, 1, false));
if (this == BlocksCommonProxy.redstoneInlay)
particle.setRGBColorF(1.0f, 0.4f, 0.4f);
else if (this == BlocksCommonProxy.ironInlay)
particle.setRGBColorF(1.0f, 1.0f, 1.0f);
else if (this == BlocksCommonProxy.goldInlay)
particle.setRGBColorF(1.0f, 1.0f, 0.2f);
}
}
}
use of am2.particles.ParticleFloatUpward in project ArsMagica2 by Mithion.
the class BlockInvisibleUtility method spawnBlockParticles.
private void spawnBlockParticles(World world, int x, int y, int z) {
AMParticle particle = (AMParticle) AMCore.proxy.particleManager.spawn(world, "symbols", x + 0.5, y + 0.5, z + 0.5);
if (particle != null) {
particle.addRandomOffset(1, 1.6, 1);
particle.setParticleScale(0.1f);
particle.AddParticleController(new ParticleFloatUpward(particle, 0, 0.02f, 1, false));
particle.AddParticleController(new ParticleFadeOut(particle, 1, false).setFadeSpeed(0.05f));
particle.setMaxAge(20);
if (world.rand.nextBoolean()) {
particle.setRGBColorI(0x481bc8);
} else {
particle.setRGBColorI(0x891bc8);
}
}
}
use of am2.particles.ParticleFloatUpward in project ArsMagica2 by Mithion.
the class BlockWitchwoodLeaves method randomDisplayTick.
@Override
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) {
if (!AMCore.config.witchwoodLeafPFX())
return;
if (par5Random.nextInt(300) == 0 && par1World.isAirBlock(par2, par3 - 1, par4)) {
AMParticle particle = (AMParticle) AMCore.proxy.particleManager.spawn(par1World, "leaf", par2 + par5Random.nextDouble(), par3 + par5Random.nextDouble(), par4 + par5Random.nextDouble());
if (particle != null) {
particle.AddParticleController(new ParticleFloatUpward(particle, 0, -0.05f, 1, false));
particle.setMaxAge(120);
particle.noClip = false;
particle.setParticleScale(0.1f + par5Random.nextFloat() * 0.1f);
particle.AddParticleController(new ParticlePendulum(particle, 0.2f, 0.15f + par5Random.nextFloat() * 0.2f, 2, false));
}
}
}
use of am2.particles.ParticleFloatUpward in project ArsMagica2 by Mithion.
the class VinteumTorch method spawnParticle.
@SideOnly(Side.CLIENT)
private void spawnParticle(World world, double x, double y, double z) {
AMParticle effect = (AMParticle) AMCore.instance.proxy.particleManager.spawn(world, "light", x, y, z);
if (effect != null) {
effect.setMaxAge(3);
effect.setIgnoreMaxAge(false);
effect.setRGBColorF(0.69f, 0.89f, 1.0f);
effect.AddParticleController(new ParticleFloatUpward(effect, 0, 0.01f, 1, false));
}
}
use of am2.particles.ParticleFloatUpward in project ArsMagica2 by Mithion.
the class EntityNatureGuardian method spawnParticles.
private void spawnParticles() {
AMParticle leaf = (AMParticle) AMCore.proxy.particleManager.spawn(worldObj, "leaf", posX + (rand.nextDouble() * 3) - 1.5f, posY + (rand.nextDouble() * 5f), posZ + (rand.nextDouble() * 3) - 1.5f);
if (leaf != null) {
leaf.setMaxAge(20);
leaf.setIgnoreMaxAge(false);
leaf.AddParticleController(new ParticleFloatUpward(leaf, 0.05f, -0.02f, 1, false));
if (getCurrentAction() == BossActions.SPINNING) {
leaf.AddParticleController(new ParticleOrbitEntity(leaf, this, 0.6f, 1, false));
}
}
}
Aggregations