From 233de0de2cc02150c57936b151981bd99ac2e8c6 Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Sun, 15 Jan 2012 12:54:58 +0100 Subject: [PATCH] Some efficiency updates to hit-mechanics. Thanks mintplant for the PR. --- src/main/java/net/minecraft/server/EntityArrow.java | 2 +- src/main/java/net/minecraft/server/EntityFireball.java | 2 +- src/main/java/net/minecraft/server/EntityFishingHook.java | 2 +- src/main/java/net/minecraft/server/EntityProjectile.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java index df19593640..ec883fa8b0 100644 --- a/src/main/java/net/minecraft/server/EntityArrow.java +++ b/src/main/java/net/minecraft/server/EntityArrow.java @@ -150,7 +150,7 @@ public class EntityArrow extends Entity { MovingObjectPosition movingobjectposition1 = axisalignedbb1.a(vec3d, vec3d1); if (movingobjectposition1 != null) { - double d1 = vec3d.b(movingobjectposition1.f); + double d1 = vec3d.c(movingobjectposition1.f); // CraftBukkit - distance efficiency if (d1 < d0 || d0 == 0.0D) { entity = entity1; diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java index d4b78e89fb..e507fb7b7e 100644 --- a/src/main/java/net/minecraft/server/EntityFireball.java +++ b/src/main/java/net/minecraft/server/EntityFireball.java @@ -114,7 +114,7 @@ public class EntityFireball extends Entity { MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1); if (movingobjectposition1 != null) { - double d1 = vec3d.b(movingobjectposition1.f); + double d1 = vec3d.c(movingobjectposition1.f); // CraftBukkit - distance efficiency if (d1 < d0 || d0 == 0.0D) { entity = entity1; diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java index cb985ead57..653c751eea 100644 --- a/src/main/java/net/minecraft/server/EntityFishingHook.java +++ b/src/main/java/net/minecraft/server/EntityFishingHook.java @@ -175,7 +175,7 @@ public class EntityFishingHook extends Entity { MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1); if (movingobjectposition1 != null) { - d5 = vec3d.b(movingobjectposition1.f); + d5 = vec3d.c(movingobjectposition1.f); // CraftBukkit - distance efficiency if (d5 < d4 || d4 == 0.0D) { entity = entity1; d4 = d5; diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java index 6306fc3626..152340e317 100644 --- a/src/main/java/net/minecraft/server/EntityProjectile.java +++ b/src/main/java/net/minecraft/server/EntityProjectile.java @@ -137,7 +137,7 @@ public abstract class EntityProjectile extends Entity { MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1); if (movingobjectposition1 != null) { - double d1 = vec3d.b(movingobjectposition1.f); + double d1 = vec3d.c(movingobjectposition1.f); // CraftBukkit - distance efficiency if (d1 < d0 || d0 == 0.0D) { entity = entity1;