Skip to content

Commit

Permalink
add fix to tameable animals too
Browse files Browse the repository at this point in the history
  • Loading branch information
demonlexe committed Aug 22, 2024
1 parent dad67e6 commit b025cda
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public boolean attackEntityFrom(DamageSource damagesource, float i) {
return false;
}

return super.attackEntityFrom(damagesource, i);
return (this.isBeingRidden() && entity != null && this.isRidingOrBeingRiddenBy(entity)) ? false : super.attackEntityFrom(damagesource, i);
}

private boolean checkOwnership(EntityPlayer player, EnumHand hand) {
Expand Down

0 comments on commit b025cda

Please sign in to comment.