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/ChunkSource.h | 51 +++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 12 deletions(-) (limited to 'Minecraft.World/ChunkSource.h') diff --git a/Minecraft.World/ChunkSource.h b/Minecraft.World/ChunkSource.h index 242f30a0..c537651c 100644 --- a/Minecraft.World/ChunkSource.h +++ b/Minecraft.World/ChunkSource.h @@ -8,16 +8,30 @@ class TilePos; #ifdef _LARGE_WORLDS // 4J Stu - Our default map (at zoom level 3) is 1024x1024 blocks (or 64 chunks) #define LEVEL_MAX_WIDTH (5*64) //(6*54) + +#define LEVEL_WIDTH_CLASSIC 54 +#define LEVEL_WIDTH_SMALL 64 +#define LEVEL_WIDTH_MEDIUM (3*64) +#define LEVEL_WIDTH_LARGE (5*64) + #else #define LEVEL_MAX_WIDTH 54 #endif #define LEVEL_MIN_WIDTH 54 #define LEVEL_LEGACY_WIDTH 54 + + // Scale was 8 in the Java game, but that would make our nether tiny // Every 1 block you move in the nether maps to HELL_LEVEL_SCALE blocks in the overworld #ifdef _LARGE_WORLDS #define HELL_LEVEL_MAX_SCALE 8 + +#define HELL_LEVEL_SCALE_CLASSIC 3 +#define HELL_LEVEL_SCALE_SMALL 3 +#define HELL_LEVEL_SCALE_MEDIUM 6 +#define HELL_LEVEL_SCALE_LARGE 8 + #else #define HELL_LEVEL_MAX_SCALE 3 #endif @@ -39,29 +53,42 @@ class ChunkSource public: // 4J Added so that we can store the maximum dimensions of this world int m_XZSize; +#ifdef _LARGE_WORLDS + bool m_classicEdgeMoat; + bool m_smallEdgeMoat; + bool m_mediumEdgeMoat; +#endif public: virtual ~ChunkSource() {} - virtual bool hasChunk(int x, int y) = 0; + virtual bool hasChunk(int x, int y) = 0; virtual bool reallyHasChunk(int x, int y) { return hasChunk(x,y); } // 4J added - virtual LevelChunk *getChunk(int x, int z) = 0; + virtual LevelChunk *getChunk(int x, int z) = 0; virtual void lightChunk(LevelChunk *lc) {} // 4J added - virtual LevelChunk *create(int x, int z) = 0; - virtual void postProcess(ChunkSource *parent, int x, int z) = 0; + virtual LevelChunk *create(int x, int z) = 0; + virtual void postProcess(ChunkSource *parent, int x, int z) = 0; virtual bool saveAllEntities() { return false; } // 4J Added - virtual bool save(bool force, ProgressListener *progressListener) = 0; - virtual bool tick() = 0; - virtual bool shouldSave() = 0; + virtual bool save(bool force, ProgressListener *progressListener) = 0; + virtual bool tick() = 0; + virtual bool shouldSave() = 0; virtual LevelChunk **getCache() { return NULL; } // 4J added virtual void dataReceived(int x, int z) {} // 4J added - /** - * Returns some stats that are rendered when the user holds F3. - */ - virtual wstring gatherStats() = 0; + /** + * Returns some stats that are rendered when the user holds F3. + */ + virtual wstring gatherStats() = 0; virtual vector *getMobsAt(MobCategory *mobCategory, int x, int y, int z) = 0; - virtual TilePos *findNearestMapFeature(Level *level, const wstring& featureName, int x, int y, int z) = 0; + virtual TilePos *findNearestMapFeature(Level *level, const wstring& featureName, int x, int y, int z) = 0; + + /** + * Recreates "logic structures" for a chunk that has been loaded from disk. + * For example, fortress bridges in the Nether. + */ + virtual void recreateLogicStructuresForChunk(int chunkX, int chunkZ) = 0; + + // virtual void flushSave() = 0; // 4J removed }; -- cgit v1.2.3