Search in sources :

Example 1 with ParticleDrip

use of mods.railcraft.client.particles.ParticleDrip 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);
    }
}
Also used : Particle(net.minecraft.client.particle.Particle) ParticleDrip(mods.railcraft.client.particles.ParticleDrip) Vec3d(net.minecraft.util.math.Vec3d) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

ParticleDrip (mods.railcraft.client.particles.ParticleDrip)1 Particle (net.minecraft.client.particle.Particle)1 Vec3d (net.minecraft.util.math.Vec3d)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1