3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-16 04:50:05 +01:00
Paper/Spigot-Server-Patches/0315-Always-process-chunk-registration-after-moving.patch
Aikar 835bc39b03
Paper 1.13.1 Update
Updated Upstream (Bukkit/CraftBukkit/Spigot)

Bukkit Changes:
2dcc44dc SPIGOT-4307: Fix hacky API for banners on shields
e0fc6572 SPIGOT-4309: Add "forced" display of particles
efeeab2f Add index to README.md for easier navigation
f502bc6f Update to Minecraft 1.13.1

CraftBukkit Changes:
d0bb0a1d Fix some tests randomly failing
997d378d Fix client stall in specific teleportation scenarios
b3dc2366 SPIGOT-4307: Fix hacky API for banners on shields
2a271162 SPIGOT-4301: Fix more invalid enchants
5d0d83bb SPIGOT-4309: Add "forced" display of particles
a6772578 Add additional tests for CraftBlockData
ce1af0c3 Update to Minecraft 1.13.1

Spigot Changes:
2440e189 Rebuild patches
4ecffced Update to Minecraft 1.13.1
2018-08-26 20:51:39 -04:00

56 Zeilen
2.8 KiB
Diff

From 45c2e68e9628f6f94d284c5c84138f928f112aad 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 e558197623..f5e66aaf90 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -341,6 +341,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;
@@ -935,6 +936,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 24de5f0172..06e51d5b81 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