From 0875e3ee25ee52ca2a1edf7538827150e9acd3a0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 4 Jan 2016 00:23:17 -0600 Subject: [PATCH] Entity teleport fix --- ...ntity-Chunk-Registration-on-Teleport.patch | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Spigot-Server-Patches/Process-Entity-Chunk-Registration-on-Teleport.patch diff --git a/Spigot-Server-Patches/Process-Entity-Chunk-Registration-on-Teleport.patch b/Spigot-Server-Patches/Process-Entity-Chunk-Registration-on-Teleport.patch new file mode 100644 index 0000000000..87723b7b6d --- /dev/null +++ b/Spigot-Server-Patches/Process-Entity-Chunk-Registration-on-Teleport.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Mon, 4 Jan 2016 00:16:08 -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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java ++++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +@@ -0,0 +0,0 @@ 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); // PaperSpigot - Fix issues with entities not being switched to their new chunk + // entity.setLocation() throws no event, and so cannot be cancelled + return true; + } +-- \ No newline at end of file