Skip to content

Commit

Permalink
Fix feral wolf tail on low health and add wagging
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmeow committed Dec 22, 2019
1 parent 2c41051 commit e6847e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,11 @@ public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageI
if (entity instanceof EntityFeralWolf) {
EntityFeralWolf wolf = (EntityFeralWolf) entity;
this.tail01.rotateAngleX = ageInTicks + (wolf.isSitting() ? 1.7453292519943295F : 0.6981317007977318F);
if(!wolf.isTamed()) {
this.tail01.rotateAngleY = 0.0F;
} else {
this.tail01.rotateAngleY = MathHelper.cos(limbSwing * 0.6662F) * 1.1F * limbSwingAmount;
}
if(wolf.isSitting()) {
sit = true;
this.setRotateAngle(rHindPaw, 1.3089969389957472F, 0.20943951023931953F, 0.0F);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,7 @@ public boolean processInteract(EntityPlayer player, EnumHand hand) {

@SideOnly(Side.CLIENT)
public float getTailRotation() {
if (!this.isTamed()) {
return -0.15F;
} else {
return this.isTamed() ? (0.25F - (this.getMaxHealth() - this.dataManager.get(DATA_HEALTH_ID).floatValue()) * 0.04F) : -0.85F;
}
return this.isTamed() ? (1F - (this.getMaxHealth() - this.dataManager.get(DATA_HEALTH_ID).floatValue()) * 0.04F) : 0.25F;
}

@Override
Expand Down

0 comments on commit e6847e0

Please sign in to comment.