From ac899e51c1ce8511642e3bccf184e1ee401b4149 Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Sat, 5 Feb 2011 21:26:58 +0000 Subject: [PATCH] Possibly fixed world leaks (mobs crossing into other worlds) --- src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 1465e94296..01ab8e6701 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -4,6 +4,7 @@ import java.net.InetSocketAddress; import java.net.SocketAddress; import net.minecraft.server.EntityHuman; import net.minecraft.server.EntityPlayer; +import net.minecraft.server.ItemInWorldManager; import net.minecraft.server.Packet; import net.minecraft.server.Packet3Chat; import net.minecraft.server.Packet6SpawnPosition; @@ -123,6 +124,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (worldChange) { // Forceload the chunks around player server.getServer().f.d.a(entity); + entity.c = new ItemInWorldManager(((CraftWorld)location.getWorld()).getHandle()); } } }