Search in sources :

Example 1 with EntityFX

use of net.minecraft.client.particle.EntityFX in project TecTech by Technus.

the class ClientProxy method hint_particle.

@Override
public void hint_particle(World world, int x, int y, int z, Block block, int meta) {
    Minecraft.getMinecraft().effectRenderer.addEffect(new BlockHint(world, x, y, z, block, meta));
    EntityFX particle = new EntityExplodeFX(world, x + TecTech.Rnd.nextFloat() * 0.5F, y + TecTech.Rnd.nextFloat() * 0.5F, z + TecTech.Rnd.nextFloat() * 0.5F, 0, 0, 0);
    particle.setRBGColorF(0, 0.6F * TecTech.Rnd.nextFloat(), 0.8f);
    Minecraft.getMinecraft().effectRenderer.addEffect(particle);
}
Also used : EntityExplodeFX(net.minecraft.client.particle.EntityExplodeFX) BlockHint(com.github.technus.tectech.entity.fx.BlockHint) EntityFX(net.minecraft.client.particle.EntityFX)

Example 2 with EntityFX

use of net.minecraft.client.particle.EntityFX in project TecTech by Technus.

the class ClientProxy method em_particle.

@Override
public void em_particle(World w, double x, double y, double z) {
    // CUTE!
    EntityFX particle = new EntityExplodeFX(w, x + TecTech.Rnd.nextFloat() * 0.5F, y + TecTech.Rnd.nextFloat() * 0.5F, z + TecTech.Rnd.nextFloat() * 0.5F, 0, 0, 0);
    particle.setRBGColorF(0, 0.6F * TecTech.Rnd.nextFloat(), 0.8f);
    Minecraft.getMinecraft().effectRenderer.addEffect(particle);
}
Also used : EntityExplodeFX(net.minecraft.client.particle.EntityExplodeFX) EntityFX(net.minecraft.client.particle.EntityFX)

Example 3 with EntityFX

use of net.minecraft.client.particle.EntityFX in project ClaySoldiersMod by SanAndreasP.

the class ParticleHelper method onSpawnSldCritical.

public static void onSpawnSldCritical(float posX, float posY, float posZ) {
    for (int i = 0; i < 20; i++) {
        EntityFX crit = new EntityCritFX(Minecraft.getMinecraft().theWorld, posX, posY, posZ, (new Random()).nextDouble() - 0.5D, 0.5D, (new Random()).nextDouble() - 0.5D);
        crit.setRBGColorF(crit.getRedColorF() * 0.3F, crit.getGreenColorF() * 0.8F, crit.getBlueColorF());
        crit.nextTextureIndexX();
        Minecraft.getMinecraft().effectRenderer.addEffect(crit);
    }
}
Also used : Random(java.util.Random) EntityCritFX(net.minecraft.client.particle.EntityCritFX) EntityFX(net.minecraft.client.particle.EntityFX)

Example 4 with EntityFX

use of net.minecraft.client.particle.EntityFX in project BetterRain by OreCruncher.

the class DamageEffectHandler method handleEvent.

@SideOnly(Side.CLIENT)
public static void handleEvent(final HealthData data) {
    if (!ModOptions.enableDamagePopoffs)
        return;
    // Don't show the players pop-offs
    if (EnvironState.isPlayer(data.entityId))
        return;
    // Don't want to display if too far away.
    final double distance = EnvironState.distanceToPlayer(data.posX, data.posY, data.posZ);
    if (distance >= DISTANCE_THRESHOLD_SQ)
        return;
    final World world = EnvironState.getWorld();
    final EffectRenderer renderer = Minecraft.getMinecraft().effectRenderer;
    EntityFX fx;
    if (data.isCritical) {
        fx = new EntityCriticalPopOffFX(world, data.posX, data.posY, data.posZ);
        renderer.addEffect(fx);
    }
    if (data.amount > 0) {
        fx = new EntityDamagePopOffFX(world, data.posX, data.posY, data.posZ, data.amount);
    } else {
        fx = new EntityHealPopOffFX(world, data.posX, data.posY, data.posZ, MathHelper.abs_int(data.amount));
    }
    renderer.addEffect(fx);
}
Also used : EntityCriticalPopOffFX(org.blockartistry.mod.DynSurround.client.fx.particle.EntityCriticalPopOffFX) EffectRenderer(net.minecraft.client.particle.EffectRenderer) EntityHealPopOffFX(org.blockartistry.mod.DynSurround.client.fx.particle.EntityHealPopOffFX) EntityFX(net.minecraft.client.particle.EntityFX) EntityDamagePopOffFX(org.blockartistry.mod.DynSurround.client.fx.particle.EntityDamagePopOffFX) World(net.minecraft.world.World) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 5 with EntityFX

use of net.minecraft.client.particle.EntityFX in project TecTech by Technus.

the class ClientProxy method em_particle.

@Override
public void em_particle(IGregTechTileEntity aMuffler, byte facing) {
    // CUTE!
    ForgeDirection aDir = ForgeDirection.getOrientation(facing);
    float xPos = aDir.offsetX * 0.76F + aMuffler.getXCoord() + 0.25F;
    float yPos = aDir.offsetY * 0.76F + aMuffler.getYCoord() + 0.25F;
    float zPos = aDir.offsetZ * 0.76F + aMuffler.getZCoord() + 0.25F;
    float ySpd = 0;
    // aDir.offsetY*0.1F+0.2F+0.1F*floatGen.nextFloat();
    float xSpd = 0;
    float zSpd = 0;
    EntityFX particle = new EntityExplodeFX(aMuffler.getWorld(), xPos + TecTech.Rnd.nextFloat() * 0.5F, yPos + TecTech.Rnd.nextFloat() * 0.5F, zPos + TecTech.Rnd.nextFloat() * 0.5F, xSpd, ySpd, zSpd);
    particle.setRBGColorF(0, 0.6F * TecTech.Rnd.nextFloat(), 0.8f);
    Minecraft.getMinecraft().effectRenderer.addEffect(particle);
}
Also used : EntityExplodeFX(net.minecraft.client.particle.EntityExplodeFX) ForgeDirection(net.minecraftforge.common.util.ForgeDirection) EntityFX(net.minecraft.client.particle.EntityFX)

Aggregations

EntityFX (net.minecraft.client.particle.EntityFX)21 Minecraft (net.minecraft.client.Minecraft)5 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)4 EntityExplodeFX (net.minecraft.client.particle.EntityExplodeFX)3 Tessellator (net.minecraft.client.renderer.Tessellator)3 SideOnly (cpw.mods.fml.relauncher.SideOnly)2 Vector3 (micdoodle8.mods.galacticraft.api.vector.Vector3)2 Block (net.minecraft.block.Block)2 WorldClient (net.minecraft.client.multiplayer.WorldClient)2 Entity (net.minecraft.entity.Entity)2 TileEntity (net.minecraft.tileentity.TileEntity)2 Pos (com.builtbroken.mc.imp.transform.vector.Pos)1 FXEnderPortalPartical (com.builtbroken.mc.lib.render.fx.FXEnderPortalPartical)1 FXSmoke (com.builtbroken.mc.lib.render.fx.FXSmoke)1 BlockHint (com.github.technus.tectech.entity.fx.BlockHint)1 GameProfile (com.mojang.authlib.GameProfile)1 Property (com.mojang.authlib.properties.Property)1 FXAntimatterPartical (icbm.classic.client.fx.FXAntimatterPartical)1 IOException (java.io.IOException)1 Random (java.util.Random)1