From 13f55ce0c8b5e7ac86c6f0ad50d7cb1f5b796976 Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Thu, 24 Feb 2011 15:46:26 +0000 Subject: [PATCH] Fixed logging back in on non-default worlds (Yes really) --- src/main/java/net/minecraft/server/Entity.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index 5f73ab4642..4e228e8274 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -849,8 +849,13 @@ public abstract class Entity { String worldName = nbttagcompound.i("World"); for (WorldServer world: ((WorldServer) this.world).getServer().getServer().worlds) { - if (world.q.j.equals(worldName)) { + if ((world.q.j.equals(worldName)) && (world != this.world)) { this.world = world; + if (this instanceof EntityHuman) { + EntityPlayer player = (EntityPlayer)this; + player.c = new ItemInWorldManager(world); + player.c.a = player; + } break; } }