mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Trim
This commit is contained in:
parent
aceccaf5b5
commit
3d13eb51e6
4 changed files with 24 additions and 38 deletions
|
|
@ -87,7 +87,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
//// Block IDs are packed in the array of 64-bits integers
|
||||
dataTypes.SkipNextVarInt(cache); // Entry length
|
||||
Span<byte> entryDataByte = stackalloc byte[8];
|
||||
Span<long> entryDataLong = MemoryMarshal.Cast<byte, long>(entryDataByte);
|
||||
Span<long> entryDataLong = MemoryMarshal.Cast<byte, long>(entryDataByte); // Faster than MemoryMarshal.Read<long>
|
||||
|
||||
Block[] blocks = new Block[Chunk.SizeX * Chunk.SizeY * Chunk.SizeZ];
|
||||
int startOffset = 64; // Read the first data immediately
|
||||
|
|
|
|||
|
|
@ -97,7 +97,5 @@ namespace MinecraftClient.Protocol.Session
|
|||
|
||||
return session;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue