Search in sources :

Example 1 with ParticleFlooFlame

use of lumien.randomthings.client.particles.ParticleFlooFlame in project Random-Things by lumien231.

the class MessageFlooParticles method onMessage.

@Override
@SideOnly(Side.CLIENT)
public void onMessage(MessageContext context) {
    EntityPlayer player = Minecraft.getMinecraft().player;
    if (player != null) {
        World world = player.world;
        ParticleFlame.Factory factory = new ParticleFlame.Factory();
        for (BlockPos p : brickPositions) {
            for (int i = 0; i < 50; i++) {
                Particle particle = new ParticleFlooFlame(world, p.getX() + Math.random(), p.getY() + 1 + Math.random(), p.getZ() + Math.random(), 0, Math.random() * 0.1, 0);
                Minecraft.getMinecraft().effectRenderer.addEffect(particle);
            }
        }
    }
}
Also used : ParticleFlame(net.minecraft.client.particle.ParticleFlame) Particle(net.minecraft.client.particle.Particle) ParticleFlooFlame(lumien.randomthings.client.particles.ParticleFlooFlame) EntityPlayer(net.minecraft.entity.player.EntityPlayer) BlockPos(net.minecraft.util.math.BlockPos) World(net.minecraft.world.World) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 2 with ParticleFlooFlame

use of lumien.randomthings.client.particles.ParticleFlooFlame in project Random-Things by lumien231.

the class MessageFlooToken method onMessage.

@Override
@SideOnly(Side.CLIENT)
public void onMessage(MessageContext context) {
    EntityPlayer player = Minecraft.getMinecraft().player;
    if (player != null) {
        World world = player.world;
        if (world.provider.getDimension() == dimension) {
            for (float modX = -1; modX <= 1; modX += 0.05) {
                for (float modZ = -1; modZ <= 1; modZ += 0.05) {
                    ParticleFlooFlame particle = new ParticleFlooFlame(world, posX + modX + (Math.random() * 0.1 - 0.05), posY - 1, posZ + modZ + (Math.random() * 0.1 - 0.05), 0, Math.random() * 0.3 + 0.1, 0);
                    Minecraft.getMinecraft().effectRenderer.addEffect(particle);
                }
            }
        }
    }
}
Also used : ParticleFlooFlame(lumien.randomthings.client.particles.ParticleFlooFlame) EntityPlayer(net.minecraft.entity.player.EntityPlayer) World(net.minecraft.world.World) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 3 with ParticleFlooFlame

use of lumien.randomthings.client.particles.ParticleFlooFlame in project Random-Things by lumien231.

the class EntityTemporaryFlooFireplace method spawnParticles.

@SideOnly(Side.CLIENT)
private void spawnParticles() {
    for (float modX = -1; modX <= 1; modX += 0.2) {
        for (float modZ = -1; modZ <= 1; modZ += 0.2) {
            ParticleFlooFlame particle = new ParticleFlooFlame(world, posX + modX + (Math.random() * 0.2 - 0.1), posY + 0.05, posZ + modZ + (Math.random() * 0.1 - 0.05), 0, Math.random() * 0.01, 0);
            Minecraft.getMinecraft().effectRenderer.addEffect(particle);
        }
    }
}
Also used : ParticleFlooFlame(lumien.randomthings.client.particles.ParticleFlooFlame) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

ParticleFlooFlame (lumien.randomthings.client.particles.ParticleFlooFlame)3 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)3 EntityPlayer (net.minecraft.entity.player.EntityPlayer)2 World (net.minecraft.world.World)2 Particle (net.minecraft.client.particle.Particle)1 ParticleFlame (net.minecraft.client.particle.ParticleFlame)1 BlockPos (net.minecraft.util.math.BlockPos)1