mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Add complete protocol 769 support for Minecraft 1.21.4: - Version constants: Add 769 to supported versions, MC_1_21_4_Version constant, and version string mappings (including 1.21.3 -> 768 compatibility) - Item palette: 10 new items (Resin series + Eyeblossom), generated ItemPalette1214 - Entity palette: Remove CreakingTransient (149 entities, down from 150) - Block palette: 10 new blocks with correct blockstate ID ranges from server data - Packet palette: Serverbound packet ID reshuffling - PickItem split into PickItemFromBlock/PickItemFromEntity, new PlayerLoaded packet inserted after PlayerInput, subsequent IDs shifted accordingly. Clientbound unchanged. - PlayerLoaded: Send empty PlayerLoaded packet after JoinGame processing (>= 1.21.4) - EntityMetadata/DataComponents: Reuse 1.20.6 palettes (unchanged registries) - Update all version guard checks from MC_1_21_2 to MC_1_21_4 Made-with: Cursor
30 lines
No EOL
1.2 KiB
C#
30 lines
No EOL
1.2 KiB
C#
using MinecraftClient.Mapping.EntityMetadataPalettes;
|
|
using MinecraftClient.Protocol.Handlers;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace MinecraftClient.Mapping;
|
|
|
|
public abstract class EntityMetadataPalette
|
|
{
|
|
public abstract Dictionary<int, EntityMetaDataType> GetEntityMetadataMappingsList();
|
|
|
|
public EntityMetaDataType GetDataType(int typeId)
|
|
{
|
|
return GetEntityMetadataMappingsList()[typeId];
|
|
}
|
|
|
|
public static EntityMetadataPalette GetPalette(int protocolVersion)
|
|
{
|
|
return protocolVersion switch
|
|
{
|
|
<= Protocol18Handler.MC_1_8_Version => new EntityMetadataPalette18(), // 1.8
|
|
<= Protocol18Handler.MC_1_12_2_Version => new EntityMetadataPalette1122(), // 1.9 - 1.12.2
|
|
<= Protocol18Handler.MC_1_19_2_Version => new EntityMetadataPalette1191(), // 1.13 - 1.19.2
|
|
<= Protocol18Handler.MC_1_19_3_Version => new EntityMetadataPalette1193(), // 1.19.3
|
|
< Protocol18Handler.MC_1_20_6_Version => new EntityMetadataPalette1194(), // 1.19.4 - 1.20.4
|
|
<= Protocol18Handler.MC_1_21_4_Version => new EntityMetadataPalette1206(), // 1.20.6 - 1.21.4
|
|
_ => throw new NotImplementedException()
|
|
};
|
|
}
|
|
} |