mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-24 18:07:39 +01:00
05466e3b47
Upstream has released updates that appear to apply compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing. Bukkit Changes: d2834556 SPIGOT-4219: Event for PigZombies angering. CraftBukkit Changes:a9c796f1
SPIGOT-4184: Fix furnaces not matching Vanilla smelt or animations195f071e
SPIGOT-4219: Event for PigZombies angering.5e3082c7
SPIGOT-4230: Improve legacy block types
56 lines
2.8 KiB
Diff
56 lines
2.8 KiB
Diff
From 6a67e26019ad94f74dc2f1a9d6b92cf4930f8f68 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 6b0ca4eb98..68b4a902eb 100644
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
@@ -340,6 +340,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
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;
|
|
|
|
@@ -938,6 +939,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
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
|
|
}
|
|
|
|
protected SoundEffect ad() {
|
|
diff --git a/src/main/java/net/minecraft/server/EntityLeash.java b/src/main/java/net/minecraft/server/EntityLeash.java
|
|
index f2d3d0b4c7..f20060614d 100644
|
|
--- 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
|
|
index 95c6cd8971..bc11e7da2b 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityShulker.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityShulker.java
|
|
@@ -385,6 +385,7 @@ public class EntityShulker extends EntityGolem implements IMonster {
|
|
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;
|
|
--
|
|
2.18.0
|
|
|