Implemented 1.0.1 fixes. This fixes BUKKIT-3, BUKKIT-39, BUKKIT-150

This commit is contained in:
Nathan Adams
2011-12-01 21:43:54 +00:00
parent 650717ad32
commit 062d94d6bc
4 changed files with 18 additions and 7 deletions

View File

@@ -20,12 +20,15 @@ public class WorldServer extends World implements BlockChangeDelegate {
public boolean weirdIsOpCache = false;
public boolean savingDisabled;
public final MinecraftServer server; // CraftBukkit - private -> public final
private IntHashMap N = new IntHashMap();
private IntHashMap N;
// CraftBukkit start - change signature
public WorldServer(MinecraftServer minecraftserver, IDataManager idatamanager, String s, int i, WorldSettings worldsettings, org.bukkit.World.Environment env, ChunkGenerator gen) {
super(idatamanager, s, worldsettings, WorldProvider.byDimension(env.getId()), gen, env);
this.server = minecraftserver;
if (this.N == null) {
this.N = new IntHashMap();
}
this.dimension = i;
this.pvpMode = minecraftserver.pvpMode;
@@ -157,6 +160,14 @@ public class WorldServer extends World implements BlockChangeDelegate {
return i1 > this.getServer().getSpawnRadius() || this.server.serverConfigurationManager.isOp(entityhuman.name);
}
protected void c() {
if (this.N == null) {
this.N = new IntHashMap();
}
super.c();
}
protected void c(Entity entity) {
super.c(entity);
this.N.a(entity.id, entity);