From 6a48b3d2cb803c53f6205944ad5c6703b0f9e78f Mon Sep 17 00:00:00 2001 From: Aikar 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 6f4b46f..7803641 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -253,6 +253,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.3