SPIGOT-2364: Fix hanging placing.

This commit is contained in:
md_5 2016-06-09 14:27:59 +10:00
parent 885f4dce9e
commit b2f31b74d0

View File

@ -12,7 +12,7 @@
public abstract class EntityHanging extends Entity {
private static final Predicate<Entity> c = new Predicate() {
@@ -41,39 +46,44 @@
@@ -41,39 +46,48 @@
this.updateBoundingBox();
}
@ -45,7 +45,11 @@
+
+ d0 += d4 * (double) enumdirection.getAdjacentX();
+ d2 += d4 * (double) enumdirection.getAdjacentZ();
+
+ if (entity != null) {
+ entity.locX = d0;
+ entity.locY = d1;
+ entity.locZ = d2;
+ }
+ double d6 = (double) width;
+ double d7 = (double) height;
+ double d8 = (double) width;
@ -88,7 +92,7 @@
}
}
@@ -88,6 +98,24 @@
@@ -88,6 +102,24 @@
if (this.d++ == 100 && !this.world.isClientSide) {
this.d = 0;
if (!this.dead && !this.survives()) {
@ -113,7 +117,7 @@
this.die();
this.a((Entity) null);
}
@@ -140,6 +168,21 @@
@@ -140,6 +172,21 @@
return false;
} else {
if (!this.dead && !this.world.isClientSide) {
@ -135,7 +139,7 @@
this.die();
this.ap();
this.a(damagesource.getEntity());
@@ -151,6 +194,18 @@
@@ -151,6 +198,18 @@
public void move(double d0, double d1, double d2) {
if (!this.world.isClientSide && !this.dead && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) {
@ -154,7 +158,7 @@
this.die();
this.a((Entity) null);
}
@@ -158,7 +213,7 @@
@@ -158,7 +217,7 @@
}
public void g(double d0, double d1, double d2) {