mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-05 10:24:39 +00:00
TU19: merge Minecraft.World/WorldGen
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user