Allow Vehicle Motion to save properly

Dieser Commit ist enthalten in:
afforess 2011-03-21 16:31:15 -04:00 committet von Erik Broes
Ursprung e8e7581446
Commit 69cbe7d222

Datei anzeigen

@ -822,17 +822,22 @@ public abstract class Entity {
this.motX = ((NBTTagDouble) nbttaglist1.a(0)).a; this.motX = ((NBTTagDouble) nbttaglist1.a(0)).a;
this.motY = ((NBTTagDouble) nbttaglist1.a(1)).a; this.motY = ((NBTTagDouble) nbttaglist1.a(1)).a;
this.motZ = ((NBTTagDouble) nbttaglist1.a(2)).a; this.motZ = ((NBTTagDouble) nbttaglist1.a(2)).a;
if (Math.abs(this.motX) > 10.0D) { //CraftBukkit Start
this.motX = 0.0D; //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) { if (Math.abs(this.motY) > 10.0D) {
this.motY = 0.0D; this.motY = 0.0D;
} }
if (Math.abs(this.motZ) > 10.0D) { if (Math.abs(this.motZ) > 10.0D) {
this.motZ = 0.0D; this.motZ = 0.0D;
}
} }
//CraftBukkit End
this.lastX = this.bi = this.locX = ((NBTTagDouble) nbttaglist.a(0)).a; this.lastX = this.bi = this.locX = ((NBTTagDouble) nbttaglist.a(0)).a;
this.lastY = this.bj = this.locY = ((NBTTagDouble) nbttaglist.a(1)).a; this.lastY = this.bj = this.locY = ((NBTTagDouble) nbttaglist.a(1)).a;