/** Returns an array of biomes for the location input. */ public BiomeGenBase[] getBiomesForGeneration( BiomeGenBase abiomegenbase[], int i, int j, int k, int l) { IntCache.resetIntCache(); if (abiomegenbase == null || abiomegenbase.length < k * l) { abiomegenbase = new BiomeGenBase[k * l]; } int ai[] = genBiomes.getInts(i, j, k, l); for (int i1 = 0; i1 < k * l; i1++) { abiomegenbase[i1] = BiomeGenBase.biomeList[ai[i1]]; } return abiomegenbase; }
/** * Returns a list of temperatures to use for the specified blocks. Args: listToReuse, x, y, width, * length */ public float[] getTemperatures(float af[], int i, int j, int k, int l) { IntCache.resetIntCache(); if (af == null || af.length < k * l) { af = new float[k * l]; } int ai[] = biomeIndexLayer.getInts(i, j, k, l); for (int i1 = 0; i1 < k * l; i1++) { float f = (float) BiomeGenBase.biomeList[ai[i1]].getIntTemperature() / 65536F; if (f > 1.0F) { f = 1.0F; } af[i1] = f; } return af; }
/** * 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; }