Search in sources :

Example 36 with Particle

use of net.minecraft.client.particle.Particle in project DynamicSurroundings by OreCruncher.

the class ParticleDustJet method spawnJetParticle.

@Override
protected void spawnJetParticle() {
    final double x = this.posX + RANDOM.nextGaussian() * 0.2D;
    final double z = this.posZ + RANDOM.nextGaussian() * 0.2D;
    final Particle particle = new ParticleDust(this.world, x, this.posY, z, this.blockState).init();
    addParticle(particle);
}
Also used : Particle(net.minecraft.client.particle.Particle) ParticleDust(org.blockartistry.DynSurround.client.fx.particle.ParticleDust)

Example 37 with Particle

use of net.minecraft.client.particle.Particle in project DynamicSurroundings by OreCruncher.

the class ParticleFountainJet method spawnJetParticle.

@Override
protected void spawnJetParticle() {
    final double motionX = RANDOM.nextGaussian() * 0.03D;
    final double motionZ = RANDOM.nextGaussian() * 0.03D;
    final double x = this.posX + RANDOM.nextGaussian() * 0.2D;
    final double z = this.posZ + RANDOM.nextGaussian() * 0.2D;
    final Particle particle = new ParticleFountain(this.world, x, this.posY, z, motionX, 0.5D, motionZ, this.block).init();
    addParticle(particle);
}
Also used : Particle(net.minecraft.client.particle.Particle) ParticleFountain(org.blockartistry.DynSurround.client.fx.particle.ParticleFountain)

Example 38 with Particle

use of net.minecraft.client.particle.Particle in project DynamicSurroundings by OreCruncher.

the class ParticleBubbleJet method spawnJetParticle.

@Override
protected void spawnJetParticle() {
    final Particle particle = this.factory.createParticle(EnumParticleTypes.WATER_BUBBLE.getParticleID(), this.world, this.posX, this.posY, this.posZ, 0D, 0.5D + this.jetStrength / 10.0D, 0D);
    addParticle(particle);
}
Also used : Particle(net.minecraft.client.particle.Particle)

Example 39 with Particle

use of net.minecraft.client.particle.Particle in project DynamicSurroundings by OreCruncher.

the class ParticleFireJet method spawnJetParticle.

@Override
protected void spawnJetParticle() {
    final double speedY = this.isLava ? 0 : this.jetStrength / 10.0D;
    final Particle particle = this.factory.createParticle(this.particleId, this.world, this.posX, this.posY, this.posZ, 0D, speedY, 0D);
    if (!this.isLava) {
        final ParticleFlame flame = (ParticleFlame) particle;
        flame.flameScale *= this.jetStrength;
    }
    addParticle(particle);
}
Also used : Particle(net.minecraft.client.particle.Particle) ParticleFlame(net.minecraft.client.particle.ParticleFlame)

Example 40 with Particle

use of net.minecraft.client.particle.Particle in project EnderIO by SleepyTrousers.

the class AbstractBlockObelisk method randomDisplayTick.

@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(@Nonnull IBlockState bs, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull Random rand) {
    if (isActive(world, pos) && shouldDoWorkThisTick(world, pos, 5)) {
        float startX = pos.getX() + 1.0F;
        float startY = pos.getY() + 0.85F;
        float startZ = pos.getZ() + 1.0F;
        for (int i = 0; i < 1; i++) {
            float xOffset = -0.2F - rand.nextFloat() * 0.6F;
            float yOffset = -0.1F + rand.nextFloat() * 0.2F;
            float zOffset = -0.2F - rand.nextFloat() * 0.6F;
            Particle fx = Minecraft.getMinecraft().effectRenderer.spawnEffectParticle(EnumParticleTypes.SPELL.getParticleID(), startX + xOffset, startY + yOffset, startZ + zOffset, 0.0D, 0.0D, 0.0D);
            if (fx != null) {
                fx.setRBGColorF(0.2f, 0.2f, 0.8f);
                ClientUtil.setParticleVelocityY(fx, ClientUtil.getParticleVelocityY(fx) * 0.5);
            }
        }
    }
}
Also used : Particle(net.minecraft.client.particle.Particle) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

Particle (net.minecraft.client.particle.Particle)52 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)21 ParticleManager (net.minecraft.client.particle.ParticleManager)9 BlockPos (net.minecraft.util.math.BlockPos)8 Vec3d (net.minecraft.util.math.Vec3d)8 IEffectSource (mods.railcraft.common.util.effects.EffectManager.IEffectSource)4 TextureAtlasSprite (net.minecraft.client.renderer.texture.TextureAtlasSprite)4 EntityPlayer (net.minecraft.entity.player.EntityPlayer)4 EnumFacing (net.minecraft.util.EnumFacing)4 Random (java.util.Random)3 Minecraft (net.minecraft.client.Minecraft)3 IBakedModel (net.minecraft.client.renderer.block.model.IBakedModel)3 World (net.minecraft.world.World)3 IStateParticleBakedModel (pl.asie.charset.lib.render.model.IStateParticleBakedModel)3 TESRSignals (mods.railcraft.client.render.tesr.TESRSignals)2 IBlockState (net.minecraft.block.state.IBlockState)2 ParticleFlame (net.minecraft.client.particle.ParticleFlame)2 ModelResourceLocation (net.minecraft.client.renderer.block.model.ModelResourceLocation)2 ResourceLocation (net.minecraft.util.ResourceLocation)2 AxisAlignedBB (net.minecraft.util.math.AxisAlignedBB)2