use of net.minecraft.client.particle.Particle in project Railcraft by Railcraft.
the class ClientEffects method trailEffect.
public void trailEffect(BlockPos start, TileEntity dest, long colorSeed) {
if (thinParticles(false))
return;
if (mc.player.getDistanceSq(start) > TRACKING_DISTANCE)
return;
if (rand.nextInt(3) == 0) {
double px = start.getX() + 0.5 + rand.nextGaussian() * 0.1;
double py = start.getY() + 0.5 + rand.nextGaussian() * 0.1;
double pz = start.getZ() + 0.5 + rand.nextGaussian() * 0.1;
Particle particle = new ParticleHeatTrail(dest.getWorld(), new Vec3d(px, py, pz), colorSeed, EffectManager.getEffectSource(dest));
spawnParticle(particle);
}
}
use of net.minecraft.client.particle.Particle in project Railcraft by Railcraft.
the class ClientEffects method chunkLoaderEffect.
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().player.getDistanceSq(sourcePos.x, sourcePos.y, sourcePos.z) > 25600)
return;
for (ChunkPos chunk : chunks) {
int xCorner = chunk.x * 16;
int zCorner = chunk.z * 16;
double yCorner = sourcePos.y - 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 net.minecraft.client.particle.Particle in project Railcraft by Railcraft.
the class FluidTools method drip.
@SideOnly(Side.CLIENT)
public static void drip(World world, BlockPos pos, IBlockState state, Random rand, float particleRed, float particleGreen, float particleBlue) {
if (rand.nextInt(10) == 0 && world.isSideSolid(pos.down(), EnumFacing.UP) && !WorldPlugin.getBlockMaterial(world, pos.down(2)).blocksMovement()) {
double px = (double) ((float) pos.getX() + rand.nextFloat());
double py = (double) pos.getY() - 1.05D;
double pz = (double) ((float) pos.getZ() + rand.nextFloat());
Particle fx = new ParticleDrip(world, new Vec3d(px, py, pz), particleRed, particleGreen, particleBlue);
FMLClientHandler.instance().getClient().effectRenderer.addEffect(fx);
}
}
Aggregations