From aedab4b5515e061fdfef7ff38601e65e02f1e562 Mon Sep 17 00:00:00 2001 From: Iceee Date: Sun, 22 Jun 2014 15:47:53 -0500 Subject: [PATCH] Fix movement inconsistencies --- .../0163-Fix-movement-inconsistencies.patch | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 CraftBukkit-Patches/0163-Fix-movement-inconsistencies.patch diff --git a/CraftBukkit-Patches/0163-Fix-movement-inconsistencies.patch b/CraftBukkit-Patches/0163-Fix-movement-inconsistencies.patch new file mode 100644 index 000000000..c619bdf4f --- /dev/null +++ b/CraftBukkit-Patches/0163-Fix-movement-inconsistencies.patch @@ -0,0 +1,127 @@ +From aa51482ccd261d9a7044055016f91a17bdaa5041 Mon Sep 17 00:00:00 2001 +From: Iceee +Date: Thu, 12 Jun 2014 03:18:13 -0500 +Subject: [PATCH] Fix movement inconsistencies + + +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 57861a9..2b78287 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -525,41 +525,85 @@ public abstract class Entity { + + List list = this.world.getCubes(this, this.boundingBox.a(d0, d1, d2)); + +- for (int i = 0; i < list.size(); ++i) { +- d1 = ((AxisAlignedBB) list.get(i)).b(this.boundingBox, d1); +- } ++ // PaperSpigot start - Fix movement inconsistencies ++ boolean flag1; + +- this.boundingBox.d(0.0D, d1, 0.0D); +- if (!this.J && d7 != d1) { +- d2 = 0.0D; +- d1 = 0.0D; +- d0 = 0.0D; +- } ++ if(this.motZ > this.motX) { + +- boolean flag1 = this.onGround || d7 != d1 && d7 < 0.0D; ++ for (int i = 0; i < list.size(); ++i) { ++ d1 = ((AxisAlignedBB) list.get(i)).b(this.boundingBox, d1); ++ } + +- int j; ++ this.boundingBox.d(0.0D, d1, 0.0D); ++ if (!this.J && d7 != d1) { ++ d2 = 0.0D; ++ d1 = 0.0D; ++ d0 = 0.0D; ++ } + +- for (j = 0; j < list.size(); ++j) { +- d0 = ((AxisAlignedBB) list.get(j)).a(this.boundingBox, d0); +- } ++ flag1 = this.onGround || d7 != d1 && d7 < 0.0D; + +- this.boundingBox.d(d0, 0.0D, 0.0D); +- if (!this.J && d6 != d0) { +- d2 = 0.0D; +- d1 = 0.0D; +- d0 = 0.0D; +- } ++ int j; + +- for (j = 0; j < list.size(); ++j) { +- d2 = ((AxisAlignedBB) list.get(j)).c(this.boundingBox, d2); +- } ++ for (j = 0; j < list.size(); ++j) { ++ d0 = ((AxisAlignedBB) list.get(j)).a(this.boundingBox, d0); ++ } + +- this.boundingBox.d(0.0D, 0.0D, d2); +- if (!this.J && d8 != d2) { +- d2 = 0.0D; +- d1 = 0.0D; +- d0 = 0.0D; ++ this.boundingBox.d(d0, 0.0D, 0.0D); ++ if (!this.J && d6 != d0) { ++ d2 = 0.0D; ++ d1 = 0.0D; ++ d0 = 0.0D; ++ } ++ ++ for (j = 0; j < list.size(); ++j) { ++ d2 = ((AxisAlignedBB) list.get(j)).c(this.boundingBox, d2); ++ } ++ ++ this.boundingBox.d(0.0D, 0.0D, d2); ++ if (!this.J && d8 != d2) { ++ d2 = 0.0D; ++ d1 = 0.0D; ++ d0 = 0.0D; ++ } ++ } else { ++ for (int i = 0; i < list.size(); ++i) { ++ d1 = ((AxisAlignedBB) list.get(i)).b(this.boundingBox, d1); ++ } ++ ++ this.boundingBox.d(0.0D, d1, 0.0D); ++ if (!this.J && d7 != d1) { ++ d2 = 0.0D; ++ d1 = 0.0D; ++ d0 = 0.0D; ++ } ++ ++ flag1 = this.onGround || d7 != d1 && d7 < 0.0D; ++ ++ int j; ++ ++ for (j = 0; j < list.size(); ++j) { ++ d2 = ((AxisAlignedBB) list.get(j)).c(this.boundingBox, d2); ++ } ++ ++ this.boundingBox.d(0.0D, 0.0D, d2); ++ if (!this.J && d8 != d2) { ++ d2 = 0.0D; ++ d1 = 0.0D; ++ d0 = 0.0D; ++ } ++ ++ for (j = 0; j < list.size(); ++j) { ++ d0 = ((AxisAlignedBB) list.get(j)).a(this.boundingBox, d0); ++ } ++ ++ this.boundingBox.d(d0, 0.0D, 0.0D); ++ if (!this.J && d6 != d0) { ++ d2 = 0.0D; ++ d1 = 0.0D; ++ d0 = 0.0D; ++ } ++ // PaperSpigot end + } + + double d10; +-- +1.9.1 +