Advertisement
Guest User

Untitled

a guest
May 20th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.40 KB | None | 0 0
  1.     @Override
  2.     public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn) {
  3.         super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
  4.         reset();
  5.         if ((entityIn instanceof EntityEasternBluebird)) {
  6.             EntityEasternBluebird bluebird = (EntityEasternBluebird)entityIn;
  7.  
  8.             float globalSpeed = 1.5f;
  9.             float globalDegree = 1.25F;
  10.  
  11.             if(!bluebird.isSleeping()) {
  12.                 this.rightleg.rotateAngleX = MathHelper.cos(limbSwing * 0.5f * globalSpeed) * 0.5f * globalDegree * 1 * limbSwingAmount + 0f * 0.5f;
  13.                 this.leftleg.rotateAngleX = MathHelper.cos(limbSwing * 0.5f * globalSpeed) * 0.5f * globalDegree * -1 * limbSwingAmount + 0f * 0.5f;
  14.                 this.shape13.rotateAngleX = MathHelper.cos(limbSwing * 0.8f * globalSpeed) * 0.05f * globalDegree * -1 * limbSwingAmount - 0.7F * 0.5f;
  15.                 this.body2.rotateAngleX = MathHelper.cos(limbSwing * 0.8f * globalSpeed) * 0.1f * globalDegree * -1 * limbSwingAmount + 0 * 0.5f;
  16.  
  17.  
  18.                 this.body2.rotateAngleX = MathHelper.cos(bluebird.ticksExisted * 0.17f) * 0.05F * 1 * 0.5f - 0.25F * 0.5f;
  19.                 this.head.rotateAngleX = MathHelper.cos(bluebird.ticksExisted * 0.2f) * 0.06F * 1 * 0.5f + 1.25F * 0.5f;
  20.                 this.rightwing.rotateAngleX = MathHelper.cos(bluebird.ticksExisted * 0.17f) * 0.03F * -1 * 0.5f;
  21.                 this.rightwing_1.rotateAngleX = MathHelper.cos(bluebird.ticksExisted * 0.17f) * 0.03F * -1 * 0.5f;
  22.  
  23.                 if (!bluebird.onGround && !bluebird.isInWater() && !bluebird.isChild()) {
  24.                     interpolateToPose(PosesUtil.EASTERN_BLUEBIRD_FLYING_POSE, bluebird.timer);
  25.  
  26.                     this.rightwing.rotateAngleX = MathHelper.cos(bluebird.ticksExisted * 0.6f * globalSpeed + 0) * 0.2f * globalDegree * -1 * 0.5f - 2.5F * 0.5f;
  27.                     this.rightwing_1.rotateAngleX = MathHelper.cos(bluebird.ticksExisted * 0.6f * globalSpeed + 0) * 0.2f * globalDegree * -1 * 0.5f - 2.5F * 0.5f;
  28.                     this.rightwing.rotateAngleZ = MathHelper.cos(bluebird.ticksExisted * 0.3f * globalSpeed + 0) * 0.4f * globalDegree * -1 * 0.5f + 3F * 0.5f;
  29.                     this.rightwing_1.rotateAngleZ = MathHelper.cos(bluebird.ticksExisted * 0.3f * globalSpeed + 0) * 0.4f * globalDegree * 1 * 0.5f - 3F * 0.5f;
  30.                     this.rightwing2.rotateAngleY = MathHelper.cos(bluebird.ticksExisted * 0.3f * globalSpeed + 0) * 0.4f * globalDegree * 1 * 0.5f + 0 * 0.5f;
  31.                     this.rightwing2_1.rotateAngleY = MathHelper.cos(bluebird.ticksExisted * 0.3f * globalSpeed + 0) * 0.4f * globalDegree * -1 * 0.5f + 0 * 0.5f;
  32.                 }
  33.             }
  34.             else{
  35.                 interpolateToPose(PosesUtil.EASTERN_BLUEBIRD_SLEEPING_POSE, bluebird.timer);
  36.  
  37.                 this.body2.rotateAngleX = MathHelper.cos(bluebird.ticksExisted * 0.17f) * 0.05F * 1 * 0.5f - 0.25F * 0.5f;
  38.                 this.head.rotateAngleX = MathHelper.cos(bluebird.ticksExisted * 0.2f) * 0.06F * 1 * 0.5f + 1.25F * 0.5f;
  39.                 this.rightwing.rotateAngleX = MathHelper.cos(bluebird.ticksExisted * 0.17f) * 0.03F * -1 * 0.5f;
  40.                 this.rightwing_1.rotateAngleX = MathHelper.cos(bluebird.ticksExisted * 0.17f) * 0.03F * -1 * 0.5f;
  41.             }
  42.         }
  43.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement