Search in sources :

Example 46 with Particle

use of net.minecraft.client.particle.Particle in project Binnie by ForestryMC.

the class InoculatorFX method onDisplayTick.

@SideOnly(Side.CLIENT)
@Override
public void onDisplayTick(World world, BlockPos pos, Random rand) {
    if (!this.getUtil().getProcess().isInProgress())
        return;
    final int tick = (int) (world.getTotalWorldTime() % 3L);
    if (tick == 0) {
        final Particle particle = new InoculatorParticle(world, pos);
        BinnieCore.getBinnieProxy().getMinecraftInstance().effectRenderer.addEffect(particle);
    }
}
Also used : Particle(net.minecraft.client.particle.Particle) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 47 with Particle

use of net.minecraft.client.particle.Particle in project Binnie by ForestryMC.

the class IsolatorFX method onRandomDisplayTick.

@SideOnly(Side.CLIENT)
@Override
public void onRandomDisplayTick(World world, BlockPos pos, Random rand) {
    if (!this.getUtil().getProcess().isInProgress()) {
        return;
    }
    final Particle particle = new IsolaterParticleRandomTick(world, pos, rand);
    BinnieCore.getBinnieProxy().getMinecraftInstance().effectRenderer.addEffect(particle);
}
Also used : Particle(net.minecraft.client.particle.Particle) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 48 with Particle

use of net.minecraft.client.particle.Particle in project Binnie by ForestryMC.

the class IsolatorFX method onDisplayTick.

@SideOnly(Side.CLIENT)
@Override
public void onDisplayTick(World world, BlockPos pos, Random rand) {
    if (!this.getUtil().getProcess().isInProgress())
        return;
    final int tick = (int) (world.getTotalWorldTime() % 6L);
    if (tick == 0 || tick == 5) {
        final Particle particle = new IsolatorParticle(world, pos);
        BinnieCore.getBinnieProxy().getMinecraftInstance().effectRenderer.addEffect(particle);
    }
}
Also used : Particle(net.minecraft.client.particle.Particle) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 49 with Particle

use of net.minecraft.client.particle.Particle in project BiomesOPlenty by Glitchfiend.

the class ClientProxy method spawnParticle.

@Override
public void spawnParticle(BOPParticleTypes type, World parWorld, double x, double y, double z, Object... info) {
    Minecraft minecraft = Minecraft.getMinecraft();
    Particle entityFx = null;
    switch(type) {
        case PIXIETRAIL:
            entityFx = new EntityPixieTrailFX(parWorld, x, y, z, MathHelper.nextDouble(parWorld.rand, -0.03, 0.03), -0.02D, MathHelper.nextDouble(parWorld.rand, -0.03, 0.03));
            break;
        case MUD:
            int itemId = Item.getIdFromItem(BOPItems.mudball);
            minecraft.world.spawnParticle(EnumParticleTypes.ITEM_CRACK, x, y, z, MathHelper.nextDouble(parWorld.rand, -0.08D, 0.08D), MathHelper.nextDouble(parWorld.rand, -0.08D, 0.08D), MathHelper.nextDouble(parWorld.rand, -0.08D, 0.08D), itemId);
            return;
        case PLAYER_TRAIL:
            if (info.length < 1)
                throw new RuntimeException("Missing argument for trail name!");
            entityFx = new EntityTrailFX(parWorld, x, y, z, (String) info[0]);
            break;
        default:
            break;
    }
    if (entityFx != null) {
        minecraft.effectRenderer.addEffect(entityFx);
    }
}
Also used : Particle(net.minecraft.client.particle.Particle) EntityPixieTrailFX(biomesoplenty.client.particle.EntityPixieTrailFX) EntityTrailFX(biomesoplenty.client.particle.EntityTrailFX) Minecraft(net.minecraft.client.Minecraft)

Example 50 with Particle

use of net.minecraft.client.particle.Particle in project Railcraft by Railcraft.

the class ClientEffects method fireSparkEffect.

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);
}
Also used : Particle(net.minecraft.client.particle.Particle) IEffectSource(mods.railcraft.common.util.effects.EffectManager.IEffectSource)

Aggregations

Particle (net.minecraft.client.particle.Particle)53 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)22 ParticleManager (net.minecraft.client.particle.ParticleManager)9 Vec3d (net.minecraft.util.math.Vec3d)9 BlockPos (net.minecraft.util.math.BlockPos)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 World (net.minecraft.world.World)4 Random (java.util.Random)3 Minecraft (net.minecraft.client.Minecraft)3 IBakedModel (net.minecraft.client.renderer.block.model.IBakedModel)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 TileEntity (net.minecraft.tileentity.TileEntity)2 ResourceLocation (net.minecraft.util.ResourceLocation)2