Implemented ChunkData packet process for 1.17/1.17.1

This commit is contained in:
BruceChen 2022-07-23 22:34:16 +08:00
parent 316e35c93a
commit f9bb74a8bd
3 changed files with 255 additions and 49 deletions

View file

@ -11,18 +11,27 @@ namespace MinecraftClient.Mapping
/// </summary>
public class ChunkColumn
{
public const int ColumnSize = 16;
public int ColumnSize;
/// <summary>
/// Blocks contained into the chunk
/// </summary>
private readonly Chunk[] chunks = new Chunk[ColumnSize];
private readonly Chunk[] chunks;
/// <summary>
/// Lock for thread safety
/// </summary>
private readonly ReaderWriterLockSlim chunkLock = new ReaderWriterLockSlim();
/// <summary>
/// Create a new ChunkColumn
/// </summary>
public ChunkColumn(int size = 16)
{
ColumnSize = size;
chunks = new Chunk[size];
}
/// <summary>
/// Get or set the specified chunk column
/// </summary>