mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
- Route block/entity/item/packet/metadata palettes to new 1219 variants for protocol >= 773, and raise upper-bound guards from MC_1_21_7 to MC_1_21_9 so terrain, inventory, and entity handling are enabled. - Add DataTypes readers for three new entity metadata serializer types: CopperGolemState and WeatheringCopperState (both VarInt), and ResolvableProfile (composite: Either<GameProfile, Partial> with optional name/UUID/properties + PlayerSkin.Patch with 4 optional fields for body/cape/elytra texture ResourceLocations and model type). Made-with: Cursor
32 lines
No EOL
1.4 KiB
C#
32 lines
No EOL
1.4 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
|
|
<= Protocol18Handler.MC_1_21_7_Version => new EntityMetadataPalette1215(), // 1.21.5 - 1.21.8
|
|
<= Protocol18Handler.MC_1_21_9_Version => new EntityMetadataPalette1219(), // 1.21.9 - 1.21.10
|
|
_ => throw new NotImplementedException()
|
|
};
|
|
}
|
|
} |