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:
BruceChen 2026-03-20 03:02:43 +08:00
parent 896263acc8
commit df833ae2a8
10 changed files with 3476 additions and 9 deletions

View file

@ -1,4 +1,4 @@
namespace MinecraftClient.Mapping
namespace MinecraftClient.Mapping
{
/// <summary>
/// Represents Minecraft Entity Types
@ -14,14 +14,20 @@
/// </remarks>
public enum EntityType
{
AcaciaBoat,
AcaciaChestBoat,
Allay,
AreaEffectCloud,
Armadillo,
ArmorStand,
Arrow,
Axolotl,
BambooChestRaft,
BambooRaft,
Bat,
Bee,
BirchBoat,
BirchChestBoat,
Blaze,
BlockDisplay,
Boat,
@ -31,13 +37,19 @@
Camel,
Cat,
CaveSpider,
CherryBoat,
CherryChestBoat,
ChestBoat,
ChestMinecart,
Chicken,
Cod,
CommandBlockMinecart,
Cow,
Creaking,
CreakingTransient,
Creeper,
DarkOakBoat,
DarkOakChestBoat,
Dolphin,
Donkey,
DragonFireball,
@ -77,18 +89,26 @@
Item,
ItemDisplay,
ItemFrame,
JungleBoat,
JungleChestBoat,
LeashKnot,
LightningBolt,
Llama,
LlamaSpit,
MagmaCube,
MangroveBoat,
MangroveChestBoat,
Marker,
Minecart,
Mooshroom,
Mule,
OakBoat,
OakChestBoat,
Ocelot,
OminousItemSpawner,
Painting,
PaleOakBoat,
PaleOakChestBoat,
Panda,
Parrot,
Phantom,
@ -117,6 +137,8 @@
SpawnerMinecart,
SpectralArrow,
Spider,
SpruceBoat,
SpruceChestBoat,
Squid,
Stray,
Strider,