Paper/Spigot-Server-Patches/0077-Process-Entity-Chunk-Registration-on-Teleport.patch

23 Zeilen
1.1 KiB
Diff

2016-02-05 11:12:16 +01:00
From d847896561ec7e88530d2561b353c5d181349115 Mon Sep 17 00:00:00 2001
2016-01-04 07:23:17 +01:00
From: Aikar <aikar@aikar.co>
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 efbf1a8..5df3476 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -243,6 +243,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); // PaperSpigot - Fix issues with entities not being switched to their new chunk
// entity.setLocation() throws no event, and so cannot be cancelled
return true;
}
--
2016-02-05 11:12:16 +01:00
2.7.0.windows.2
2016-01-04 07:23:17 +01:00