mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
feat: add palettes and version constants for MC 1.21.2 (protocol 768)
Add item, entity, block, and metadata palettes for Minecraft 1.21.2: - ItemPalette1212: 1375 items (42 new: pale oak set, colored bundles, creaking heart/spawn egg, banner patterns) - EntityPalette1212: 150 entity types (boats split into per-wood-type entries, generic boat/chest_boat removed; added creaking, creaking_transient, pale oak boats) - Palette1212 (blocks): 1084 block types with state IDs generated from official 1.21.2 data reports (24 new pale oak blocks, creaking heart, pale moss variants) - EntityMetadataPalette: reuses 1206 (serializers unchanged in 1.21.2) Updated version infrastructure: - Protocol18.cs: MC_1_21_2_Version = 768, palette switch routing - ProtocolHandler.cs: version mapping 1.21.2 <-> 768 - Program.cs: MCHighestVersion bumped to 1.21.2 - ItemType.cs, EntityType.cs, Material.cs: new enum entries Note: packet palette, structured components, and protocol handler changes for 1.21.2 are not yet implemented — this commit covers palette/registry groundwork only. Made-with: Cursor
This commit is contained in:
parent
896263acc8
commit
df833ae2a8
10 changed files with 3476 additions and 9 deletions
|
|
@ -73,6 +73,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
internal const int MC_1_20_4_Version = 765;
|
||||
internal const int MC_1_20_6_Version = 766;
|
||||
internal const int MC_1_21_Version = 767;
|
||||
internal const int MC_1_21_2_Version = 768;
|
||||
|
||||
private int compression_treshold = -1;
|
||||
private int autocomplete_transaction_id = 0;
|
||||
|
|
@ -147,8 +148,9 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
Block.Palette = protocolVersion switch
|
||||
{
|
||||
// Block palette
|
||||
> MC_1_21_Version when handler.GetTerrainEnabled() =>
|
||||
> MC_1_21_2_Version when handler.GetTerrainEnabled() =>
|
||||
throw new NotImplementedException(Translations.exception_palette_block),
|
||||
>= MC_1_21_2_Version => new Palette1212(),
|
||||
>= MC_1_20_6_Version => new Palette1206(),
|
||||
>= MC_1_20_4_Version => new Palette1204(),
|
||||
>= MC_1_20_Version => new Palette120(),
|
||||
|
|
@ -166,8 +168,9 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
entityPalette = protocolVersion switch
|
||||
{
|
||||
// Entity palette
|
||||
> MC_1_21_Version when handler.GetEntityHandlingEnabled() =>
|
||||
> MC_1_21_2_Version when handler.GetEntityHandlingEnabled() =>
|
||||
throw new NotImplementedException(Translations.exception_palette_entity),
|
||||
>= MC_1_21_2_Version => new EntityPalette1212(),
|
||||
>= MC_1_20_6_Version => new EntityPalette1206(),
|
||||
>= MC_1_20_4_Version => new EntityPalette1204(),
|
||||
>= MC_1_20_Version => new EntityPalette120(),
|
||||
|
|
@ -189,8 +192,9 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
itemPalette = protocolVersion switch
|
||||
{
|
||||
// Item palette
|
||||
> MC_1_21_Version when handler.GetInventoryEnabled() =>
|
||||
> MC_1_21_2_Version when handler.GetInventoryEnabled() =>
|
||||
throw new NotImplementedException(Translations.exception_palette_item),
|
||||
>= MC_1_21_2_Version => new ItemPalette1212(),
|
||||
>= MC_1_21_Version => new ItemPalette121(),
|
||||
>= MC_1_20_6_Version => new ItemPalette1206(),
|
||||
>= MC_1_20_4_Version => new ItemPalette1204(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue