Package net.minecraft.client.particle

Examples of net.minecraft.client.particle.EntityFX


        if (mc != null && mc.renderViewEntity != null && mc.effectRenderer != null)
        {
            double dX = mc.renderViewEntity.posX - position.x;
            double dY = mc.renderViewEntity.posY - position.y;
            double dZ = mc.renderViewEntity.posZ - position.z;
            EntityFX particle = null;
            double viewDistance = 64.0D;

            if (dX * dX + dY * dY + dZ * dZ < viewDistance * viewDistance)
            {
                if (particleID.equals("portalBlue"))
View Full Code Here


        if (mc != null && mc.renderViewEntity != null && mc.effectRenderer != null)
        {
            final double dPosX = mc.renderViewEntity.posX - position.x;
            final double dPosY = mc.renderViewEntity.posY - position.y;
            final double dPosZ = mc.renderViewEntity.posZ - position.z;
            EntityFX particle = null;
            final double maxDistSqrd = 64.0D;

            if (dPosX * dPosX + dPosY * dPosY + dPosZ * dPosZ < maxDistSqrd * maxDistSqrd)
            {
                if (particleID.equals("sludgeDrip"))
View Full Code Here

        particles.addAll(particleQueue);
        particleQueue.clear();

        for (Iterator<CoreParticle> it = particles.iterator(); it.hasNext();)
        {
            EntityFX particle = it.next();

            particle.onUpdate();

            if (particle.isDead) it.remove();
        }
        Minecraft.getMinecraft().mcProfiler.endSection();
    }
View Full Code Here

        double dX = (posX - prevPosX) / 10;
        double dY = (posY - prevPosY) / 10;
        double dZ = (posZ - prevPosZ) / 10;
        for (int i = 0; i < 10; i++)
        {
          EntityFX particle = FlansModClient.getParticle(type.trailParticleType, worldObj, prevPosX + dX * i, prevPosY + dY * i, prevPosZ + dZ * i);
          if(particle != null && Minecraft.getMinecraft().gameSettings.fancyGraphics)
            particle.renderDistanceWeight = 100D;
          //worldObj.spawnEntityInWorld(particle);
        }
      }
View Full Code Here

  public void handleClientSide(EntityPlayer clientPlayer)
  {
    World world = clientPlayer.worldObj;
    for (int i = 0; i < numParticles; i++)
    {
      EntityFX obj = FlansModClient.getParticle(particleType, world, x + rand.nextGaussian(), y + rand.nextGaussian(), z + rand.nextGaussian());
      if(obj != null)
      {
        obj.motionX = rand.nextGaussian() / 20;
        obj.motionY = rand.nextGaussian() / 20;
        obj.motionZ = rand.nextGaussian() / 20;
View Full Code Here

  @SideOnly(Side.CLIENT)
  public static EntityFX getParticle(String s, World w, double x, double y, double z)
  {
    Minecraft mc = Minecraft.getMinecraft();
    //return mc.renderGlobal.doSpawnParticle(s, x, y, z, 0.01D, 0.01D, 0.01D);
    EntityFX fx = null;
    if(s.equals("hugeexplosion"))
      fx = new EntityHugeExplodeFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("largeexplode"))
      fx = new EntityLargeExplodeFX(mc.renderEngine, w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("fireworksSpark"))
      fx = new EntityFireworkSparkFX(w, x, y, z, 0D, 0D, 0D, mc.effectRenderer);
    else if(s.equals("bubble"))
      fx = new EntityBubbleFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("suspended"))
      fx = new EntitySuspendFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("depthsuspend"))
      fx = new EntityAuraFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("townaura"))
      fx = new EntityAuraFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("crit"))
      fx = new EntityCritFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("magicCrit"))
    {
      fx = new EntityCritFX(w, x, y, z, 0D, 0D, 0D);
      fx.setRBGColorF(fx.getRedColorF() * 0.3F, fx.getGreenColorF() * 0.8F, fx.getBlueColorF());
            fx.nextTextureIndexX();
    }
    else if(s.equals("smoke"))
      fx = new EntitySmokeFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("mobSpell"))
    {
      fx = new EntitySpellParticleFX(w, x, y, z, 0D, 0D, 0D);
      fx.setRBGColorF(0F, 0F, 0F);
    }
    else if(s.equals("mobSpellAmbient"))
    {
      fx = new EntitySpellParticleFX(w, x, y, z, 0D, 0D, 0D);
            fx.setAlphaF(0.15F);
            fx.setRBGColorF(0F, 0F, 0F);
    }
    else if(s.equals("spell"))
      fx = new EntitySpellParticleFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("instantSpell"))
    {
      fx = new EntitySpellParticleFX(w, x, y, z, 0D, 0D, 0D);
      ((EntitySpellParticleFX)fx).setBaseSpellTextureIndex(144);
    }
    else if(s.equals("witchMagic"))
    {
      fx = new EntitySmokeFX(w, x, y, z, 0D, 0D, 0D);
      ((EntitySpellParticleFX)fx).setBaseSpellTextureIndex(144);
            float f = w.rand.nextFloat() * 0.5F + 0.35F;
            fx.setRBGColorF(1.0F * f, 0.0F * f, 1.0F * f);
    }
    else if(s.equals("note"))
      fx = new EntityNoteFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("portal"))
      fx = new EntityPortalFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("enchantmenttable"))
      fx = new EntityEnchantmentTableParticleFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("explode"))
      fx = new EntityExplodeFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("flame"))
      fx = new EntityFlameFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("lava"))
      fx = new EntityLavaFX(w, x, y, z);
    else if(s.equals("footstep"))
      fx = new EntityFootStepFX(mc.renderEngine, w, x, y, z);
    else if(s.equals("splash"))
      fx = new EntitySplashFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("wake"))
      fx = new EntityFishWakeFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("largesmoke"))
      fx = new EntitySmokeFX(w, x, y, z, 0D, 0D, 0D, 2.5F);
    else if(s.equals("cloud"))
      fx = new EntityCloudFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("reddust"))
      fx = new EntityReddustFX(w, x, y, z, 0F, 0F, 0F);
    else if(s.equals("snowballpoof"))
      fx = new EntityBreakingFX(w, x, y, z, Items.snowball);
    else if(s.equals("dripWater"))
      fx = new EntityDropParticleFX(w, x, y, z, Material.water);
    else if(s.equals("dripLava"))
      fx = new EntityDropParticleFX(w, x, y, z, Material.lava);
    else if(s.equals("snowshovel"))
      fx = new EntitySnowShovelFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("slime"))
      fx = new EntityBreakingFX(w, x, y, z, Items.slime_ball);
    else if(s.equals("heart"))
      fx = new EntityHeartFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("angryVillager"))
    {
      fx = new EntityHeartFX(w, x, y, z, 0D, 0D, 0D);
      fx.setParticleTextureIndex(81);
      fx.setRBGColorF(1.0F, 1.0F, 1.0F);
    }
    else if(s.equals("happyVillager"))
    {
      fx = new EntityAuraFX(w, x, y, z, 0D, 0D, 0D);
      fx.setParticleTextureIndex(82);
            fx.setRBGColorF(1.0F, 1.0F, 1.0F);
    }
    else if(s.equals("snowshovel"))
      fx = new EntitySnowShovelFX(w, x, y, z, 0D, 0D, 0D);
    else if(s.equals("snowshovel"))
      fx = new EntitySnowShovelFX(w, x, y, z, 0D, 0D, 0D);
