Paper/Spigot-Server-Patches/0056-Process-Entity-Chunk-Registration-on-Teleport.patch
Zach Brown 30f02fe6e5 Fix the end credits toggle
I think its pretty clear that no one uses this given that it didn't work at all before
2016-03-16 02:41:38 -05:00

23 lines
1.1 KiB
Diff

From cb3407e5a1d00eda5f97d2f12625ba0d418c93e9 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 00:12:23 -0600
Subject: [PATCH] Process Entity Chunk Registration on Teleport
Fixes many issues with entities not being properly "switched" to their new chunk on teleport
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index f80ac2c..3d9a454 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -252,6 +252,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
// entity.world = ((CraftWorld) location.getWorld()).getHandle();
// Spigot end
entity.setLocation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
+ entity.world.entityJoinedWorld(entity, false); // Paper - Fix issues with entities not being switched to their new chunk
// entity.setLocation() throws no event, and so cannot be cancelled
return true;
}
--
2.7.2