aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/MultiPlayerChunkCache.cpp
diff options
context:
space:
mode:
authordaoge <3523206925@qq.com>2026-03-03 03:04:10 +0800
committerGitHub <noreply@github.com>2026-03-03 03:04:10 +0800
commitb3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch)
tree267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.Client/MultiPlayerChunkCache.cpp
parent84c31a2331f7a0ec85b9d438992e244f60e5020f (diff)
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 <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.Client/MultiPlayerChunkCache.cpp')
-rw-r--r--Minecraft.Client/MultiPlayerChunkCache.cpp20
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)