mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Bug fix: Chunk deleted by mistake
This commit is contained in:
parent
8ed2bc9d07
commit
0382e07d50
1 changed files with 4 additions and 10 deletions
|
|
@ -83,16 +83,10 @@ namespace MinecraftClient.Mapping
|
||||||
/// <param name="loadCompleted">Whether the ChunkColumn has been fully loaded</param>
|
/// <param name="loadCompleted">Whether the ChunkColumn has been fully loaded</param>
|
||||||
public void StoreChunk(int chunkX, int chunkY, int chunkZ, int chunkColumnSize, Chunk? chunk, bool loadCompleted)
|
public void StoreChunk(int chunkX, int chunkY, int chunkZ, int chunkColumnSize, Chunk? chunk, bool loadCompleted)
|
||||||
{
|
{
|
||||||
Tuple<int, int> chunkCoord = new(chunkX, chunkZ);
|
ChunkColumn chunkColumn = chunks.GetOrAdd(new(chunkX, chunkZ), (_) => new(chunkColumnSize));
|
||||||
if (chunk == null)
|
chunkColumn[chunkY] = chunk;
|
||||||
chunks.TryRemove(chunkCoord, out _);
|
if (loadCompleted)
|
||||||
else
|
chunkColumn.FullyLoaded = true;
|
||||||
{
|
|
||||||
ChunkColumn chunkColumn = chunks.GetOrAdd(chunkCoord, (_) => new(chunkColumnSize));
|
|
||||||
chunkColumn[chunkY] = chunk;
|
|
||||||
if (loadCompleted)
|
|
||||||
chunkColumn.FullyLoaded = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue