Esempio n. 1
0
        public ChunkPosition func_35139_a(int i, int j, int k, List<BiomeGenBase> list, java.util.Random random)
        {
            int l = i - k >> 2;
            int i1 = j - k >> 2;
            int j1 = i + k >> 2;
            int k1 = j + k >> 2;
            int l1 = (j1 - l) + 1;
            int i2 = (k1 - i1) + 1;
            int[] ai = field_34907_a.func_35018_a(l, i1, l1, i2);
            ChunkPosition chunkposition = null;
            int j2 = 0;
            for(int k2 = 0; k2 < ai.Length; k2++)
            {
                int l2 = l + k2 % l1 << 2;
                int i3 = i1 + k2 / l1 << 2;
                BiomeGenBase biomegenbase = BiomeGenBase.biomeList[ai[k2]];
                if(list.Contains(biomegenbase) && (chunkposition == null || random.nextInt(j2 + 1) == 0))
                {
                    chunkposition = new ChunkPosition(l2, 0, i3);
                    j2++;
                }
            }

            return chunkposition;
        }
Esempio n. 2
0
        public ChunkPosition func_35139_a(int i, int j, int k, List <BiomeGenBase> list, java.util.Random random)
        {
            int l  = i - k >> 2;
            int i1 = j - k >> 2;
            int j1 = i + k >> 2;
            int k1 = j + k >> 2;
            int l1 = (j1 - l) + 1;
            int i2 = (k1 - i1) + 1;

            int[]         ai            = field_34907_a.func_35018_a(l, i1, l1, i2);
            ChunkPosition chunkposition = null;
            int           j2            = 0;

            for (int k2 = 0; k2 < ai.Length; k2++)
            {
                int          l2           = l + k2 % l1 << 2;
                int          i3           = i1 + k2 / l1 << 2;
                BiomeGenBase biomegenbase = BiomeGenBase.biomeList[ai[k2]];
                if (list.Contains(biomegenbase) && (chunkposition == null || random.nextInt(j2 + 1) == 0))
                {
                    chunkposition = new ChunkPosition(l2, 0, i3);
                    j2++;
                }
            }

            return(chunkposition);
        }
Esempio n. 3
0
 public override bool Equals(object obj)
 {
     if (obj is ChunkPosition)
     {
         ChunkPosition chunkposition = (ChunkPosition)obj;
         return(chunkposition.x == x && chunkposition.y == y && chunkposition.z == z);
     }
     else
     {
         return(false);
     }
 }