diff options
| author | Loki Rautio <lokirautio@gmail.com> | 2026-03-04 03:56:03 -0600 |
|---|---|---|
| committer | Loki Rautio <lokirautio@gmail.com> | 2026-03-04 03:56:03 -0600 |
| commit | 42aec6dac53dffa6afe072560a7e1d4986112538 (patch) | |
| tree | 0836426857391df1b6a83f6368a183f83ec9b104 /Minecraft.Client/MultiPlayerChunkCache.cpp | |
| parent | c9d58eeac7c72f0b3038e084667b4d89a6249fce (diff) | |
| parent | ef9b6fd500dfabd9463267b0dd9e29577eea8a2b (diff) | |
Merge branch 'main' into pr/win64-world-saves
# Conflicts:
# Minecraft.Client/MinecraftServer.cpp
# README.md
Diffstat (limited to 'Minecraft.Client/MultiPlayerChunkCache.cpp')
| -rw-r--r-- | Minecraft.Client/MultiPlayerChunkCache.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/Minecraft.Client/MultiPlayerChunkCache.cpp b/Minecraft.Client/MultiPlayerChunkCache.cpp index 8c6c90e7..b5e1dd25 100644 --- a/Minecraft.Client/MultiPlayerChunkCache.cpp +++ b/Minecraft.Client/MultiPlayerChunkCache.cpp @@ -46,7 +46,7 @@ MultiPlayerChunkCache::MultiPlayerChunkCache(Level *level) for( int z = 0; z < 16; z++ ) { unsigned char tileId = 0; - if( y <= ( level->getSeaLevel() - 10 ) ) tileId = Tile::rock_Id; + if( y <= ( level->getSeaLevel() - 10 ) ) tileId = Tile::stone_Id; else if( y < level->getSeaLevel() ) tileId = Tile::calmWater_Id; bytes[x << 11 | z << 7 | y] = tileId; @@ -141,16 +141,16 @@ void MultiPlayerChunkCache::drop(int x, int z) { // 4J Stu - We do want to drop any entities in the chunks, especially for the case when a player is dead as they will // not get the RemoveEntity packet if an entity is removed. - LevelChunk *chunk = getChunk(x, z); - if (!chunk->isEmpty()) + LevelChunk *chunk = getChunk(x, z); + if (!chunk->isEmpty()) { // Added parameter here specifies that we don't want to delete tile entities, as they won't get recreated unless they've got update packets // The tile entities are in general only created on the client by virtue of the chunk rebuild - chunk->unload(false); + chunk->unload(false); // 4J - We just want to clear out the entities in the chunk, but everything else should be valid chunk->loaded = true; - } + } } LevelChunk *MultiPlayerChunkCache::create(int x, int z) @@ -194,9 +194,9 @@ LevelChunk *MultiPlayerChunkCache::create(int x, int z) // 4J - changed to use new methods for lighting chunk->setSkyLightDataAllBright(); -// Arrays::fill(chunk->skyLight->data, (byte) 255); + // Arrays::fill(chunk->skyLight->data, (byte) 255); } - + chunk->loaded = true; LeaveCriticalSection(&m_csLoadCreate); @@ -285,13 +285,17 @@ TilePos *MultiPlayerChunkCache::findNearestMapFeature(Level *level, const wstrin return NULL; } +void MultiPlayerChunkCache::recreateLogicStructuresForChunk(int chunkX, int chunkZ) +{ +} + wstring MultiPlayerChunkCache::gatherStats() { EnterCriticalSection(&m_csLoadCreate); int size = (int)loadedChunkList.size(); LeaveCriticalSection(&m_csLoadCreate); return L"MultiplayerChunkCache: " + _toString<int>(size); - + } void MultiPlayerChunkCache::dataReceived(int x, int z) |
