diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-11-20 00:01:14 -0800 |
---|---|---|
committer | Erik Broes <erikbroes@ripe.net> | 2011-11-20 00:01:33 -0800 |
commit | 345ea36c7bb3383c6e4825355d0043a646194eaa (patch) | |
tree | df116b57d92315c0a13c2fdc87d792b031c7239a /src/main/java/net/minecraft/server/WorldServer.java | |
parent | 589f66bd1b766dc1fdd737ee885304196a2ed86a (diff) | |
download | craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.gz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.lz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.tar.xz craftbukkit-345ea36c7bb3383c6e4825355d0043a646194eaa.zip |
Update for 1.0.0
Diffstat (limited to 'src/main/java/net/minecraft/server/WorldServer.java')
-rw-r--r-- | src/main/java/net/minecraft/server/WorldServer.java | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java index add4647d..66b1cb38 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -20,7 +20,7 @@ public class WorldServer extends World implements BlockChangeDelegate { public boolean weirdIsOpCache = false; public boolean savingDisabled; public final MinecraftServer server; // CraftBukkit - private -> public final - private EntityList Q = new EntityList(); + private EntityList N = new EntityList(); // CraftBukkit start - change signature public WorldServer(MinecraftServer minecraftserver, IDataManager idatamanager, String s, int i, WorldSettings worldsettings, org.bukkit.World.Environment env, ChunkGenerator gen) { @@ -159,16 +159,30 @@ public class WorldServer extends World implements BlockChangeDelegate { protected void c(Entity entity) { super.c(entity); - this.Q.a(entity.id, entity); + this.N.a(entity.id, entity); + Entity[] aentity = entity.aG(); + + if (aentity != null) { + for (int i = 0; i < aentity.length; ++i) { + this.N.a(aentity[i].id, aentity[i]); + } + } } protected void d(Entity entity) { super.d(entity); - this.Q.d(entity.id); + this.N.d(entity.id); + Entity[] aentity = entity.aG(); + + if (aentity != null) { + for (int i = 0; i < aentity.length; ++i) { + this.N.d(aentity[i].id); + } + } } public Entity getEntity(int i) { - return (Entity) this.Q.a(i); + return (Entity) this.N.a(i); } public boolean strikeLightning(Entity entity) { @@ -224,11 +238,11 @@ public class WorldServer extends World implements BlockChangeDelegate { this.B.e(); } - protected void h() { - boolean flag = this.u(); + protected void i() { + boolean flag = this.w(); - super.h(); - if (flag != this.u()) { + super.i(); + if (flag != this.w()) { // CraftBukkit start - only sending weather packets to those affected for (int i = 0; i < this.players.size(); ++i) { if (((EntityPlayer) this.players.get(i)).world == this) { |