biome fixes + refactoring, blackened

This commit is contained in:
Sen 2025-04-14 12:35:45 +02:00
parent 6d912ae7ac
commit 1834c26b72
41 changed files with 296 additions and 328 deletions

View file

@ -176,18 +176,15 @@ public class BiomeGenLayered implements BiomeGenerator {
int[] aint = this.biomeIndexLayer.getInts(x, z, width, length);
for(int i = 0; i < width * length; ++i) {
Biome biome = Biome.getBiomeFromBiomeList(aint[i], Biome.DEF_BIOME);
float f = biome.humidity * biome.temperature;
if(f > 1.0F)
f = 1.0F;
listToReuse[i] = (double)f;
Biome biome = Biome.getBiome(aint[i], Biome.DEF_BIOME);
listToReuse[i] = (double)biome.getFactor();
}
}
public void genFactors(double[] factors, int xPos, int zPos, int sizeX, int sizeZ) {
IntCache.resetIntCache();
if(true && sizeX == 16 && sizeZ == 16 && (xPos & 15) == 0 && (zPos & 15) == 0) {
if(sizeX == 16 && sizeZ == 16 && (xPos & 15) == 0 && (zPos & 15) == 0) {
double[] cachedFacts = this.getBiomeCacheBlock(xPos, zPos).factors;
System.arraycopy(cachedFacts, 0, factors, 0, sizeX * sizeZ);
}
@ -195,11 +192,8 @@ public class BiomeGenLayered implements BiomeGenerator {
int[] aint = this.biomeIndexLayer.getInts(xPos, zPos, sizeX, sizeZ);
for(int i = 0; i < sizeX * sizeZ; ++i) {
Biome biome = Biome.getBiomeFromBiomeList(aint[i], Biome.DEF_BIOME);
float f = biome.humidity * biome.temperature;
if(f > 1.0F)
f = 1.0F;
factors[i] = (double)f;
Biome biome = Biome.getBiome(aint[i], Biome.DEF_BIOME);
factors[i] = (double)biome.getFactor();
}
}
}
@ -210,7 +204,7 @@ public class BiomeGenLayered implements BiomeGenerator {
int[] aint = this.genBiomes.getInts(x, z, width, height);
for(int i = 0; i < width * height; ++i) {
biomes[i] = Biome.getBiomeFromBiomeList(aint[i], Biome.DEF_BIOME);
biomes[i] = Biome.getBiome(aint[i], Biome.DEF_BIOME);
}
}
@ -229,7 +223,7 @@ public class BiomeGenLayered implements BiomeGenerator {
int[] aint = this.biomeIndexLayer.getInts(x, z, width, length);
for(int i = 0; i < width * length; ++i) {
listToReuse[i] = Biome.getBiomeFromBiomeList(aint[i], Biome.DEF_BIOME);
listToReuse[i] = Biome.getBiome(aint[i], Biome.DEF_BIOME);
}
}
}