public void func_374_c(int i, int j)
        {
            ChunkCoordinates chunkcoordinates = world.func_22078_l();
            int  k = (i * 16 + 8) - chunkcoordinates.posX;
            int  l = (j * 16 + 8) - chunkcoordinates.posZ;
            char c = '\x0080'; //'\200';

            if (k < -c || k > c || l < -c || l > c)
            {
                field_725_a.add(Integer.valueOf(ChunkCoordIntPair.chunkXZ2Int(i, j)));
            }
        }
Beispiel #2
0
        public PlayerInstance(PlayerManager playermanager, int i, int j)
        {
            field_1073_a = playermanager;
//
            field_1072_b = new ArrayList();
            field_1068_f = new short[10];
            field_1067_g = 0;
            field_1071_c = i;
            field_1070_d = j;
            field_1069_e = new ChunkCoordIntPair(i, j);
            PlayerManager.getMinecraftServer(playermanager).worldMngr.field_20911_y.loadChunk(i, j);
        }
Beispiel #3
0
 public PlayerInstance(PlayerManager playermanager, int i, int j)
 {
     field_1073_a = playermanager;
     //
     field_1072_b = new ArrayList();
     field_1068_f = new short[10];
     field_1067_g = 0;
     field_1071_c = i;
     field_1070_d = j;
     field_1069_e = new ChunkCoordIntPair(i, j);
     PlayerManager.getMinecraftServer(playermanager).worldMngr.field_20911_y.loadChunk(i, j);
 }
        public Chunk loadChunk(int i, int j)
        {
            int k = ChunkCoordIntPair.chunkXZ2Int(i, j);

            field_725_a.remove(Integer.valueOf(k));
            var chunk = (Chunk)id2ChunkMap.get(Integer.valueOf(k));

            if (chunk == null)
            {
                chunk = func_4063_e(i, j);
                if (chunk == null)
                {
                    if (field_730_c == null)
                    {
                        chunk = field_724_b;
                    }
                    else
                    {
                        chunk = field_730_c.provideChunk(i, j);
                    }
                }
                id2ChunkMap.put(Integer.valueOf(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 Chunk provideChunk(int i, int j)
        {
            var chunk = (Chunk)id2ChunkMap.get(Integer.valueOf(ChunkCoordIntPair.chunkXZ2Int(i, j)));

            if (chunk == null)
            {
                if (world.field_9209_x)
                {
                    return(loadChunk(i, j));
                }
                else
                {
                    return(field_724_b);
                }
            }
            else
            {
                return(chunk);
            }
        }
Beispiel #6
0
 public virtual MobSpawnerBase func_4066_a(ChunkCoordIntPair chunkcoordintpair)
 {
     return(func_4067_a(chunkcoordintpair.chunkXPos >> 4, chunkcoordintpair.chunkZPos >> 4));
 }
 public bool chunkExists(int i, int j)
 {
     return(id2ChunkMap.containsKey(Integer.valueOf(ChunkCoordIntPair.chunkXZ2Int(i, j))));
 }
 public override MobSpawnerBase func_4066_a(ChunkCoordIntPair chunkcoordintpair)
 {
     return(field_4262_e);
 }
 public override MobSpawnerBase func_4066_a(ChunkCoordIntPair chunkcoordintpair)
 {
     return field_4262_e;
 }