summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
diff options
context:
space:
mode:
authorsk89q <the.sk89q@gmail.com>2011-05-23 19:42:30 -0700
committersk89q <the.sk89q@gmail.com>2011-05-23 19:42:30 -0700
commitf463453d73249fe73cf3e23ed37e6cee870c8bf4 (patch)
treee13f38b335709a75e875683d94fc6f65a3c02e9b /src/main/java/net
parent3cd135b08d503b367e42f1637b8c182ad75c7981 (diff)
downloadcraftbukkit-f463453d73249fe73cf3e23ed37e6cee870c8bf4.tar
craftbukkit-f463453d73249fe73cf3e23ed37e6cee870c8bf4.tar.gz
craftbukkit-f463453d73249fe73cf3e23ed37e6cee870c8bf4.tar.lz
craftbukkit-f463453d73249fe73cf3e23ed37e6cee870c8bf4.tar.xz
craftbukkit-f463453d73249fe73cf3e23ed37e6cee870c8bf4.zip
Fixed issue where the Bukkit entity was detected before the entirety of the entity's NBT data was read, causing affected entity types to not be differentiated correctly.
Diffstat (limited to 'src/main/java/net')
-rw-r--r--src/main/java/net/minecraft/server/Entity.java32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 540c1f70..9bc5eb2c 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -882,22 +882,6 @@ public abstract class Entity {
this.motY = ((NBTTagDouble) nbttaglist1.a(1)).a;
this.motZ = ((NBTTagDouble) nbttaglist1.a(2)).a;
- // CraftBukkit start - Exempt Vehicles from notch's sanity check
- if (!(this.getBukkitEntity() instanceof CraftVehicle)) {
- if (Math.abs(this.motX) > 10.0D) {
- this.motX = 0.0D;
- }
-
- if (Math.abs(this.motY) > 10.0D) {
- this.motY = 0.0D;
- }
-
- if (Math.abs(this.motZ) > 10.0D) {
- this.motZ = 0.0D;
- }
- }
- // CraftBukkit end
-
this.lastX = this.bk = this.locX = ((NBTTagDouble) nbttaglist.a(0)).a;
this.lastY = this.bl = this.locY = ((NBTTagDouble) nbttaglist.a(1)).a;
this.lastZ = this.bm = this.locZ = ((NBTTagDouble) nbttaglist.a(2)).a;
@@ -928,6 +912,22 @@ public abstract class Entity {
this.setPosition(this.locX, this.locY, this.locZ);
this.a(nbttagcompound);
+
+ // CraftBukkit start - Exempt Vehicles from notch's sanity check
+ if (!(this.getBukkitEntity() instanceof CraftVehicle)) {
+ if (Math.abs(this.motX) > 10.0D) {
+ this.motX = 0.0D;
+ }
+
+ if (Math.abs(this.motY) > 10.0D) {
+ this.motY = 0.0D;
+ }
+
+ if (Math.abs(this.motZ) > 10.0D) {
+ this.motZ = 0.0D;
+ }
+ }
+ // CraftBukkit end
}
protected final String ac() {