summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/minecraft/server/Entity.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 5f73ab46..4e228e82 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;
}
}