fix: regenerate item/block palettes from server registry data for 1.21.9

MC 1.21.9 changed how some items and blocks are registered — 24 block
items (copper bars/chains/lanterns variants, potted azalea renames) and
additional blocks are now registered outside of Items.java/Blocks.java
field declarations, making the previous source-field-order-based palette
generation produce incorrect protocol IDs.

Regenerated ItemPalette1219.cs using server registries.json (1488 items,
up from 1464) and Palette1219.cs using blocks.json (1166 blocks with
correct state IDs). Added 37 new enum values to ItemType.cs (35 new +
DryShortGrass/DryTallGrass for backward compat) and 9 new values to
Material.cs.

Verified all item/block/entity identification against a 1.21.10 server.

Made-with: Cursor
This commit is contained in:
BruceChen 2026-03-21 14:43:56 +08:00
parent 6d3c58b29f
commit aebfcd93e4
4 changed files with 3465 additions and 3026 deletions

File diff suppressed because it is too large Load diff

View file

@ -113,19 +113,19 @@ namespace MinecraftClient.Inventory
BirchWood,
BlackBanner,
BlackBed,
BlackBundle,
BlackCandle,
BlackCarpet,
BlackConcrete,
BlackConcretePowder,
BlackDye,
BlackGlazedTerracotta,
BlackHarness,
BlackShulkerBox,
BlackStainedGlass,
BlackStainedGlassPane,
BlackTerracotta,
BlackWool,
BlackBundle,
BlackHarness,
Blackstone,
BlackstoneSlab,
BlackstoneStairs,
@ -137,13 +137,15 @@ namespace MinecraftClient.Inventory
BlazeSpawnEgg,
BlueBanner,
BlueBed,
BlueBundle,
BlueCandle,
BlueCarpet,
BlueConcrete,
BlueConcretePowder,
BlueDye,
BlueEgg, // blue egg
BlueEgg,
BlueGlazedTerracotta,
BlueHarness,
BlueIce,
BlueOrchid,
BlueShulkerBox,
@ -151,8 +153,6 @@ namespace MinecraftClient.Inventory
BlueStainedGlassPane,
BlueTerracotta,
BlueWool,
BlueBundle,
BlueHarness,
BoggedSpawnEgg,
BoltArmorTrimSmithingTemplate,
Bone,
@ -178,13 +178,15 @@ namespace MinecraftClient.Inventory
Bricks,
BrownBanner,
BrownBed,
BrownBundle,
BrownCandle,
BrownCarpet,
BrownConcrete,
BrownConcretePowder,
BrownDye,
BrownEgg, // brown egg
BrownEgg,
BrownGlazedTerracotta,
BrownHarness,
BrownMushroom,
BrownMushroomBlock,
BrownShulkerBox,
@ -192,8 +194,6 @@ namespace MinecraftClient.Inventory
BrownStainedGlassPane,
BrownTerracotta,
BrownWool,
BrownBundle,
BrownHarness,
Brush,
BubbleCoral,
BubbleCoralBlock,
@ -202,9 +202,9 @@ namespace MinecraftClient.Inventory
BuddingAmethyst,
Bundle,
BurnPotterySherd,
Bush, // bush
Bush,
Cactus,
CactusFlower, // cactus flower
CactusFlower,
Cake,
Calcite,
CalibratedSculkSensor,
@ -300,9 +300,11 @@ namespace MinecraftClient.Inventory
CookedSalmon,
Cookie,
CopperAxe,
CopperBars,
CopperBlock,
CopperBoots,
CopperBulb,
CopperChain,
CopperChest,
CopperChestplate,
CopperDoor,
@ -313,6 +315,7 @@ namespace MinecraftClient.Inventory
CopperHoe,
CopperHorseArmor,
CopperIngot,
CopperLantern,
CopperLeggings,
CopperNugget,
CopperOre,
@ -363,19 +366,19 @@ namespace MinecraftClient.Inventory
CutSandstoneSlab,
CyanBanner,
CyanBed,
CyanBundle,
CyanCandle,
CyanCarpet,
CyanConcrete,
CyanConcretePowder,
CyanDye,
CyanGlazedTerracotta,
CyanHarness,
CyanShulkerBox,
CyanStainedGlass,
CyanStainedGlassPane,
CyanTerracotta,
CyanWool,
CyanBundle,
CyanHarness,
DamagedAnvil,
Dandelion,
DangerPotterySherd,
@ -469,8 +472,8 @@ namespace MinecraftClient.Inventory
DripstoneBlock,
Dropper,
DrownedSpawnEgg,
DryShortGrass, // dry short grass
DryTallGrass, // dry tall grass
DryShortGrass,
DryTallGrass,
DuneArmorTrimSmithingTemplate,
EchoShard,
Egg,
@ -501,11 +504,14 @@ namespace MinecraftClient.Inventory
ExplorerPotterySherd,
ExposedChiseledCopper,
ExposedCopper,
ExposedCopperBars,
ExposedCopperBulb,
ExposedCopperChain,
ExposedCopperChest,
ExposedCopperDoor,
ExposedCopperGolemStatue,
ExposedCopperGrate,
ExposedCopperLantern,
ExposedCopperTrapdoor,
ExposedCutCopper,
ExposedCutCopperSlab,
@ -522,7 +528,7 @@ namespace MinecraftClient.Inventory
FireCoral,
FireCoralBlock,
FireCoralFan,
FireflyBush, // firefly bush
FireflyBush,
FireworkRocket,
FireworkStar,
FishingRod,
@ -583,34 +589,34 @@ namespace MinecraftClient.Inventory
Gravel,
GrayBanner,
GrayBed,
GrayBundle,
GrayCandle,
GrayCarpet,
GrayConcrete,
GrayConcretePowder,
GrayDye,
GrayGlazedTerracotta,
GrayHarness,
GrayShulkerBox,
GrayStainedGlass,
GrayStainedGlassPane,
GrayTerracotta,
GrayWool,
GrayBundle,
GrayHarness,
GreenBanner,
GreenBed,
GreenBundle,
GreenCandle,
GreenCarpet,
GreenConcrete,
GreenConcretePowder,
GreenDye,
GreenGlazedTerracotta,
GreenHarness,
GreenShulkerBox,
GreenStainedGlass,
GreenStainedGlassPane,
GreenTerracotta,
GreenWool,
GreenBundle,
GreenHarness,
Grindstone,
GuardianSpawnEgg,
Gunpowder,
@ -699,7 +705,7 @@ namespace MinecraftClient.Inventory
LargeFern,
LavaBucket,
Lead,
LeafLitter, // leaf litter
LeafLitter,
Leather,
LeatherBoots,
LeatherChestplate,
@ -711,34 +717,34 @@ namespace MinecraftClient.Inventory
Light,
LightBlueBanner,
LightBlueBed,
LightBlueBundle,
LightBlueCandle,
LightBlueCarpet,
LightBlueConcrete,
LightBlueConcretePowder,
LightBlueDye,
LightBlueGlazedTerracotta,
LightBlueHarness,
LightBlueShulkerBox,
LightBlueStainedGlass,
LightBlueStainedGlassPane,
LightBlueTerracotta,
LightBlueWool,
LightBlueBundle,
LightBlueHarness,
LightGrayBanner,
LightGrayBed,
LightGrayBundle,
LightGrayCandle,
LightGrayCarpet,
LightGrayConcrete,
LightGrayConcretePowder,
LightGrayDye,
LightGrayGlazedTerracotta,
LightGrayHarness,
LightGrayShulkerBox,
LightGrayStainedGlass,
LightGrayStainedGlassPane,
LightGrayTerracotta,
LightGrayWool,
LightGrayBundle,
LightGrayHarness,
LightWeightedPressurePlate,
LightningRod,
Lilac,
@ -746,19 +752,19 @@ namespace MinecraftClient.Inventory
LilyPad,
LimeBanner,
LimeBed,
LimeBundle,
LimeCandle,
LimeCarpet,
LimeConcrete,
LimeConcretePowder,
LimeDye,
LimeGlazedTerracotta,
LimeHarness,
LimeShulkerBox,
LimeStainedGlass,
LimeStainedGlassPane,
LimeTerracotta,
LimeWool,
LimeBundle,
LimeHarness,
LingeringPotion,
LlamaSpawnEgg,
Lodestone,
@ -766,19 +772,19 @@ namespace MinecraftClient.Inventory
Mace,
MagentaBanner,
MagentaBed,
MagentaBundle,
MagentaCandle,
MagentaCarpet,
MagentaConcrete,
MagentaConcretePowder,
MagentaDye,
MagentaGlazedTerracotta,
MagentaHarness,
MagentaShulkerBox,
MagentaStainedGlass,
MagentaStainedGlassPane,
MagentaTerracotta,
MagentaWool,
MagentaBundle,
MagentaHarness,
MagmaBlock,
MagmaCream,
MagmaCubeSpawnEgg,
@ -910,28 +916,31 @@ namespace MinecraftClient.Inventory
OpenEyeblossom,
OrangeBanner,
OrangeBed,
OrangeBundle,
OrangeCandle,
OrangeCarpet,
OrangeConcrete,
OrangeConcretePowder,
OrangeDye,
OrangeGlazedTerracotta,
OrangeHarness,
OrangeShulkerBox,
OrangeStainedGlass,
OrangeStainedGlassPane,
OrangeTerracotta,
OrangeTulip,
OrangeWool,
OrangeBundle,
OrangeHarness,
OxeyeDaisy,
OxidizedChiseledCopper,
OxidizedCopper,
OxidizedCopperBars,
OxidizedCopperBulb,
OxidizedCopperChain,
OxidizedCopperChest,
OxidizedCopperDoor,
OxidizedCopperGolemStatue,
OxidizedCopperGrate,
OxidizedCopperLantern,
OxidizedCopperTrapdoor,
OxidizedCutCopper,
OxidizedCutCopperSlab,
@ -977,12 +986,14 @@ namespace MinecraftClient.Inventory
PillagerSpawnEgg,
PinkBanner,
PinkBed,
PinkBundle,
PinkCandle,
PinkCarpet,
PinkConcrete,
PinkConcretePowder,
PinkDye,
PinkGlazedTerracotta,
PinkHarness,
PinkPetals,
PinkShulkerBox,
PinkStainedGlass,
@ -990,8 +1001,6 @@ namespace MinecraftClient.Inventory
PinkTerracotta,
PinkTulip,
PinkWool,
PinkBundle,
PinkHarness,
Piston,
PitcherPlant,
PitcherPod,
@ -1054,19 +1063,19 @@ namespace MinecraftClient.Inventory
PumpkinSeeds,
PurpleBanner,
PurpleBed,
PurpleBundle,
PurpleCandle,
PurpleCarpet,
PurpleConcrete,
PurpleConcretePowder,
PurpleDye,
PurpleGlazedTerracotta,
PurpleHarness,
PurpleShulkerBox,
PurpleStainedGlass,
PurpleStainedGlassPane,
PurpleTerracotta,
PurpleWool,
PurpleBundle,
PurpleHarness,
PurpurBlock,
PurpurPillar,
PurpurSlab,
@ -1094,12 +1103,14 @@ namespace MinecraftClient.Inventory
RecoveryCompass,
RedBanner,
RedBed,
RedBundle,
RedCandle,
RedCarpet,
RedConcrete,
RedConcretePowder,
RedDye,
RedGlazedTerracotta,
RedHarness,
RedMushroom,
RedMushroomBlock,
RedNetherBrickSlab,
@ -1117,8 +1128,6 @@ namespace MinecraftClient.Inventory
RedTerracotta,
RedTulip,
RedWool,
RedBundle,
RedHarness,
Redstone,
RedstoneBlock,
RedstoneLamp,
@ -1129,10 +1138,10 @@ namespace MinecraftClient.Inventory
RepeatingCommandBlock,
ResinBlock,
ResinBrick,
ResinBricks,
ResinBrickSlab,
ResinBrickStairs,
ResinBrickWall,
ResinBricks,
ResinClump,
RespawnAnchor,
RibArmorTrimSmithingTemplate,
@ -1165,6 +1174,7 @@ namespace MinecraftClient.Inventory
SheepSpawnEgg,
ShelterPotterySherd,
Shield,
ShortDryGrass,
ShortGrass,
Shroomlight,
ShulkerBox,
@ -1291,11 +1301,12 @@ namespace MinecraftClient.Inventory
SweetBerries,
TadpoleBucket,
TadpoleSpawnEgg,
TallDryGrass,
TallGrass,
Target,
Terracotta,
TestBlock, // test block
TestInstanceBlock, // test instance block
TestBlock,
TestInstanceBlock,
TideArmorTrimSmithingTemplate,
TintedGlass,
TippedArrow,
@ -1361,23 +1372,29 @@ namespace MinecraftClient.Inventory
WarpedWartBlock,
WaterBucket,
WaxedChiseledCopper,
WaxedCopperBars,
WaxedCopperBlock,
WaxedCopperBulb,
WaxedCopperChain,
WaxedCopperChest,
WaxedCopperDoor,
WaxedCopperGolemStatue,
WaxedCopperGrate,
WaxedCopperLantern,
WaxedCopperTrapdoor,
WaxedCutCopper,
WaxedCutCopperSlab,
WaxedCutCopperStairs,
WaxedExposedChiseledCopper,
WaxedExposedCopper,
WaxedExposedCopperBars,
WaxedExposedCopperBulb,
WaxedExposedCopperChain,
WaxedExposedCopperChest,
WaxedExposedCopperDoor,
WaxedExposedCopperGolemStatue,
WaxedExposedCopperGrate,
WaxedExposedCopperLantern,
WaxedExposedCopperTrapdoor,
WaxedExposedCutCopper,
WaxedExposedCutCopperSlab,
@ -1386,11 +1403,14 @@ namespace MinecraftClient.Inventory
WaxedLightningRod,
WaxedOxidizedChiseledCopper,
WaxedOxidizedCopper,
WaxedOxidizedCopperBars,
WaxedOxidizedCopperBulb,
WaxedOxidizedCopperChain,
WaxedOxidizedCopperChest,
WaxedOxidizedCopperDoor,
WaxedOxidizedCopperGolemStatue,
WaxedOxidizedCopperGrate,
WaxedOxidizedCopperLantern,
WaxedOxidizedCopperTrapdoor,
WaxedOxidizedCutCopper,
WaxedOxidizedCutCopperSlab,
@ -1398,11 +1418,14 @@ namespace MinecraftClient.Inventory
WaxedOxidizedLightningRod,
WaxedWeatheredChiseledCopper,
WaxedWeatheredCopper,
WaxedWeatheredCopperBars,
WaxedWeatheredCopperBulb,
WaxedWeatheredCopperChain,
WaxedWeatheredCopperChest,
WaxedWeatheredCopperDoor,
WaxedWeatheredCopperGolemStatue,
WaxedWeatheredCopperGrate,
WaxedWeatheredCopperLantern,
WaxedWeatheredCopperTrapdoor,
WaxedWeatheredCutCopper,
WaxedWeatheredCutCopperSlab,
@ -1411,11 +1434,14 @@ namespace MinecraftClient.Inventory
WayfinderArmorTrimSmithingTemplate,
WeatheredChiseledCopper,
WeatheredCopper,
WeatheredCopperBars,
WeatheredCopperBulb,
WeatheredCopperChain,
WeatheredCopperChest,
WeatheredCopperDoor,
WeatheredCopperGolemStatue,
WeatheredCopperGrate,
WeatheredCopperLantern,
WeatheredCopperTrapdoor,
WeatheredCutCopper,
WeatheredCutCopperSlab,
@ -1427,22 +1453,22 @@ namespace MinecraftClient.Inventory
WheatSeeds,
WhiteBanner,
WhiteBed,
WhiteBundle,
WhiteCandle,
WhiteCarpet,
WhiteConcrete,
WhiteConcretePowder,
WhiteDye,
WhiteGlazedTerracotta,
WhiteHarness,
WhiteShulkerBox,
WhiteStainedGlass,
WhiteStainedGlassPane,
WhiteTerracotta,
WhiteTulip,
WhiteWool,
WhiteBundle,
WhiteHarness,
WildArmorTrimSmithingTemplate,
Wildflowers, // wildflowers
Wildflowers,
WindCharge,
WitchSpawnEgg,
WitherRose,
@ -1460,19 +1486,19 @@ namespace MinecraftClient.Inventory
WrittenBook,
YellowBanner,
YellowBed,
YellowBundle,
YellowCandle,
YellowCarpet,
YellowConcrete,
YellowConcretePowder,
YellowDye,
YellowGlazedTerracotta,
YellowHarness,
YellowShulkerBox,
YellowStainedGlass,
YellowStainedGlassPane,
YellowTerracotta,
YellowWool,
YellowBundle,
YellowHarness,
ZoglinSpawnEgg,
ZombieHead,
ZombieHorseSpawnEgg,
@ -1480,4 +1506,4 @@ namespace MinecraftClient.Inventory
ZombieVillagerSpawnEgg,
ZombifiedPiglinSpawnEgg,
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -165,9 +165,9 @@ namespace MinecraftClient.Mapping
BubbleCoralFan,
BubbleCoralWallFan,
BuddingAmethyst,
Bush, // bush
Bush,
Cactus,
CactusFlower, // cactus_flower
CactusFlower,
Cake,
Calcite,
CalibratedSculkSensor,
@ -416,7 +416,7 @@ namespace MinecraftClient.Mapping
FireCoralBlock,
FireCoralFan,
FireCoralWallFan,
FireflyBush, // firefly_bush
FireflyBush,
FletchingTable,
FlowerPot,
FloweringAzalea,
@ -522,7 +522,7 @@ namespace MinecraftClient.Mapping
LargeFern,
Lava,
LavaCauldron,
LeafLitter, // leaf_litter
LeafLitter,
Lectern,
Lever,
Light,
@ -914,7 +914,7 @@ namespace MinecraftClient.Mapping
SeaLantern,
SeaPickle,
Seagrass,
ShortDryGrass, // short_dry_grass
ShortDryGrass,
ShortGrass,
Shroomlight,
ShulkerBox,
@ -1009,13 +1009,13 @@ namespace MinecraftClient.Mapping
SuspiciousGravel,
SuspiciousSand,
SweetBerryBush,
TallDryGrass, // tall_dry_grass
TallDryGrass,
TallGrass,
TallSeagrass,
Target,
Terracotta,
TestBlock, // test_block
TestInstanceBlock, // test_instance_block
TestBlock,
TestInstanceBlock,
TintedGlass,
Tnt,
Torch,
@ -1161,7 +1161,7 @@ namespace MinecraftClient.Mapping
WhiteTulip,
WhiteWallBanner,
WhiteWool,
Wildflowers, // wildflowers
Wildflowers,
WitherRose,
WitherSkeletonSkull,
WitherSkeletonWallSkull,