mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 11:18:23 +01:00
Allow Vehicle Motion to save properly
This commit is contained in:
parent
e8e7581446
commit
69cbe7d222
1 changed files with 13 additions and 8 deletions
|
@ -822,17 +822,22 @@ public abstract class Entity {
|
|||
this.motX = ((NBTTagDouble) nbttaglist1.a(0)).a;
|
||||
this.motY = ((NBTTagDouble) nbttaglist1.a(1)).a;
|
||||
this.motZ = ((NBTTagDouble) nbttaglist1.a(2)).a;
|
||||
if (Math.abs(this.motX) > 10.0D) {
|
||||
this.motX = 0.0D;
|
||||
}
|
||||
//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.motY) > 10.0D) {
|
||||
this.motY = 0.0D;
|
||||
}
|
||||
|
||||
if (Math.abs(this.motZ) > 10.0D) {
|
||||
this.motZ = 0.0D;
|
||||
if (Math.abs(this.motZ) > 10.0D) {
|
||||
this.motZ = 0.0D;
|
||||
}
|
||||
}
|
||||
//CraftBukkit End
|
||||
|
||||
this.lastX = this.bi = this.locX = ((NBTTagDouble) nbttaglist.a(0)).a;
|
||||
this.lastY = this.bj = this.locY = ((NBTTagDouble) nbttaglist.a(1)).a;
|
||||
|
|
Loading…
Add table
Reference in a new issue