View Full Code Here

    double dX = (posX - prevPosX) / 10;
    double dY = (posY - prevPosY) / 10;
    double dZ = (posZ - prevPosZ) / 10;
    for (int i = 0; i < 10; i++)
    {
      EntityFX particle = FlansModClient.getParticle(type.trailParticleType, worldObj, prevPosX + dX * i, prevPosY + dY * i, prevPosZ + dZ * i);
      if(particle != null && Minecraft.getMinecraft().gameSettings.fancyGraphics)
        particle.renderDistanceWeight = 100D;
      //worldObj.spawnEntityInWorld(particle);
    }
  }
View Full Code Here

    if (density < 0) {
      py = y + 2.10D;
    }
    if (rand.nextInt(20) == 0 && world.isSideSolid(x, y + densityDir, z, densityDir == -1 ? ForgeDirection.UP : ForgeDirection.DOWN)
        && !world.getBlock(x, y + 2 * densityDir, z).getMaterial().blocksMovement()) {
      EntityFX fx = new EntityDropParticleFX(world, px, py, pz, particleRed, particleGreen, particleBlue, densityDir);
      FMLClientHandler.instance().getClient().effectRenderer.addEffect(fx);
    }
  }
View Full Code Here

  @Override
  public void addBeeHiveFX(String icon, World world, double xCoord, double yCoord, double zCoord, int color, int areaX, int areaY, int areaZ) {
    if (!Config.enableParticleFX)
      return;

    EntityFX fx;

    if (world.rand.nextBoolean()) {
      fx = new EntityBeeFX(world, xCoord + 0.5D, yCoord + 0.75D, zCoord + 0.5D, 0.0f, 0.0f, 0.0f, color);
    } else {
      double spawnX = xCoord + world.rand.nextInt(areaX * 2) - areaX;
      double spawnY = yCoord + world.rand.nextInt(areaY);
      double spawnZ = zCoord + world.rand.nextInt(areaZ * 2) - areaZ;

      fx = new EntityBeeFX(world, spawnX, spawnY, spawnZ, 0.0f, 0.0f, 0.0f, color);
    }

    fx.setParticleIcon(TextureManager.getInstance().getDefault(icon));
    ParticleRenderer.getInstance().addEffect(fx);
  }
View Full Code Here

  @Override
  public void addBeeSwarmFX(String icon, World world, double xCoord, double yCoord, double zCoord, int color) {
    if (!Config.enableParticleFX)
      return;

    EntityFX fx;

    if (world.rand.nextBoolean())
      fx = new EntityBeeFX(world, xCoord, yCoord, zCoord, 0.0f, 0.0f, 0.0f, color);
    else {

      double spawnX = xCoord + world.rand.nextInt(4) - 2;
      double spawnY = yCoord + world.rand.nextInt(4) - 2;
      double spawnZ = zCoord + world.rand.nextInt(4) - 2;

      fx = new EntityBeeFX(world, spawnX, spawnY, spawnZ, 0.0f, 0.0f, 0.0f, color);
    }

    fx.setParticleIcon(TextureManager.getInstance().getDefault(icon));
    ParticleRenderer.getInstance().addEffect(fx);
  }
View Full Code Here

TOP

Related Classes of net.minecraft.client.particle.EntityFX

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.