From b3feddfef372618c8a9d7a0abcaf18cfad866c18 Mon Sep 17 00:00:00 2001 From: daoge <3523206925@qq.com> Date: Tue, 3 Mar 2026 03:04:10 +0800 Subject: feat: TU19 (Dec 2014) Features & Content (#155) * try to resolve merge conflict * feat: TU19 (Dec 2014) Features & Content (#32) * December 2014 files * Working release build * Fix compilation issues * Add sound to Windows64Media * Add DLC content and force Tutorial DLC * Revert "Add DLC content and force Tutorial DLC" This reverts commit 97a43994725008e35fceb984d5549df9c8cea470. * Disable broken light packing * Disable breakpoint during DLC texture map load Allows DLC loading but the DLC textures are still broken * Fix post build not working * ... * fix vs2022 build * fix cmake build --------- Co-authored-by: Loki --- Minecraft.World/BiomeSource.cpp | 67 +++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 32 deletions(-) (limited to 'Minecraft.World/BiomeSource.cpp') diff --git a/Minecraft.World/BiomeSource.cpp b/Minecraft.World/BiomeSource.cpp index b16efd31..8e2a5680 100644 --- a/Minecraft.World/BiomeSource.cpp +++ b/Minecraft.World/BiomeSource.cpp @@ -11,9 +11,9 @@ // 4J - removal of separate temperature & downfall layers brought forward from 1.2.3 void BiomeSource::_init() { - layer = nullptr; + layer = nullptr; zoomedLayer = nullptr; - + cache = new BiomeCache(this); playerSpawnBiomes.push_back(Biome::forest); @@ -39,7 +39,7 @@ void BiomeSource::_init(__int64 seed, LevelType *generator) BiomeSource::BiomeSource() { - _init(); + _init(); } // 4J added @@ -105,7 +105,7 @@ void BiomeSource::getDownfallBlock(floatArray &downfalls, int x, int z, int w, i BiomeCache::Block *BiomeSource::getBlockAt(int x, int y) { - return cache->getBlockAt(x, y); + return cache->getBlockAt(x, y); } float BiomeSource::getTemperature(int x, int y, int z) const @@ -277,6 +277,7 @@ void BiomeSource::getBiomeIndexBlock(byteArray& biomeIndices, int x, int z, int */ bool BiomeSource::containsOnly(int x, int z, int r, vector allowed) { + IntCache::releaseAll(); int x0 = ((x - r) >> 2); int z0 = ((z - r) >> 2); int x1 = ((x + r) >> 2); @@ -304,11 +305,12 @@ bool BiomeSource::containsOnly(int x, int z, int r, vector allowed) */ bool BiomeSource::containsOnly(int x, int z, int r, Biome *allowed) { + IntCache::releaseAll(); int x0 = ((x - r) >> 2); int z0 = ((z - r) >> 2); int x1 = ((x + r) >> 2); int z1 = ((z + r) >> 2); - + int w = x1 - x0; int h = z1 - z0; int biomesCount = w*h; @@ -330,6 +332,7 @@ bool BiomeSource::containsOnly(int x, int z, int r, Biome *allowed) */ TilePos *BiomeSource::findBiome(int x, int z, int r, Biome *toFind, Random *random) { + IntCache::releaseAll(); int x0 = ((x - r) >> 2); int z0 = ((z - r) >> 2); int x1 = ((x + r) >> 2); @@ -367,6 +370,7 @@ TilePos *BiomeSource::findBiome(int x, int z, int r, Biome *toFind, Random *rand */ TilePos *BiomeSource::findBiome(int x, int z, int r, vector allowed, Random *random) { + IntCache::releaseAll(); int x0 = ((x - r) >> 2); int z0 = ((z - r) >> 2); int x1 = ((x + r) >> 2); @@ -378,8 +382,7 @@ TilePos *BiomeSource::findBiome(int x, int z, int r, vector allowed, Ra intArray biomes = layer->getArea(x0, z0, w, h); TilePos *res = NULL; int found = 0; - int biomesCount = w*h; - for (unsigned int i = 0; i < biomesCount; i++) + for (unsigned int i = 0; i < w * h; i++) { int xx = (x0 + i % w) << 2; int zz = (z0 + i / w) << 2; @@ -420,7 +423,7 @@ __int64 BiomeSource::findSeed(LevelType *generator) mcprogress->progressStage(IDS_PROGRESS_NEW_WORLD_SEED); #ifndef _CONTENT_PACKAGE - if(app.DebugSettingsOn() && app.GetGameSettingsDebugMask(ProfileManager.GetPrimaryPad())&(1L<