summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft
diff options
context:
space:
mode:
authorafforess <afforess@gmail.com>2011-03-21 16:31:15 -0400
committerErik Broes <erikbroes@grum.nl>2011-03-23 18:43:08 +0100
commit69cbe7d22255ad9786ecbf698c3cb2d269596b16 (patch)
treed9466737659dc8f2f7434fb3cc74a54323e16763 /src/main/java/net/minecraft
parente8e7581446b5cb27b513932a81769921b9c9e1a7 (diff)
downloadcraftbukkit-69cbe7d22255ad9786ecbf698c3cb2d269596b16.tar
craftbukkit-69cbe7d22255ad9786ecbf698c3cb2d269596b16.tar.gz
craftbukkit-69cbe7d22255ad9786ecbf698c3cb2d269596b16.tar.lz
craftbukkit-69cbe7d22255ad9786ecbf698c3cb2d269596b16.tar.xz
craftbukkit-69cbe7d22255ad9786ecbf698c3cb2d269596b16.zip
Allow Vehicle Motion to save properly
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r--src/main/java/net/minecraft/server/Entity.java21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 303fa6c5..54cbe9cc 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -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;