mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
- 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
31 lines
No EOL
1.3 KiB
C#
31 lines
No EOL
1.3 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_6_Version => new EntityMetadataPalette1215(), // 1.21.5 - 1.21.6
|
|
_ => throw new NotImplementedException()
|
|
};
|
|
}
|
|
} |