feat: handle 26.1 protocol changes and snapshot version support

- Protocol18: add MC_26_1_Version constant (775), version-gated palette
  routing for blocks/items/entities/metadata, and new TimeUpdate packet
  format (WorldClock map replaces dayTime+tickDayTime)
- Protocol18Terrain: read new fluidCount short in chunk sections (26.1+)
- DataTypes: add CatSoundVariant to entity metadata VarInt readers
- ProtocolHandler: add NormalizeSnapshotProtocol() to map RC/snapshot
  protocol numbers (e.g. 0x4000012E → 775) to release versions, pass
  raw protocol version through for server handshake compatibility

Made-with: Cursor
This commit is contained in:
BruceChen 2026-03-22 17:51:29 +08:00
parent d4014f7c87
commit d1837d104b
4 changed files with 73 additions and 20 deletions

View file

@ -185,6 +185,9 @@ namespace MinecraftClient.Protocol.Handlers
// Non-air block count inside chunk section, for lighting purposes
int blockCnt = dataTypes.ReadNextShort(cache);
if (protocolversion >= Protocol18Handler.MC_26_1_Version)
dataTypes.ReadNextShort(cache); // Fluid count (26.1+)
// Read Block states (Type: Paletted Container)
Chunk? chunk = ReadBlockStatesField(cache);