3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 04:20:08 +01:00

SPIGOT-2364: Fix hanging placing.

Dieser Commit ist enthalten in:
md_5 2016-06-09 14:27:59 +10:00
Ursprung 885f4dce9e
Commit b2f31b74d0

Datei anzeigen

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