2018-08-26 20:11:49 +02:00
|
|
|
From 45c2e68e9628f6f94d284c5c84138f928f112aad Mon Sep 17 00:00:00 2001
|
2018-07-29 18:10:20 +02:00
|
|
|
From: Aikar <aikar@aikar.co>
|
|
|
|
Date: Sun, 29 Jul 2018 11:58:05 -0400
|
|
|
|
Subject: [PATCH] Always process chunk registration after moving
|
|
|
|
|
|
|
|
This will help guarantee that entities are always in the
|
|
|
|
chunk that they are currently located at.
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
2018-08-26 20:11:49 +02:00
|
|
|
index e558197623..f5e66aaf90 100644
|
2018-07-29 18:10:20 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
2018-08-26 20:11:49 +02:00
|
|
|
@@ -341,6 +341,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
2018-07-29 18:10:20 +02:00
|
|
|
this.locX = d0;
|
|
|
|
this.locY = d1;
|
|
|
|
this.locZ = d2;
|
|
|
|
+ if (valid) world.entityJoinedWorld(this, false); // Paper - ensure Entity is moved to its proper chunk
|
|
|
|
float f = this.width / 2.0F;
|
|
|
|
float f1 = this.length;
|
|
|
|
|
2018-08-26 20:11:49 +02:00
|
|
|
@@ -935,6 +936,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
2018-07-29 18:10:20 +02:00
|
|
|
this.locX = (axisalignedbb.a + axisalignedbb.d) / 2.0D;
|
|
|
|
this.locY = axisalignedbb.b;
|
|
|
|
this.locZ = (axisalignedbb.c + axisalignedbb.f) / 2.0D;
|
|
|
|
+ if (valid) world.entityJoinedWorld(this, false); // Paper - ensure Entity is moved to its proper chunk
|
|
|
|
}
|
|
|
|
|
2018-07-29 19:12:39 +02:00
|
|
|
protected SoundEffect ad() {
|
2018-07-29 18:10:20 +02:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityLeash.java b/src/main/java/net/minecraft/server/EntityLeash.java
|
2018-08-26 20:11:49 +02:00
|
|
|
index f2d3d0b4c7..f20060614d 100644
|
2018-07-29 18:10:20 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityLeash.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityLeash.java
|
|
|
|
@@ -31,6 +31,7 @@ public class EntityLeash extends EntityHanging {
|
|
|
|
this.locX = (double) this.blockPosition.getX() + 0.5D;
|
|
|
|
this.locY = (double) this.blockPosition.getY() + 0.5D;
|
|
|
|
this.locZ = (double) this.blockPosition.getZ() + 0.5D;
|
|
|
|
+ if (valid) world.entityJoinedWorld(this, false); // Paper - ensure Entity is moved to its proper chunk
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setDirection(EnumDirection enumdirection) {}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityShulker.java b/src/main/java/net/minecraft/server/EntityShulker.java
|
2018-08-26 20:11:49 +02:00
|
|
|
index 24de5f0172..06e51d5b81 100644
|
2018-07-29 18:10:20 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityShulker.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityShulker.java
|
2018-07-29 19:12:39 +02:00
|
|
|
@@ -385,6 +385,7 @@ public class EntityShulker extends EntityGolem implements IMonster {
|
2018-07-29 18:10:20 +02:00
|
|
|
this.locX = (double) blockposition.getX() + 0.5D;
|
|
|
|
this.locY = (double) blockposition.getY();
|
|
|
|
this.locZ = (double) blockposition.getZ() + 0.5D;
|
|
|
|
+ if (valid) world.entityJoinedWorld(this, false); // Paper - ensure Entity is moved to its proper chunk
|
|
|
|
this.lastX = this.locX;
|
|
|
|
this.lastY = this.locY;
|
|
|
|
this.lastZ = this.locZ;
|
|
|
|
--
|
2018-08-06 00:55:03 +02:00
|
|
|
2.18.0
|
2018-07-29 18:10:20 +02:00
|
|
|
|