use of mods.railcraft.common.util.effects.EffectManager.IEffectSource in project Railcraft by Railcraft.
the class ClientEffectProxy method steamJetEffect.
@Override
public void steamJetEffect(World world, Object source, Vec3d vel) {
if (thinParticles(true))
return;
IEffectSource es = EffectManager.getEffectSource(source);
vel = vel.addVector(rand.nextGaussian() * 0.02, rand.nextGaussian() * 0.02, rand.nextGaussian() * 0.02);
ParticleSteam fx = new ParticleSteam(world, es.getPosF(), vel, 1.5F);
fx.setParticleGravity(0F);
spawnParticle(fx);
}
use of mods.railcraft.common.util.effects.EffectManager.IEffectSource in project Railcraft by Railcraft.
the class ClientEffectProxy method chunkLoaderEffect.
@Override
public void chunkLoaderEffect(World world, Object source, Set<ChunkPos> chunks) {
if (!isGoggleAuraActive(GoggleAura.WORLDSPIKE))
return;
IEffectSource es = EffectManager.getEffectSource(source);
Vec3d sourcePos = es.getPosF();
if (FMLClientHandler.instance().getClient().thePlayer.getDistanceSq(sourcePos.xCoord, sourcePos.yCoord, sourcePos.zCoord) > 25600)
return;
for (ChunkPos chunk : chunks) {
int xCorner = chunk.chunkXPos * 16;
int zCorner = chunk.chunkZPos * 16;
double yCorner = sourcePos.yCoord - 8;
// System.out.println(xCorner + ", " + zCorner);
if (rand.nextInt(3) == 0) {
if (thinParticles(false))
continue;
double xParticle = xCorner + rand.nextFloat() * 16;
double yParticle = yCorner + rand.nextFloat() * 16;
double zParticle = zCorner + rand.nextFloat() * 16;
Particle particle = new ParticleChunkLoader(world, new Vec3d(xParticle, yParticle, zParticle), es);
spawnParticle(particle);
}
}
}
use of mods.railcraft.common.util.effects.EffectManager.IEffectSource in project Railcraft by Railcraft.
the class ClientEffectProxy method fireSparkEffect.
@Override
public void fireSparkEffect(World world, Vec3d start, Vec3d end) {
if (thinParticles(false))
return;
IEffectSource es = EffectManager.getEffectSource(start);
Particle particle = new ParticleFireSpark(world, start, end);
spawnParticle(particle);
SoundHelper.playSoundClient(world, es.getPos(), SoundEvents.BLOCK_LAVA_POP, SoundCategory.BLOCKS, .2F + rand.nextFloat() * .2F, .9F + rand.nextFloat() * .15F);
}
use of mods.railcraft.common.util.effects.EffectManager.IEffectSource in project Railcraft by Railcraft.
the class ClientEffectProxy method zapEffectPoint.
@Override
public void zapEffectPoint(World world, Object source) {
if (thinParticles(false))
return;
IEffectSource es = EffectManager.getEffectSource(source);
if (Minecraft.getMinecraft().getRenderViewEntity().getDistanceSq(es.getPos()) > 400)
return;
Vec3d vel = new Vec3d(rand.nextDouble() - 0.5D, rand.nextDouble() - 0.5D, rand.nextDouble() - 0.5D);
spawnParticle(new ParticleSpark(world, es.getPosF(), vel));
SoundHelper.playSoundClient(world, es.getPos(), RailcraftSoundEvents.MECHANICAL_ZAP, SoundCategory.BLOCKS, .2F, 1F);
}
use of mods.railcraft.common.util.effects.EffectManager.IEffectSource in project Railcraft by Railcraft.
the class ClientEffectProxy method zapEffectDeath.
@Override
public void zapEffectDeath(World world, Object source) {
if (Game.isHost(world)) {
super.zapEffectDeath(world, source);
return;
}
if (thinParticles(false))
return;
IEffectSource es = EffectManager.getEffectSource(source);
if (Minecraft.getMinecraft().getRenderViewEntity().getDistanceSq(es.getPos()) > 400)
return;
SoundHelper.playSoundClient(world, es.getPos(), RailcraftSoundEvents.MECHANICAL_ZAP, SoundCategory.BLOCKS, 3F, 0.75F);
for (int i = 0; i < 20; i++) {
Vec3d vel = new Vec3d(rand.nextDouble() - 0.5D, rand.nextDouble() - 0.5D, rand.nextDouble() - 0.5D);
spawnParticle(new ParticleSpark(world, es.getPosF(), vel));
}
}
Aggregations