feat: add palettes and version routing for MC 1.21.6

- ItemPalette1216: 1415 items (generated from decompiled Items.java)
- EntityPalette1216: 151 entities (HappyGhast at index 56, all after +1)
- Palette1216: block states (DriedGhast 32 states at 13826-13857, all after +32)
- PacketPalette1216: clientbound +3 (Waypoint, ClearDialog, ShowDialog),
  serverbound +2 (ChangeGameMode at 0x04 shifting all after, CustomClickAction at end),
  config clientbound +2 (ClearDialog, ShowDialog),
  config serverbound +1 (CustomClickAction)
- Version routing in Protocol18.cs, PacketType18Handler.cs, EntityMetadataPalette.cs
  updated to select 1216 palettes for protocol >= 771
- EntityMetadataPalette reuses 1215 (EntityDataSerializers unchanged)

Made-with: Cursor
This commit is contained in:
BruceChen 2026-03-21 11:44:12 +08:00
parent 96a7e4a659
commit 1b0e27fde7
7 changed files with 3703 additions and 2 deletions

View file

@ -153,6 +153,7 @@ namespace MinecraftClient.Protocol.Handlers
// Block palette
> MC_1_21_6_Version when handler.GetTerrainEnabled() =>
throw new NotImplementedException(Translations.exception_palette_block),
>= MC_1_21_6_Version => new Palette1216(),
>= MC_1_21_5_Version => new Palette1215(),
>= MC_1_21_4_Version => new Palette1214(),
>= MC_1_21_2_Version => new Palette1212(),
@ -175,6 +176,7 @@ namespace MinecraftClient.Protocol.Handlers
// Entity palette
> MC_1_21_6_Version when handler.GetEntityHandlingEnabled() =>
throw new NotImplementedException(Translations.exception_palette_entity),
>= MC_1_21_6_Version => new EntityPalette1216(),
>= MC_1_21_5_Version => new EntityPalette1215(),
>= MC_1_21_4_Version => new EntityPalette1214(),
>= MC_1_21_2_Version => new EntityPalette1212(),
@ -201,6 +203,7 @@ namespace MinecraftClient.Protocol.Handlers
// Item palette
> MC_1_21_6_Version when handler.GetInventoryEnabled() =>
throw new NotImplementedException(Translations.exception_palette_item),
>= MC_1_21_6_Version => new ItemPalette1216(),
>= MC_1_21_5_Version => new ItemPalette1215(),
>= MC_1_21_4_Version => new ItemPalette1214(),
>= MC_1_21_2_Version => new ItemPalette1212(),