final Vector3f size = blockData.getSize();
final int sizeX = size.getFloorX();
final int sizeY = size.getFloorY();
final int sizeZ = size.getFloorZ();
final double[][][] noise = WorldGeneratorUtils.fastNoise(NOISE, sizeX, sizeY, sizeZ, 4, x, y, z);
final BiomeSelector selector = getSelector();
final TIntPairObjectHashMap<NormalBiome> biomeCache = new TIntPairObjectHashMap<NormalBiome>();
for (int xx = 0; xx < sizeX; xx++) {
for (int zz = 0; zz < sizeZ; zz++) {
double maxSum = 0;
double minSum = 0;
double weightSum = 0;
for (int sx = -SMOOTH_SIZE; sx <= SMOOTH_SIZE; sx++) {
for (int sz = -SMOOTH_SIZE; sz <= SMOOTH_SIZE; sz++) {
final NormalBiome adjacent;
if (xx + sx < 0 || zz + sz < 0
|| xx + sx >= sizeX || zz + sz >= sizeZ) {
if (biomeCache.containsKey(x + xx + sx, z + zz + sz)) {
adjacent = biomeCache.get(x + xx + sx, z + zz + sz);
} else {
adjacent = (NormalBiome) selector.pickBiome(x + xx + sx, y, z + zz + sz, seed);
biomeCache.put(x + xx + sx, z + zz + sz, adjacent);
}
} else {
adjacent = (NormalBiome) biomes.getBiome(xx + sx, y, zz + sz);
}