/**
   * Return a list of biomes for the specified blocks. Args: listToReuse, x, y, width, length,
   * cacheFlag (if false, don't check biomeCache to avoid infinite loop in BiomeCacheBlock)
   */
  public BiomeGenBase[] getBiomeGenAt(
      BiomeGenBase abiomegenbase[], int i, int j, int k, int l, boolean flag) {
    IntCache.resetIntCache();

    if (abiomegenbase == null || abiomegenbase.length < k * l) {
      abiomegenbase = new BiomeGenBase[k * l];
    }

    if (flag && k == 16 && l == 16 && (i & 0xf) == 0 && (j & 0xf) == 0) {
      BiomeGenBase abiomegenbase1[] = biomeCache.getCachedBiomes(i, j);
      System.arraycopy(abiomegenbase1, 0, abiomegenbase, 0, k * l);
      return abiomegenbase;
    }

    int ai[] = biomeIndexLayer.getInts(i, j, k, l);

    for (int i1 = 0; i1 < k * l; i1++) {
      abiomegenbase[i1] = BiomeGenBase.biomeList[ai[i1]];
    }

    return abiomegenbase;
  }
 /** Returns the BiomeGenBase related to the x, z position on the world. */
 public BiomeGenBase getBiomeGenAt(int i, int j) {
   return biomeCache.getBiomeGenAt(i, j);
 }
 /** Calls the WorldChunkManager's biomeCache.cleanupCache() */
 public void cleanupCache() {
   biomeCache.cleanupCache();
 }