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);
}
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);
}
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);
}
}
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);
}
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);
}
Aggregations