public virtual net.minecraft.src.Chunk LoadChunk(int i, int j) { int k = net.minecraft.src.ChunkCoordIntPair.ChunkXZ2Int(i, j); field_725_a.Remove(k); net.minecraft.src.Chunk chunk = (net.minecraft.src.Chunk)id2ChunkMap[k]; if (chunk == null) { chunk = LoadChunkViaChunkLoader(i, j); if (chunk == null) { if (serverChunkGenerator == null) { chunk = dummyChunk; } else { chunk = serverChunkGenerator.ProvideChunk(i, j); } } id2ChunkMap[k] = chunk; field_727_f.Add(chunk); if (chunk != null) { chunk.Func_4053_c(); chunk.OnChunkLoad(); } if (!chunk.isTerrainPopulated && ChunkExists(i + 1, j + 1) && ChunkExists(i, j + 1) && ChunkExists(i + 1, j)) { Populate(this, i, j); } if (ChunkExists(i - 1, j) && !ProvideChunk(i - 1, j).isTerrainPopulated&& ChunkExists (i - 1, j + 1) && ChunkExists(i, j + 1) && ChunkExists(i - 1, j)) { Populate(this, i - 1, j); } if (ChunkExists(i, j - 1) && !ProvideChunk(i, j - 1).isTerrainPopulated&& ChunkExists (i + 1, j - 1) && ChunkExists(i, j - 1) && ChunkExists(i + 1, j)) { Populate(this, i, j - 1); } if (ChunkExists(i - 1, j - 1) && !ProvideChunk(i - 1, j - 1).isTerrainPopulated&& ChunkExists(i - 1, j - 1) && ChunkExists(i, j - 1) && ChunkExists(i - 1, j)) { Populate(this, i - 1, j - 1); } } return(chunk); }
public virtual net.minecraft.src.Chunk LoadChunk(int i, int j) { int k = net.minecraft.src.ChunkCoordIntPair.ChunkXZ2Int(i, j); field_28062_a.Remove(k); net.minecraft.src.Chunk chunk = (net.minecraft.src.Chunk)field_28065_e[k]; if (chunk == null) { chunk = Func_28058_d(i, j); if (chunk == null) { if (chunkGenerator == null) { chunk = field_28061_b; } else { chunk = chunkGenerator.ProvideChunk(i, j); } } field_28065_e[k] = chunk; field_28064_f.Add(chunk); if (chunk != null) { chunk.Func_4053_c(); chunk.OnChunkLoad(); } if (!chunk.isTerrainPopulated && ChunkExists(i + 1, j + 1) && ChunkExists(i, j + 1) && ChunkExists(i + 1, j)) { Populate(this, i, j); } if (ChunkExists(i - 1, j) && !ProvideChunk(i - 1, j).isTerrainPopulated&& ChunkExists (i - 1, j + 1) && ChunkExists(i, j + 1) && ChunkExists(i - 1, j)) { Populate(this, i - 1, j); } if (ChunkExists(i, j - 1) && !ProvideChunk(i, j - 1).isTerrainPopulated&& ChunkExists (i + 1, j - 1) && ChunkExists(i, j - 1) && ChunkExists(i + 1, j)) { Populate(this, i, j - 1); } if (ChunkExists(i - 1, j - 1) && !ProvideChunk(i - 1, j - 1).isTerrainPopulated&& ChunkExists(i - 1, j - 1) && ChunkExists(i, j - 1) && ChunkExists(i - 1, j)) { Populate(this, i - 1, j - 1); } } return(chunk); }