Search in sources :

Example 21 with ParticleManager

use of net.minecraft.client.particle.ParticleManager in project NetherEx by LogicTechCorp.

the class ClientProxy method onRegisterParticleFactory.

private void onRegisterParticleFactory(ParticleFactoryRegisterEvent event) {
    ParticleManager particleManager = Minecraft.getInstance().particles;
    particleManager.registerFactory(NetherExParticles.SPORE_CREEPER_EXPLOSION.get(), SporeCreeperExplosionParticle.Factory::new);
    particleManager.registerFactory(NetherExParticles.SPORE_CREEPER_EXPLOSION_EMITTER.get(), new SporeCreeperExplosionEmitterParticle.Factory());
}
Also used : SporeCreeperExplosionEmitterParticle(logictechcorp.netherex.client.particle.SporeCreeperExplosionEmitterParticle) ParticleManager(net.minecraft.client.particle.ParticleManager)

Example 22 with ParticleManager

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

the class SplicerFX 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 ParticleManager effectRenderer = BinnieCore.getBinnieProxy().getMinecraftInstance().effectRenderer;
        effectRenderer.addEffect(new SplicerParticle(world, pos));
    }
}
Also used : ParticleManager(net.minecraft.client.particle.ParticleManager) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

ParticleManager (net.minecraft.client.particle.ParticleManager)22 Particle (net.minecraft.client.particle.Particle)9 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)7 IBlockState (net.minecraft.block.state.IBlockState)5 World (net.minecraft.world.World)5 Random (java.util.Random)4 EnumFacing (net.minecraft.util.EnumFacing)4 BlockPos (net.minecraft.util.math.BlockPos)4 TextureAtlasSprite (net.minecraft.client.renderer.texture.TextureAtlasSprite)3 EntityPlayer (net.minecraft.entity.player.EntityPlayer)3 TileEntity (net.minecraft.tileentity.TileEntity)3 Vec3d (net.minecraft.util.math.Vec3d)3 Collection (java.util.Collection)2 Collections (java.util.Collections)2 List (java.util.List)2 Objects (java.util.Objects)2 Optional (java.util.Optional)2 Collectors (java.util.stream.Collectors)2 Nonnull (javax.annotation.Nonnull)2 Nullable (javax.annotation.Nullable)2