public void renderParticle(
     VertexBuffer worldRendererIn,
     Entity entityIn,
     float partialTicks,
     float rotationX,
     float rotationZ,
     float rotationYZ,
     float rotationXY,
     float rotationXZ) {
   float f = ((float) this.particleAge + partialTicks) / (float) this.particleMaxAge * 32.0F;
   f = MathHelper.clamp_float(f, 0.0F, 1.0F);
   this.particleScale = this.smokeParticleScale * f;
   super.renderParticle(
       worldRendererIn,
       entityIn,
       partialTicks,
       rotationX,
       rotationZ,
       rotationYZ,
       rotationXY,
       rotationXZ);
 }
示例#2
0
 public static float calcAttackSpeedMod(EntityLivingBase entity) {
   int ticks = StatsUtil.getAttackTimer(entity);
   float scale = MathHelper.clamp_float((ticks + 0.5F) / getAttackCooldown(entity), 0.0F, 1.0F);
   return 0.2F + scale * scale * 0.8F;
 }