Skip to content

Commit

Permalink
change targeting to use height/2 instead of getEyeHeight() of entitie…
Browse files Browse the repository at this point in the history
…s. (#7)
  • Loading branch information
Keridos authored Jan 4, 2025
1 parent cb5dd65 commit 424b9cb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public void updateEntity() {
double speedY = target instanceof EntityPlayerMP ? targetSpeedY : target.posY - target.prevPosY;
double speedZ = target instanceof EntityPlayerMP ? targetSpeedZ : target.posZ - target.prevPosZ;
double d0 = target.posX - projectile.posX;
double d1 = target.posY + (double) target.getEyeHeight() - projectile.posY;
double d1 = target.posY + (double) target.height / 2.0D - projectile.posY;
double d2 = target.posZ - projectile.posZ;
double dist = MathHelper.sqrt_double(d0 * d0 + d1 * d1 + d2 * d2);
float f1 = (float) dist * (0.2F * (getDistanceToEntity(target) * 0.04F));
Expand Down

0 comments on commit 424b9cb

Please sign in to comment.