TU19: merge Minecraft.World/WorldGen

This commit is contained in:
Tropical
2026-03-21 17:45:10 -05:00
parent eb23fc1a83
commit 0f280b5ed3
108 changed files with 3505 additions and 957 deletions

View File

@@ -7,8 +7,10 @@
BiomeCache::Block::Block(int x, int z, BiomeCache* parent) {
// temps = floatArray(ZONE_SIZE * ZONE_SIZE, false); // MGH -
// added "no clear" flag to arrayWithLength downfall = floatArray(ZONE_SIZE
// * ZONE_SIZE, false); biomes = BiomeArray(ZONE_SIZE * ZONE_SIZE, false);
// added "no clear" flag to arrayWithLength downfall =
// floatArray(ZONE_SIZE
// * ZONE_SIZE, false); biomes = BiomeArray(ZONE_SIZE * ZONE_SIZE,
// false);
biomeIndices = byteArray(ZONE_SIZE * ZONE_SIZE, false);
lastUse = 0;
@@ -35,7 +37,7 @@ BiomeCache::Block::~Block() {
Biome* BiomeCache::Block::getBiome(int x, int z) {
// return biomes[(x & ZONE_SIZE_MASK) | ((z & ZONE_SIZE_MASK) <<
//ZONE_SIZE_BITS)];
// ZONE_SIZE_BITS)];
int biomeIndex = biomeIndices[(x & ZONE_SIZE_MASK) |
((z & ZONE_SIZE_MASK) << ZONE_SIZE_BITS)];
@@ -44,7 +46,7 @@ Biome* BiomeCache::Block::getBiome(int x, int z) {
float BiomeCache::Block::getTemperature(int x, int z) {
// return temps[(x & ZONE_SIZE_MASK) | ((z & ZONE_SIZE_MASK) <<
//ZONE_SIZE_BITS)];
// ZONE_SIZE_BITS)];
int biomeIndex = biomeIndices[(x & ZONE_SIZE_MASK) |
((z & ZONE_SIZE_MASK) << ZONE_SIZE_BITS)];
@@ -147,4 +149,4 @@ BiomeArray BiomeCache::getBiomeBlockAt(int x, int z) {
byteArray BiomeCache::getBiomeIndexBlockAt(int x, int z) {
return getBlockAt(x, z)->biomeIndices;
}
}