diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-09-25 16:09:22 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-09-28 14:46:30 -0500 |
commit | 244a39d2097248881a6e3caa63e443bb308290d7 (patch) | |
tree | 6978be5afdfd6f355d8ec99a959e925f0dca3664 /src/main/java | |
parent | fc0e35a67c389bd1e7477460eeafcbaacf736d19 (diff) | |
download | craftbukkit-244a39d2097248881a6e3caa63e443bb308290d7.tar craftbukkit-244a39d2097248881a6e3caa63e443bb308290d7.tar.gz craftbukkit-244a39d2097248881a6e3caa63e443bb308290d7.tar.lz craftbukkit-244a39d2097248881a6e3caa63e443bb308290d7.tar.xz craftbukkit-244a39d2097248881a6e3caa63e443bb308290d7.zip |
Use this world instead of the one in the entity. Fixes BUKKIT-2315
In some situations an entity or tile entity can be added to the world but
have its own 'world' field be null or otherwise incorrect. As the entity
was added to this world to be ticked assume it actually is in this world.
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/net/minecraft/server/World.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index da8fffd4..311be0e7 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1064,7 +1064,7 @@ public abstract class World implements IBlockAccess { continue; } - ChunkProviderServer chunkProviderServer = ((WorldServer) entity.world).chunkProviderServer; + ChunkProviderServer chunkProviderServer = ((WorldServer) this).chunkProviderServer; if (chunkProviderServer.unloadQueue.contains(MathHelper.floor(entity.locX) >> 4, MathHelper.floor(entity.locZ) >> 4)) { continue; } @@ -1105,7 +1105,7 @@ public abstract class World implements IBlockAccess { entity = (Entity) this.entityList.get(i); // CraftBukkit start - don't tick entities in chunks queued for unload - ChunkProviderServer chunkProviderServer = ((WorldServer) entity.world).chunkProviderServer; + ChunkProviderServer chunkProviderServer = ((WorldServer) this).chunkProviderServer; if (chunkProviderServer.unloadQueue.contains(MathHelper.floor(entity.locX) >> 4, MathHelper.floor(entity.locZ) >> 4)) { continue; } @@ -1149,7 +1149,7 @@ public abstract class World implements IBlockAccess { TileEntity tileentity = (TileEntity) iterator.next(); // CraftBukkit start - don't tick entities in chunks queued for unload - ChunkProviderServer chunkProviderServer = ((WorldServer) tileentity.world).chunkProviderServer; + ChunkProviderServer chunkProviderServer = ((WorldServer) this).chunkProviderServer; if (chunkProviderServer.unloadQueue.contains(tileentity.x >> 4, tileentity.z >> 4)) { continue; } |