jtrent238

Particles in Mobs! (Like blaze) [UPDATED]

Feb 15th, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.56 KB | None | 0 0
  1. ---------------------------------------------------
  2. 1.7.10 Version:
  3. ---------------------------------------------------
  4.     public void onLivingUpdate()
  5.     {
  6.         for (int var1 = 0; var1 < 2; ++var1)
  7.         {
  8.             this.worldObj.spawnParticle("►►PARTICLENAME◄◄", this.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width, this.posY + this.rand.nextDouble() * (double)this.height, this.posZ + (this.rand.nextDouble() - 0.5D) * (double)this.width, 0.0D, 0.0D, 0.0D);
  9.         }
  10.  
  11.         super.onLivingUpdate();
  12.     }
  13.  
  14. ---------------------------------------------------
  15. 1.8 Version:
  16. ---------------------------------------------------
  17.  
  18.     public void onLivingUpdate()
  19.     {
  20.         if (!this.onGround && this.motionY < 0.0D)
  21.         {
  22.             this.motionY *= 0.6D;
  23.         }
  24.  
  25.         if (this.worldObj.isRemote)
  26.         {
  27.             if (this.rand.nextInt(24) == 0 && !this.isSlient())
  28.             {
  29.                 this.worldObj.playSound(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, "fire.fire", 1.0F + this.rand.nextFloat(), this.rand.nextFloat() * 0.7F + 0.3F, false);
  30.             }
  31.  
  32.             for (int var1 = 0; var1 < 2; ++var1)
  33.             {
  34.                 this.worldObj.spawnParticle(EnumParticleTypes.►►PARTICLE◄◄, this.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width, this.posY + this.rand.nextDouble() * (double)this.height, this.posZ + (this.rand.nextDouble() - 0.5D) * (double)this.width, 0.0D, 0.0D, 0.0D, new int[0]);
  35.             }
  36.         }
  37.  
  38.         super.onLivingUpdate();
  39.     }
Add Comment
Please, Sign In to add comment