From 8df39ba74a801a181a9c519099fc051acb0405a8 Mon Sep 17 00:00:00 2001 From: BruceChen Date: Sat, 21 Mar 2026 00:48:27 +0800 Subject: [PATCH] feat: add MC 1.21.5 (protocol 770) support Full protocol adaptation for Minecraft 1.21.5: - Protocol version mapping: 770 -> 1.21.5 - Packet palette: AddExperienceOrb removed (S2C), TestInstanceBlockStatus added (S2C), SetTestBlock and TestInstanceBlockAction added (C2S) - Entity metadata palette: 5 new serializer types (OptionalLivingEntityReference, CowVariant, WolfSoundVariant, PigVariant, ChickenVariant), OPTIONAL_UUID replaced by OPTIONAL_LIVING_ENTITY_REFERENCE - Item palette: 11 new items (Bush, FireflyBush, DryShortGrass, DryTallGrass, Wildflowers, LeafLitter, CactusFlower, TestBlock, TestInstanceBlock, BlueEgg, BrownEgg) - Entity palette: Potion split into SplashPotion and LingeringPotion - Block palette: 9 new blocks (bush, cactus_flower, firefly_bush, leaf_litter, short_dry_grass, tall_dry_grass, test_block, test_instance_block, wildflowers) - Structured components: 31 new components including tooltip_display, weapon, blocks_attacks, potion_duration_scale, provides_trim_material, provides_banner_patterns, break_sound, and 25 entity variant components; unbreakable changed from Bool to Unit; instrument changed to EitherHolder Made-with: Cursor --- MinecraftClient/Commands/Entitycmd.cs | 6 +- .../Inventory/ItemPalettes/ItemPalette1215.cs | 1414 +++++++++++++ MinecraftClient/Inventory/ItemType.cs | 11 + .../Mapping/BlockPalettes/Palette1215.cs | 1838 +++++++++++++++++ MinecraftClient/Mapping/EntityMetaDataType.cs | 20 + .../Mapping/EntityMetadataPalette.cs | 1 + .../EntityMetadataPalette1215.cs | 50 + .../EntityPalettes/EntityPalette1215.cs | 168 ++ MinecraftClient/Mapping/EntityType.cs | 2 + .../Mapping/EntityTypeExtensions.cs | 4 +- MinecraftClient/Mapping/Material.cs | 9 + .../Protocol/Handlers/DataTypes.cs | 5 + .../PacketPalettes/PacketPalette1215.cs | 247 +++ .../Protocol/Handlers/PacketType18Handler.cs | 3 +- .../Protocol/Handlers/PacketTypesIn.cs | 1 + .../Protocol/Handlers/PacketTypesOut.cs | 2 + .../Protocol/Handlers/Protocol18.cs | 18 +- .../1_21_5/BlocksAttacksComponent.cs | 83 + .../1_21_5/EitherHolderComponent.cs | 51 + .../1_21_5/InstrumentComponent1215.cs | 43 + .../1_21_5/PaintingVariantHolderComponent.cs | 35 + .../1_21_5/PotionDurationScaleComponent.cs | 23 + .../1_21_5/ProvidesBannerPatternsComponent.cs | 23 + .../1_21_5/ProvidesTrimMaterialComponent.cs | 42 + .../1_21_5/SoundEventHolderComponent.cs | 40 + .../1_21_5/TooltipDisplayComponent.cs | 30 + .../Components/1_21_5/VarIntComponent.cs | 23 + .../Components/1_21_5/WeaponComponent.cs | 26 + .../StructuredComponentsRegistry1215.cs | 116 ++ .../StructuredComponentsHandler.cs | 2 + MinecraftClient/Protocol/ProtocolHandler.cs | 5 +- scripts/gen_palette_1214.py | 112 + tools/gen_entity_metadata_palette.py | 5 + 33 files changed, 4445 insertions(+), 13 deletions(-) create mode 100644 MinecraftClient/Inventory/ItemPalettes/ItemPalette1215.cs create mode 100644 MinecraftClient/Mapping/BlockPalettes/Palette1215.cs create mode 100644 MinecraftClient/Mapping/EntityMetadataPalettes/EntityMetadataPalette1215.cs create mode 100644 MinecraftClient/Mapping/EntityPalettes/EntityPalette1215.cs create mode 100644 MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette1215.cs create mode 100644 MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/BlocksAttacksComponent.cs create mode 100644 MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/EitherHolderComponent.cs create mode 100644 MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/InstrumentComponent1215.cs create mode 100644 MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/PaintingVariantHolderComponent.cs create mode 100644 MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/PotionDurationScaleComponent.cs create mode 100644 MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/ProvidesBannerPatternsComponent.cs create mode 100644 MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/ProvidesTrimMaterialComponent.cs create mode 100644 MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/SoundEventHolderComponent.cs create mode 100644 MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/TooltipDisplayComponent.cs create mode 100644 MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/VarIntComponent.cs create mode 100644 MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/WeaponComponent.cs create mode 100644 MinecraftClient/Protocol/Handlers/StructuredComponents/Registries/StructuredComponentsRegistry1215.cs create mode 100644 scripts/gen_palette_1214.py diff --git a/MinecraftClient/Commands/Entitycmd.cs b/MinecraftClient/Commands/Entitycmd.cs index 258227cd..e9935a80 100644 --- a/MinecraftClient/Commands/Entitycmd.cs +++ b/MinecraftClient/Commands/Entitycmd.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Text; @@ -210,7 +210,7 @@ namespace MinecraftClient.Commands Item item = entity.Item; string location = $"X:{Math.Round(entity.Location.X, 2)}, Y:{Math.Round(entity.Location.Y, 2)}, Z:{Math.Round(entity.Location.Z, 2)}"; - if (type == EntityType.Item || type == EntityType.ItemFrame || type == EntityType.EyeOfEnder || type == EntityType.Egg || type == EntityType.EnderPearl || type == EntityType.Potion || type == EntityType.Fireball || type == EntityType.FireworkRocket) + if (type == EntityType.Item || type == EntityType.ItemFrame || type == EntityType.EyeOfEnder || type == EntityType.Egg || type == EntityType.EnderPearl || type == EntityType.Potion || type == EntityType.SplashPotion || type == EntityType.LingeringPotion || type == EntityType.Fireball || type == EntityType.FireworkRocket) return $" #{id}: {Translations.cmd_entityCmd_type}: {entity.GetTypeString()}, {Translations.cmd_entityCmd_item}: {item.GetTypeString()}, {Translations.cmd_entityCmd_location}: {location}"; else if (type == EntityType.Player && !string.IsNullOrEmpty(nickname)) return $" #{id}: {Translations.cmd_entityCmd_type}: {entity.GetTypeString()}, {Translations.cmd_entityCmd_nickname}: §8{nickname}§8, {Translations.cmd_entityCmd_latency}: {latency}, {Translations.cmd_entityCmd_health}: {health}, {Translations.cmd_entityCmd_pose}: {pose}, {Translations.cmd_entityCmd_location}: {location}"; @@ -251,7 +251,7 @@ namespace MinecraftClient.Commands { sb.Append($"\n [MCC] {Translations.cmd_entityCmd_latency}: {latency}"); } - else if (type == EntityType.Item || type == EntityType.ItemFrame || type == Mapping.EntityType.EyeOfEnder || type == Mapping.EntityType.Egg || type == Mapping.EntityType.EnderPearl || type == Mapping.EntityType.Potion || type == Mapping.EntityType.Fireball || type == Mapping.EntityType.FireworkRocket) + else if (type == EntityType.Item || type == EntityType.ItemFrame || type == Mapping.EntityType.EyeOfEnder || type == Mapping.EntityType.Egg || type == Mapping.EntityType.EnderPearl || type == Mapping.EntityType.Potion || type == Mapping.EntityType.SplashPotion || type == Mapping.EntityType.LingeringPotion || type == Mapping.EntityType.Fireball || type == Mapping.EntityType.FireworkRocket) { string? displayName = item.DisplayName; if (string.IsNullOrEmpty(displayName)) diff --git a/MinecraftClient/Inventory/ItemPalettes/ItemPalette1215.cs b/MinecraftClient/Inventory/ItemPalettes/ItemPalette1215.cs new file mode 100644 index 00000000..19795e50 --- /dev/null +++ b/MinecraftClient/Inventory/ItemPalettes/ItemPalette1215.cs @@ -0,0 +1,1414 @@ +using System.Collections.Generic; + +namespace MinecraftClient.Inventory.ItemPalettes +{ + public class ItemPalette1215 : ItemPalette + { + private static readonly Dictionary mappings = new(); + + static ItemPalette1215() + { + mappings[0] = ItemType.Air; + mappings[1] = ItemType.Stone; + mappings[2] = ItemType.Granite; + mappings[3] = ItemType.PolishedGranite; + mappings[4] = ItemType.Diorite; + mappings[5] = ItemType.PolishedDiorite; + mappings[6] = ItemType.Andesite; + mappings[7] = ItemType.PolishedAndesite; + mappings[8] = ItemType.Deepslate; + mappings[9] = ItemType.CobbledDeepslate; + mappings[10] = ItemType.PolishedDeepslate; + mappings[11] = ItemType.Calcite; + mappings[12] = ItemType.Tuff; + mappings[13] = ItemType.TuffSlab; + mappings[14] = ItemType.TuffStairs; + mappings[15] = ItemType.TuffWall; + mappings[16] = ItemType.ChiseledTuff; + mappings[17] = ItemType.PolishedTuff; + mappings[18] = ItemType.PolishedTuffSlab; + mappings[19] = ItemType.PolishedTuffStairs; + mappings[20] = ItemType.PolishedTuffWall; + mappings[21] = ItemType.TuffBricks; + mappings[22] = ItemType.TuffBrickSlab; + mappings[23] = ItemType.TuffBrickStairs; + mappings[24] = ItemType.TuffBrickWall; + mappings[25] = ItemType.ChiseledTuffBricks; + mappings[26] = ItemType.DripstoneBlock; + mappings[27] = ItemType.GrassBlock; + mappings[28] = ItemType.Dirt; + mappings[29] = ItemType.CoarseDirt; + mappings[30] = ItemType.Podzol; + mappings[31] = ItemType.RootedDirt; + mappings[32] = ItemType.Mud; + mappings[33] = ItemType.CrimsonNylium; + mappings[34] = ItemType.WarpedNylium; + mappings[35] = ItemType.Cobblestone; + mappings[36] = ItemType.OakPlanks; + mappings[37] = ItemType.SprucePlanks; + mappings[38] = ItemType.BirchPlanks; + mappings[39] = ItemType.JunglePlanks; + mappings[40] = ItemType.AcaciaPlanks; + mappings[41] = ItemType.CherryPlanks; + mappings[42] = ItemType.DarkOakPlanks; + mappings[43] = ItemType.PaleOakPlanks; + mappings[44] = ItemType.MangrovePlanks; + mappings[45] = ItemType.BambooPlanks; + mappings[46] = ItemType.CrimsonPlanks; + mappings[47] = ItemType.WarpedPlanks; + mappings[48] = ItemType.BambooMosaic; + mappings[49] = ItemType.OakSapling; + mappings[50] = ItemType.SpruceSapling; + mappings[51] = ItemType.BirchSapling; + mappings[52] = ItemType.JungleSapling; + mappings[53] = ItemType.AcaciaSapling; + mappings[54] = ItemType.CherrySapling; + mappings[55] = ItemType.DarkOakSapling; + mappings[56] = ItemType.PaleOakSapling; + mappings[57] = ItemType.MangrovePropagule; + mappings[58] = ItemType.Bedrock; + mappings[59] = ItemType.Sand; + mappings[60] = ItemType.SuspiciousSand; + mappings[61] = ItemType.SuspiciousGravel; + mappings[62] = ItemType.RedSand; + mappings[63] = ItemType.Gravel; + mappings[64] = ItemType.CoalOre; + mappings[65] = ItemType.DeepslateCoalOre; + mappings[66] = ItemType.IronOre; + mappings[67] = ItemType.DeepslateIronOre; + mappings[68] = ItemType.CopperOre; + mappings[69] = ItemType.DeepslateCopperOre; + mappings[70] = ItemType.GoldOre; + mappings[71] = ItemType.DeepslateGoldOre; + mappings[72] = ItemType.RedstoneOre; + mappings[73] = ItemType.DeepslateRedstoneOre; + mappings[74] = ItemType.EmeraldOre; + mappings[75] = ItemType.DeepslateEmeraldOre; + mappings[76] = ItemType.LapisOre; + mappings[77] = ItemType.DeepslateLapisOre; + mappings[78] = ItemType.DiamondOre; + mappings[79] = ItemType.DeepslateDiamondOre; + mappings[80] = ItemType.NetherGoldOre; + mappings[81] = ItemType.NetherQuartzOre; + mappings[82] = ItemType.AncientDebris; + mappings[83] = ItemType.CoalBlock; + mappings[84] = ItemType.RawIronBlock; + mappings[85] = ItemType.RawCopperBlock; + mappings[86] = ItemType.RawGoldBlock; + mappings[87] = ItemType.HeavyCore; + mappings[88] = ItemType.AmethystBlock; + mappings[89] = ItemType.BuddingAmethyst; + mappings[90] = ItemType.IronBlock; + mappings[91] = ItemType.CopperBlock; + mappings[92] = ItemType.GoldBlock; + mappings[93] = ItemType.DiamondBlock; + mappings[94] = ItemType.NetheriteBlock; + mappings[95] = ItemType.ExposedCopper; + mappings[96] = ItemType.WeatheredCopper; + mappings[97] = ItemType.OxidizedCopper; + mappings[98] = ItemType.ChiseledCopper; + mappings[99] = ItemType.ExposedChiseledCopper; + mappings[100] = ItemType.WeatheredChiseledCopper; + mappings[101] = ItemType.OxidizedChiseledCopper; + mappings[102] = ItemType.CutCopper; + mappings[103] = ItemType.ExposedCutCopper; + mappings[104] = ItemType.WeatheredCutCopper; + mappings[105] = ItemType.OxidizedCutCopper; + mappings[106] = ItemType.CutCopperStairs; + mappings[107] = ItemType.ExposedCutCopperStairs; + mappings[108] = ItemType.WeatheredCutCopperStairs; + mappings[109] = ItemType.OxidizedCutCopperStairs; + mappings[110] = ItemType.CutCopperSlab; + mappings[111] = ItemType.ExposedCutCopperSlab; + mappings[112] = ItemType.WeatheredCutCopperSlab; + mappings[113] = ItemType.OxidizedCutCopperSlab; + mappings[114] = ItemType.WaxedCopperBlock; + mappings[115] = ItemType.WaxedExposedCopper; + mappings[116] = ItemType.WaxedWeatheredCopper; + mappings[117] = ItemType.WaxedOxidizedCopper; + mappings[118] = ItemType.WaxedChiseledCopper; + mappings[119] = ItemType.WaxedExposedChiseledCopper; + mappings[120] = ItemType.WaxedWeatheredChiseledCopper; + mappings[121] = ItemType.WaxedOxidizedChiseledCopper; + mappings[122] = ItemType.WaxedCutCopper; + mappings[123] = ItemType.WaxedExposedCutCopper; + mappings[124] = ItemType.WaxedWeatheredCutCopper; + mappings[125] = ItemType.WaxedOxidizedCutCopper; + mappings[126] = ItemType.WaxedCutCopperStairs; + mappings[127] = ItemType.WaxedExposedCutCopperStairs; + mappings[128] = ItemType.WaxedWeatheredCutCopperStairs; + mappings[129] = ItemType.WaxedOxidizedCutCopperStairs; + mappings[130] = ItemType.WaxedCutCopperSlab; + mappings[131] = ItemType.WaxedExposedCutCopperSlab; + mappings[132] = ItemType.WaxedWeatheredCutCopperSlab; + mappings[133] = ItemType.WaxedOxidizedCutCopperSlab; + mappings[134] = ItemType.OakLog; + mappings[135] = ItemType.SpruceLog; + mappings[136] = ItemType.BirchLog; + mappings[137] = ItemType.JungleLog; + mappings[138] = ItemType.AcaciaLog; + mappings[139] = ItemType.CherryLog; + mappings[140] = ItemType.PaleOakLog; + mappings[141] = ItemType.DarkOakLog; + mappings[142] = ItemType.MangroveLog; + mappings[143] = ItemType.MangroveRoots; + mappings[144] = ItemType.MuddyMangroveRoots; + mappings[145] = ItemType.CrimsonStem; + mappings[146] = ItemType.WarpedStem; + mappings[147] = ItemType.BambooBlock; + mappings[148] = ItemType.StrippedOakLog; + mappings[149] = ItemType.StrippedSpruceLog; + mappings[150] = ItemType.StrippedBirchLog; + mappings[151] = ItemType.StrippedJungleLog; + mappings[152] = ItemType.StrippedAcaciaLog; + mappings[153] = ItemType.StrippedCherryLog; + mappings[154] = ItemType.StrippedDarkOakLog; + mappings[155] = ItemType.StrippedPaleOakLog; + mappings[156] = ItemType.StrippedMangroveLog; + mappings[157] = ItemType.StrippedCrimsonStem; + mappings[158] = ItemType.StrippedWarpedStem; + mappings[159] = ItemType.StrippedOakWood; + mappings[160] = ItemType.StrippedSpruceWood; + mappings[161] = ItemType.StrippedBirchWood; + mappings[162] = ItemType.StrippedJungleWood; + mappings[163] = ItemType.StrippedAcaciaWood; + mappings[164] = ItemType.StrippedCherryWood; + mappings[165] = ItemType.StrippedDarkOakWood; + mappings[166] = ItemType.StrippedPaleOakWood; + mappings[167] = ItemType.StrippedMangroveWood; + mappings[168] = ItemType.StrippedCrimsonHyphae; + mappings[169] = ItemType.StrippedWarpedHyphae; + mappings[170] = ItemType.StrippedBambooBlock; + mappings[171] = ItemType.OakWood; + mappings[172] = ItemType.SpruceWood; + mappings[173] = ItemType.BirchWood; + mappings[174] = ItemType.JungleWood; + mappings[175] = ItemType.AcaciaWood; + mappings[176] = ItemType.CherryWood; + mappings[177] = ItemType.PaleOakWood; + mappings[178] = ItemType.DarkOakWood; + mappings[179] = ItemType.MangroveWood; + mappings[180] = ItemType.CrimsonHyphae; + mappings[181] = ItemType.WarpedHyphae; + mappings[182] = ItemType.OakLeaves; + mappings[183] = ItemType.SpruceLeaves; + mappings[184] = ItemType.BirchLeaves; + mappings[185] = ItemType.JungleLeaves; + mappings[186] = ItemType.AcaciaLeaves; + mappings[187] = ItemType.CherryLeaves; + mappings[188] = ItemType.DarkOakLeaves; + mappings[189] = ItemType.PaleOakLeaves; + mappings[190] = ItemType.MangroveLeaves; + mappings[191] = ItemType.AzaleaLeaves; + mappings[192] = ItemType.FloweringAzaleaLeaves; + mappings[193] = ItemType.Sponge; + mappings[194] = ItemType.WetSponge; + mappings[195] = ItemType.Glass; + mappings[196] = ItemType.TintedGlass; + mappings[197] = ItemType.LapisBlock; + mappings[198] = ItemType.Sandstone; + mappings[199] = ItemType.ChiseledSandstone; + mappings[200] = ItemType.CutSandstone; + mappings[201] = ItemType.Cobweb; + mappings[202] = ItemType.ShortGrass; + mappings[203] = ItemType.Fern; + mappings[204] = ItemType.Bush; + mappings[205] = ItemType.Azalea; + mappings[206] = ItemType.FloweringAzalea; + mappings[207] = ItemType.DeadBush; + mappings[208] = ItemType.FireflyBush; + mappings[209] = ItemType.DryShortGrass; + mappings[210] = ItemType.DryTallGrass; + mappings[211] = ItemType.Seagrass; + mappings[212] = ItemType.SeaPickle; + mappings[213] = ItemType.WhiteWool; + mappings[214] = ItemType.OrangeWool; + mappings[215] = ItemType.MagentaWool; + mappings[216] = ItemType.LightBlueWool; + mappings[217] = ItemType.YellowWool; + mappings[218] = ItemType.LimeWool; + mappings[219] = ItemType.PinkWool; + mappings[220] = ItemType.GrayWool; + mappings[221] = ItemType.LightGrayWool; + mappings[222] = ItemType.CyanWool; + mappings[223] = ItemType.PurpleWool; + mappings[224] = ItemType.BlueWool; + mappings[225] = ItemType.BrownWool; + mappings[226] = ItemType.GreenWool; + mappings[227] = ItemType.RedWool; + mappings[228] = ItemType.BlackWool; + mappings[229] = ItemType.Dandelion; + mappings[230] = ItemType.OpenEyeblossom; + mappings[231] = ItemType.ClosedEyeblossom; + mappings[232] = ItemType.Poppy; + mappings[233] = ItemType.BlueOrchid; + mappings[234] = ItemType.Allium; + mappings[235] = ItemType.AzureBluet; + mappings[236] = ItemType.RedTulip; + mappings[237] = ItemType.OrangeTulip; + mappings[238] = ItemType.WhiteTulip; + mappings[239] = ItemType.PinkTulip; + mappings[240] = ItemType.OxeyeDaisy; + mappings[241] = ItemType.Cornflower; + mappings[242] = ItemType.LilyOfTheValley; + mappings[243] = ItemType.WitherRose; + mappings[244] = ItemType.Torchflower; + mappings[245] = ItemType.PitcherPlant; + mappings[246] = ItemType.SporeBlossom; + mappings[247] = ItemType.BrownMushroom; + mappings[248] = ItemType.RedMushroom; + mappings[249] = ItemType.CrimsonFungus; + mappings[250] = ItemType.WarpedFungus; + mappings[251] = ItemType.CrimsonRoots; + mappings[252] = ItemType.WarpedRoots; + mappings[253] = ItemType.NetherSprouts; + mappings[254] = ItemType.WeepingVines; + mappings[255] = ItemType.TwistingVines; + mappings[256] = ItemType.SugarCane; + mappings[257] = ItemType.Kelp; + mappings[258] = ItemType.PinkPetals; + mappings[259] = ItemType.Wildflowers; + mappings[260] = ItemType.LeafLitter; + mappings[261] = ItemType.MossCarpet; + mappings[262] = ItemType.MossBlock; + mappings[263] = ItemType.PaleMossCarpet; + mappings[264] = ItemType.PaleHangingMoss; + mappings[265] = ItemType.PaleMossBlock; + mappings[266] = ItemType.HangingRoots; + mappings[267] = ItemType.BigDripleaf; + mappings[268] = ItemType.SmallDripleaf; + mappings[269] = ItemType.Bamboo; + mappings[270] = ItemType.OakSlab; + mappings[271] = ItemType.SpruceSlab; + mappings[272] = ItemType.BirchSlab; + mappings[273] = ItemType.JungleSlab; + mappings[274] = ItemType.AcaciaSlab; + mappings[275] = ItemType.CherrySlab; + mappings[276] = ItemType.DarkOakSlab; + mappings[277] = ItemType.PaleOakSlab; + mappings[278] = ItemType.MangroveSlab; + mappings[279] = ItemType.BambooSlab; + mappings[280] = ItemType.BambooMosaicSlab; + mappings[281] = ItemType.CrimsonSlab; + mappings[282] = ItemType.WarpedSlab; + mappings[283] = ItemType.StoneSlab; + mappings[284] = ItemType.SmoothStoneSlab; + mappings[285] = ItemType.SandstoneSlab; + mappings[286] = ItemType.CutSandstoneSlab; + mappings[287] = ItemType.PetrifiedOakSlab; + mappings[288] = ItemType.CobblestoneSlab; + mappings[289] = ItemType.BrickSlab; + mappings[290] = ItemType.StoneBrickSlab; + mappings[291] = ItemType.MudBrickSlab; + mappings[292] = ItemType.NetherBrickSlab; + mappings[293] = ItemType.QuartzSlab; + mappings[294] = ItemType.RedSandstoneSlab; + mappings[295] = ItemType.CutRedSandstoneSlab; + mappings[296] = ItemType.PurpurSlab; + mappings[297] = ItemType.PrismarineSlab; + mappings[298] = ItemType.PrismarineBrickSlab; + mappings[299] = ItemType.DarkPrismarineSlab; + mappings[300] = ItemType.SmoothQuartz; + mappings[301] = ItemType.SmoothRedSandstone; + mappings[302] = ItemType.SmoothSandstone; + mappings[303] = ItemType.SmoothStone; + mappings[304] = ItemType.Bricks; + mappings[305] = ItemType.Bookshelf; + mappings[306] = ItemType.ChiseledBookshelf; + mappings[307] = ItemType.DecoratedPot; + mappings[308] = ItemType.MossyCobblestone; + mappings[309] = ItemType.Obsidian; + mappings[310] = ItemType.Torch; + mappings[311] = ItemType.EndRod; + mappings[312] = ItemType.ChorusPlant; + mappings[313] = ItemType.ChorusFlower; + mappings[314] = ItemType.PurpurBlock; + mappings[315] = ItemType.PurpurPillar; + mappings[316] = ItemType.PurpurStairs; + mappings[317] = ItemType.Spawner; + mappings[318] = ItemType.CreakingHeart; + mappings[319] = ItemType.Chest; + mappings[320] = ItemType.CraftingTable; + mappings[321] = ItemType.Farmland; + mappings[322] = ItemType.Furnace; + mappings[323] = ItemType.Ladder; + mappings[324] = ItemType.CobblestoneStairs; + mappings[325] = ItemType.Snow; + mappings[326] = ItemType.Ice; + mappings[327] = ItemType.SnowBlock; + mappings[328] = ItemType.Cactus; + mappings[329] = ItemType.CactusFlower; + mappings[330] = ItemType.Clay; + mappings[331] = ItemType.Jukebox; + mappings[332] = ItemType.OakFence; + mappings[333] = ItemType.SpruceFence; + mappings[334] = ItemType.BirchFence; + mappings[335] = ItemType.JungleFence; + mappings[336] = ItemType.AcaciaFence; + mappings[337] = ItemType.CherryFence; + mappings[338] = ItemType.DarkOakFence; + mappings[339] = ItemType.PaleOakFence; + mappings[340] = ItemType.MangroveFence; + mappings[341] = ItemType.BambooFence; + mappings[342] = ItemType.CrimsonFence; + mappings[343] = ItemType.WarpedFence; + mappings[344] = ItemType.Pumpkin; + mappings[345] = ItemType.CarvedPumpkin; + mappings[346] = ItemType.JackOLantern; + mappings[347] = ItemType.Netherrack; + mappings[348] = ItemType.SoulSand; + mappings[349] = ItemType.SoulSoil; + mappings[350] = ItemType.Basalt; + mappings[351] = ItemType.PolishedBasalt; + mappings[352] = ItemType.SmoothBasalt; + mappings[353] = ItemType.SoulTorch; + mappings[354] = ItemType.Glowstone; + mappings[355] = ItemType.InfestedStone; + mappings[356] = ItemType.InfestedCobblestone; + mappings[357] = ItemType.InfestedStoneBricks; + mappings[358] = ItemType.InfestedMossyStoneBricks; + mappings[359] = ItemType.InfestedCrackedStoneBricks; + mappings[360] = ItemType.InfestedChiseledStoneBricks; + mappings[361] = ItemType.InfestedDeepslate; + mappings[362] = ItemType.StoneBricks; + mappings[363] = ItemType.MossyStoneBricks; + mappings[364] = ItemType.CrackedStoneBricks; + mappings[365] = ItemType.ChiseledStoneBricks; + mappings[366] = ItemType.PackedMud; + mappings[367] = ItemType.MudBricks; + mappings[368] = ItemType.DeepslateBricks; + mappings[369] = ItemType.CrackedDeepslateBricks; + mappings[370] = ItemType.DeepslateTiles; + mappings[371] = ItemType.CrackedDeepslateTiles; + mappings[372] = ItemType.ChiseledDeepslate; + mappings[373] = ItemType.ReinforcedDeepslate; + mappings[374] = ItemType.BrownMushroomBlock; + mappings[375] = ItemType.RedMushroomBlock; + mappings[376] = ItemType.MushroomStem; + mappings[377] = ItemType.IronBars; + mappings[378] = ItemType.Chain; + mappings[379] = ItemType.GlassPane; + mappings[380] = ItemType.Melon; + mappings[381] = ItemType.Vine; + mappings[382] = ItemType.GlowLichen; + mappings[383] = ItemType.ResinClump; + mappings[384] = ItemType.ResinBlock; + mappings[385] = ItemType.ResinBricks; + mappings[386] = ItemType.ResinBrickStairs; + mappings[387] = ItemType.ResinBrickSlab; + mappings[388] = ItemType.ResinBrickWall; + mappings[389] = ItemType.ChiseledResinBricks; + mappings[390] = ItemType.BrickStairs; + mappings[391] = ItemType.StoneBrickStairs; + mappings[392] = ItemType.MudBrickStairs; + mappings[393] = ItemType.Mycelium; + mappings[394] = ItemType.LilyPad; + mappings[395] = ItemType.NetherBricks; + mappings[396] = ItemType.CrackedNetherBricks; + mappings[397] = ItemType.ChiseledNetherBricks; + mappings[398] = ItemType.NetherBrickFence; + mappings[399] = ItemType.NetherBrickStairs; + mappings[400] = ItemType.Sculk; + mappings[401] = ItemType.SculkVein; + mappings[402] = ItemType.SculkCatalyst; + mappings[403] = ItemType.SculkShrieker; + mappings[404] = ItemType.EnchantingTable; + mappings[405] = ItemType.EndPortalFrame; + mappings[406] = ItemType.EndStone; + mappings[407] = ItemType.EndStoneBricks; + mappings[408] = ItemType.DragonEgg; + mappings[409] = ItemType.SandstoneStairs; + mappings[410] = ItemType.EnderChest; + mappings[411] = ItemType.EmeraldBlock; + mappings[412] = ItemType.OakStairs; + mappings[413] = ItemType.SpruceStairs; + mappings[414] = ItemType.BirchStairs; + mappings[415] = ItemType.JungleStairs; + mappings[416] = ItemType.AcaciaStairs; + mappings[417] = ItemType.CherryStairs; + mappings[418] = ItemType.DarkOakStairs; + mappings[419] = ItemType.PaleOakStairs; + mappings[420] = ItemType.MangroveStairs; + mappings[421] = ItemType.BambooStairs; + mappings[422] = ItemType.BambooMosaicStairs; + mappings[423] = ItemType.CrimsonStairs; + mappings[424] = ItemType.WarpedStairs; + mappings[425] = ItemType.CommandBlock; + mappings[426] = ItemType.Beacon; + mappings[427] = ItemType.CobblestoneWall; + mappings[428] = ItemType.MossyCobblestoneWall; + mappings[429] = ItemType.BrickWall; + mappings[430] = ItemType.PrismarineWall; + mappings[431] = ItemType.RedSandstoneWall; + mappings[432] = ItemType.MossyStoneBrickWall; + mappings[433] = ItemType.GraniteWall; + mappings[434] = ItemType.StoneBrickWall; + mappings[435] = ItemType.MudBrickWall; + mappings[436] = ItemType.NetherBrickWall; + mappings[437] = ItemType.AndesiteWall; + mappings[438] = ItemType.RedNetherBrickWall; + mappings[439] = ItemType.SandstoneWall; + mappings[440] = ItemType.EndStoneBrickWall; + mappings[441] = ItemType.DioriteWall; + mappings[442] = ItemType.BlackstoneWall; + mappings[443] = ItemType.PolishedBlackstoneWall; + mappings[444] = ItemType.PolishedBlackstoneBrickWall; + mappings[445] = ItemType.CobbledDeepslateWall; + mappings[446] = ItemType.PolishedDeepslateWall; + mappings[447] = ItemType.DeepslateBrickWall; + mappings[448] = ItemType.DeepslateTileWall; + mappings[449] = ItemType.Anvil; + mappings[450] = ItemType.ChippedAnvil; + mappings[451] = ItemType.DamagedAnvil; + mappings[452] = ItemType.ChiseledQuartzBlock; + mappings[453] = ItemType.QuartzBlock; + mappings[454] = ItemType.QuartzBricks; + mappings[455] = ItemType.QuartzPillar; + mappings[456] = ItemType.QuartzStairs; + mappings[457] = ItemType.WhiteTerracotta; + mappings[458] = ItemType.OrangeTerracotta; + mappings[459] = ItemType.MagentaTerracotta; + mappings[460] = ItemType.LightBlueTerracotta; + mappings[461] = ItemType.YellowTerracotta; + mappings[462] = ItemType.LimeTerracotta; + mappings[463] = ItemType.PinkTerracotta; + mappings[464] = ItemType.GrayTerracotta; + mappings[465] = ItemType.LightGrayTerracotta; + mappings[466] = ItemType.CyanTerracotta; + mappings[467] = ItemType.PurpleTerracotta; + mappings[468] = ItemType.BlueTerracotta; + mappings[469] = ItemType.BrownTerracotta; + mappings[470] = ItemType.GreenTerracotta; + mappings[471] = ItemType.RedTerracotta; + mappings[472] = ItemType.BlackTerracotta; + mappings[473] = ItemType.Barrier; + mappings[474] = ItemType.Light; + mappings[475] = ItemType.HayBlock; + mappings[476] = ItemType.WhiteCarpet; + mappings[477] = ItemType.OrangeCarpet; + mappings[478] = ItemType.MagentaCarpet; + mappings[479] = ItemType.LightBlueCarpet; + mappings[480] = ItemType.YellowCarpet; + mappings[481] = ItemType.LimeCarpet; + mappings[482] = ItemType.PinkCarpet; + mappings[483] = ItemType.GrayCarpet; + mappings[484] = ItemType.LightGrayCarpet; + mappings[485] = ItemType.CyanCarpet; + mappings[486] = ItemType.PurpleCarpet; + mappings[487] = ItemType.BlueCarpet; + mappings[488] = ItemType.BrownCarpet; + mappings[489] = ItemType.GreenCarpet; + mappings[490] = ItemType.RedCarpet; + mappings[491] = ItemType.BlackCarpet; + mappings[492] = ItemType.Terracotta; + mappings[493] = ItemType.PackedIce; + mappings[494] = ItemType.DirtPath; + mappings[495] = ItemType.Sunflower; + mappings[496] = ItemType.Lilac; + mappings[497] = ItemType.RoseBush; + mappings[498] = ItemType.Peony; + mappings[499] = ItemType.TallGrass; + mappings[500] = ItemType.LargeFern; + mappings[501] = ItemType.WhiteStainedGlass; + mappings[502] = ItemType.OrangeStainedGlass; + mappings[503] = ItemType.MagentaStainedGlass; + mappings[504] = ItemType.LightBlueStainedGlass; + mappings[505] = ItemType.YellowStainedGlass; + mappings[506] = ItemType.LimeStainedGlass; + mappings[507] = ItemType.PinkStainedGlass; + mappings[508] = ItemType.GrayStainedGlass; + mappings[509] = ItemType.LightGrayStainedGlass; + mappings[510] = ItemType.CyanStainedGlass; + mappings[511] = ItemType.PurpleStainedGlass; + mappings[512] = ItemType.BlueStainedGlass; + mappings[513] = ItemType.BrownStainedGlass; + mappings[514] = ItemType.GreenStainedGlass; + mappings[515] = ItemType.RedStainedGlass; + mappings[516] = ItemType.BlackStainedGlass; + mappings[517] = ItemType.WhiteStainedGlassPane; + mappings[518] = ItemType.OrangeStainedGlassPane; + mappings[519] = ItemType.MagentaStainedGlassPane; + mappings[520] = ItemType.LightBlueStainedGlassPane; + mappings[521] = ItemType.YellowStainedGlassPane; + mappings[522] = ItemType.LimeStainedGlassPane; + mappings[523] = ItemType.PinkStainedGlassPane; + mappings[524] = ItemType.GrayStainedGlassPane; + mappings[525] = ItemType.LightGrayStainedGlassPane; + mappings[526] = ItemType.CyanStainedGlassPane; + mappings[527] = ItemType.PurpleStainedGlassPane; + mappings[528] = ItemType.BlueStainedGlassPane; + mappings[529] = ItemType.BrownStainedGlassPane; + mappings[530] = ItemType.GreenStainedGlassPane; + mappings[531] = ItemType.RedStainedGlassPane; + mappings[532] = ItemType.BlackStainedGlassPane; + mappings[533] = ItemType.Prismarine; + mappings[534] = ItemType.PrismarineBricks; + mappings[535] = ItemType.DarkPrismarine; + mappings[536] = ItemType.PrismarineStairs; + mappings[537] = ItemType.PrismarineBrickStairs; + mappings[538] = ItemType.DarkPrismarineStairs; + mappings[539] = ItemType.SeaLantern; + mappings[540] = ItemType.RedSandstone; + mappings[541] = ItemType.ChiseledRedSandstone; + mappings[542] = ItemType.CutRedSandstone; + mappings[543] = ItemType.RedSandstoneStairs; + mappings[544] = ItemType.RepeatingCommandBlock; + mappings[545] = ItemType.ChainCommandBlock; + mappings[546] = ItemType.MagmaBlock; + mappings[547] = ItemType.NetherWartBlock; + mappings[548] = ItemType.WarpedWartBlock; + mappings[549] = ItemType.RedNetherBricks; + mappings[550] = ItemType.BoneBlock; + mappings[551] = ItemType.StructureVoid; + mappings[552] = ItemType.ShulkerBox; + mappings[553] = ItemType.WhiteShulkerBox; + mappings[554] = ItemType.OrangeShulkerBox; + mappings[555] = ItemType.MagentaShulkerBox; + mappings[556] = ItemType.LightBlueShulkerBox; + mappings[557] = ItemType.YellowShulkerBox; + mappings[558] = ItemType.LimeShulkerBox; + mappings[559] = ItemType.PinkShulkerBox; + mappings[560] = ItemType.GrayShulkerBox; + mappings[561] = ItemType.LightGrayShulkerBox; + mappings[562] = ItemType.CyanShulkerBox; + mappings[563] = ItemType.PurpleShulkerBox; + mappings[564] = ItemType.BlueShulkerBox; + mappings[565] = ItemType.BrownShulkerBox; + mappings[566] = ItemType.GreenShulkerBox; + mappings[567] = ItemType.RedShulkerBox; + mappings[568] = ItemType.BlackShulkerBox; + mappings[569] = ItemType.WhiteGlazedTerracotta; + mappings[570] = ItemType.OrangeGlazedTerracotta; + mappings[571] = ItemType.MagentaGlazedTerracotta; + mappings[572] = ItemType.LightBlueGlazedTerracotta; + mappings[573] = ItemType.YellowGlazedTerracotta; + mappings[574] = ItemType.LimeGlazedTerracotta; + mappings[575] = ItemType.PinkGlazedTerracotta; + mappings[576] = ItemType.GrayGlazedTerracotta; + mappings[577] = ItemType.LightGrayGlazedTerracotta; + mappings[578] = ItemType.CyanGlazedTerracotta; + mappings[579] = ItemType.PurpleGlazedTerracotta; + mappings[580] = ItemType.BlueGlazedTerracotta; + mappings[581] = ItemType.BrownGlazedTerracotta; + mappings[582] = ItemType.GreenGlazedTerracotta; + mappings[583] = ItemType.RedGlazedTerracotta; + mappings[584] = ItemType.BlackGlazedTerracotta; + mappings[585] = ItemType.WhiteConcrete; + mappings[586] = ItemType.OrangeConcrete; + mappings[587] = ItemType.MagentaConcrete; + mappings[588] = ItemType.LightBlueConcrete; + mappings[589] = ItemType.YellowConcrete; + mappings[590] = ItemType.LimeConcrete; + mappings[591] = ItemType.PinkConcrete; + mappings[592] = ItemType.GrayConcrete; + mappings[593] = ItemType.LightGrayConcrete; + mappings[594] = ItemType.CyanConcrete; + mappings[595] = ItemType.PurpleConcrete; + mappings[596] = ItemType.BlueConcrete; + mappings[597] = ItemType.BrownConcrete; + mappings[598] = ItemType.GreenConcrete; + mappings[599] = ItemType.RedConcrete; + mappings[600] = ItemType.BlackConcrete; + mappings[601] = ItemType.WhiteConcretePowder; + mappings[602] = ItemType.OrangeConcretePowder; + mappings[603] = ItemType.MagentaConcretePowder; + mappings[604] = ItemType.LightBlueConcretePowder; + mappings[605] = ItemType.YellowConcretePowder; + mappings[606] = ItemType.LimeConcretePowder; + mappings[607] = ItemType.PinkConcretePowder; + mappings[608] = ItemType.GrayConcretePowder; + mappings[609] = ItemType.LightGrayConcretePowder; + mappings[610] = ItemType.CyanConcretePowder; + mappings[611] = ItemType.PurpleConcretePowder; + mappings[612] = ItemType.BlueConcretePowder; + mappings[613] = ItemType.BrownConcretePowder; + mappings[614] = ItemType.GreenConcretePowder; + mappings[615] = ItemType.RedConcretePowder; + mappings[616] = ItemType.BlackConcretePowder; + mappings[617] = ItemType.TurtleEgg; + mappings[618] = ItemType.SnifferEgg; + mappings[619] = ItemType.DeadTubeCoralBlock; + mappings[620] = ItemType.DeadBrainCoralBlock; + mappings[621] = ItemType.DeadBubbleCoralBlock; + mappings[622] = ItemType.DeadFireCoralBlock; + mappings[623] = ItemType.DeadHornCoralBlock; + mappings[624] = ItemType.TubeCoralBlock; + mappings[625] = ItemType.BrainCoralBlock; + mappings[626] = ItemType.BubbleCoralBlock; + mappings[627] = ItemType.FireCoralBlock; + mappings[628] = ItemType.HornCoralBlock; + mappings[629] = ItemType.TubeCoral; + mappings[630] = ItemType.BrainCoral; + mappings[631] = ItemType.BubbleCoral; + mappings[632] = ItemType.FireCoral; + mappings[633] = ItemType.HornCoral; + mappings[634] = ItemType.DeadBrainCoral; + mappings[635] = ItemType.DeadBubbleCoral; + mappings[636] = ItemType.DeadFireCoral; + mappings[637] = ItemType.DeadHornCoral; + mappings[638] = ItemType.DeadTubeCoral; + mappings[639] = ItemType.TubeCoralFan; + mappings[640] = ItemType.BrainCoralFan; + mappings[641] = ItemType.BubbleCoralFan; + mappings[642] = ItemType.FireCoralFan; + mappings[643] = ItemType.HornCoralFan; + mappings[644] = ItemType.DeadTubeCoralFan; + mappings[645] = ItemType.DeadBrainCoralFan; + mappings[646] = ItemType.DeadBubbleCoralFan; + mappings[647] = ItemType.DeadFireCoralFan; + mappings[648] = ItemType.DeadHornCoralFan; + mappings[649] = ItemType.BlueIce; + mappings[650] = ItemType.Conduit; + mappings[651] = ItemType.PolishedGraniteStairs; + mappings[652] = ItemType.SmoothRedSandstoneStairs; + mappings[653] = ItemType.MossyStoneBrickStairs; + mappings[654] = ItemType.PolishedDioriteStairs; + mappings[655] = ItemType.MossyCobblestoneStairs; + mappings[656] = ItemType.EndStoneBrickStairs; + mappings[657] = ItemType.StoneStairs; + mappings[658] = ItemType.SmoothSandstoneStairs; + mappings[659] = ItemType.SmoothQuartzStairs; + mappings[660] = ItemType.GraniteStairs; + mappings[661] = ItemType.AndesiteStairs; + mappings[662] = ItemType.RedNetherBrickStairs; + mappings[663] = ItemType.PolishedAndesiteStairs; + mappings[664] = ItemType.DioriteStairs; + mappings[665] = ItemType.CobbledDeepslateStairs; + mappings[666] = ItemType.PolishedDeepslateStairs; + mappings[667] = ItemType.DeepslateBrickStairs; + mappings[668] = ItemType.DeepslateTileStairs; + mappings[669] = ItemType.PolishedGraniteSlab; + mappings[670] = ItemType.SmoothRedSandstoneSlab; + mappings[671] = ItemType.MossyStoneBrickSlab; + mappings[672] = ItemType.PolishedDioriteSlab; + mappings[673] = ItemType.MossyCobblestoneSlab; + mappings[674] = ItemType.EndStoneBrickSlab; + mappings[675] = ItemType.SmoothSandstoneSlab; + mappings[676] = ItemType.SmoothQuartzSlab; + mappings[677] = ItemType.GraniteSlab; + mappings[678] = ItemType.AndesiteSlab; + mappings[679] = ItemType.RedNetherBrickSlab; + mappings[680] = ItemType.PolishedAndesiteSlab; + mappings[681] = ItemType.DioriteSlab; + mappings[682] = ItemType.CobbledDeepslateSlab; + mappings[683] = ItemType.PolishedDeepslateSlab; + mappings[684] = ItemType.DeepslateBrickSlab; + mappings[685] = ItemType.DeepslateTileSlab; + mappings[686] = ItemType.Scaffolding; + mappings[687] = ItemType.Redstone; + mappings[688] = ItemType.RedstoneTorch; + mappings[689] = ItemType.RedstoneBlock; + mappings[690] = ItemType.Repeater; + mappings[691] = ItemType.Comparator; + mappings[692] = ItemType.Piston; + mappings[693] = ItemType.StickyPiston; + mappings[694] = ItemType.SlimeBlock; + mappings[695] = ItemType.HoneyBlock; + mappings[696] = ItemType.Observer; + mappings[697] = ItemType.Hopper; + mappings[698] = ItemType.Dispenser; + mappings[699] = ItemType.Dropper; + mappings[700] = ItemType.Lectern; + mappings[701] = ItemType.Target; + mappings[702] = ItemType.Lever; + mappings[703] = ItemType.LightningRod; + mappings[704] = ItemType.DaylightDetector; + mappings[705] = ItemType.SculkSensor; + mappings[706] = ItemType.CalibratedSculkSensor; + mappings[707] = ItemType.TripwireHook; + mappings[708] = ItemType.TrappedChest; + mappings[709] = ItemType.Tnt; + mappings[710] = ItemType.RedstoneLamp; + mappings[711] = ItemType.NoteBlock; + mappings[712] = ItemType.StoneButton; + mappings[713] = ItemType.PolishedBlackstoneButton; + mappings[714] = ItemType.OakButton; + mappings[715] = ItemType.SpruceButton; + mappings[716] = ItemType.BirchButton; + mappings[717] = ItemType.JungleButton; + mappings[718] = ItemType.AcaciaButton; + mappings[719] = ItemType.CherryButton; + mappings[720] = ItemType.DarkOakButton; + mappings[721] = ItemType.PaleOakButton; + mappings[722] = ItemType.MangroveButton; + mappings[723] = ItemType.BambooButton; + mappings[724] = ItemType.CrimsonButton; + mappings[725] = ItemType.WarpedButton; + mappings[726] = ItemType.StonePressurePlate; + mappings[727] = ItemType.PolishedBlackstonePressurePlate; + mappings[728] = ItemType.LightWeightedPressurePlate; + mappings[729] = ItemType.HeavyWeightedPressurePlate; + mappings[730] = ItemType.OakPressurePlate; + mappings[731] = ItemType.SprucePressurePlate; + mappings[732] = ItemType.BirchPressurePlate; + mappings[733] = ItemType.JunglePressurePlate; + mappings[734] = ItemType.AcaciaPressurePlate; + mappings[735] = ItemType.CherryPressurePlate; + mappings[736] = ItemType.DarkOakPressurePlate; + mappings[737] = ItemType.PaleOakPressurePlate; + mappings[738] = ItemType.MangrovePressurePlate; + mappings[739] = ItemType.BambooPressurePlate; + mappings[740] = ItemType.CrimsonPressurePlate; + mappings[741] = ItemType.WarpedPressurePlate; + mappings[742] = ItemType.IronDoor; + mappings[743] = ItemType.OakDoor; + mappings[744] = ItemType.SpruceDoor; + mappings[745] = ItemType.BirchDoor; + mappings[746] = ItemType.JungleDoor; + mappings[747] = ItemType.AcaciaDoor; + mappings[748] = ItemType.CherryDoor; + mappings[749] = ItemType.DarkOakDoor; + mappings[750] = ItemType.PaleOakDoor; + mappings[751] = ItemType.MangroveDoor; + mappings[752] = ItemType.BambooDoor; + mappings[753] = ItemType.CrimsonDoor; + mappings[754] = ItemType.WarpedDoor; + mappings[755] = ItemType.CopperDoor; + mappings[756] = ItemType.ExposedCopperDoor; + mappings[757] = ItemType.WeatheredCopperDoor; + mappings[758] = ItemType.OxidizedCopperDoor; + mappings[759] = ItemType.WaxedCopperDoor; + mappings[760] = ItemType.WaxedExposedCopperDoor; + mappings[761] = ItemType.WaxedWeatheredCopperDoor; + mappings[762] = ItemType.WaxedOxidizedCopperDoor; + mappings[763] = ItemType.IronTrapdoor; + mappings[764] = ItemType.OakTrapdoor; + mappings[765] = ItemType.SpruceTrapdoor; + mappings[766] = ItemType.BirchTrapdoor; + mappings[767] = ItemType.JungleTrapdoor; + mappings[768] = ItemType.AcaciaTrapdoor; + mappings[769] = ItemType.CherryTrapdoor; + mappings[770] = ItemType.DarkOakTrapdoor; + mappings[771] = ItemType.PaleOakTrapdoor; + mappings[772] = ItemType.MangroveTrapdoor; + mappings[773] = ItemType.BambooTrapdoor; + mappings[774] = ItemType.CrimsonTrapdoor; + mappings[775] = ItemType.WarpedTrapdoor; + mappings[776] = ItemType.CopperTrapdoor; + mappings[777] = ItemType.ExposedCopperTrapdoor; + mappings[778] = ItemType.WeatheredCopperTrapdoor; + mappings[779] = ItemType.OxidizedCopperTrapdoor; + mappings[780] = ItemType.WaxedCopperTrapdoor; + mappings[781] = ItemType.WaxedExposedCopperTrapdoor; + mappings[782] = ItemType.WaxedWeatheredCopperTrapdoor; + mappings[783] = ItemType.WaxedOxidizedCopperTrapdoor; + mappings[784] = ItemType.OakFenceGate; + mappings[785] = ItemType.SpruceFenceGate; + mappings[786] = ItemType.BirchFenceGate; + mappings[787] = ItemType.JungleFenceGate; + mappings[788] = ItemType.AcaciaFenceGate; + mappings[789] = ItemType.CherryFenceGate; + mappings[790] = ItemType.DarkOakFenceGate; + mappings[791] = ItemType.PaleOakFenceGate; + mappings[792] = ItemType.MangroveFenceGate; + mappings[793] = ItemType.BambooFenceGate; + mappings[794] = ItemType.CrimsonFenceGate; + mappings[795] = ItemType.WarpedFenceGate; + mappings[796] = ItemType.PoweredRail; + mappings[797] = ItemType.DetectorRail; + mappings[798] = ItemType.Rail; + mappings[799] = ItemType.ActivatorRail; + mappings[800] = ItemType.Saddle; + mappings[801] = ItemType.Minecart; + mappings[802] = ItemType.ChestMinecart; + mappings[803] = ItemType.FurnaceMinecart; + mappings[804] = ItemType.TntMinecart; + mappings[805] = ItemType.HopperMinecart; + mappings[806] = ItemType.CarrotOnAStick; + mappings[807] = ItemType.WarpedFungusOnAStick; + mappings[808] = ItemType.PhantomMembrane; + mappings[809] = ItemType.Elytra; + mappings[810] = ItemType.OakBoat; + mappings[811] = ItemType.OakChestBoat; + mappings[812] = ItemType.SpruceBoat; + mappings[813] = ItemType.SpruceChestBoat; + mappings[814] = ItemType.BirchBoat; + mappings[815] = ItemType.BirchChestBoat; + mappings[816] = ItemType.JungleBoat; + mappings[817] = ItemType.JungleChestBoat; + mappings[818] = ItemType.AcaciaBoat; + mappings[819] = ItemType.AcaciaChestBoat; + mappings[820] = ItemType.CherryBoat; + mappings[821] = ItemType.CherryChestBoat; + mappings[822] = ItemType.DarkOakBoat; + mappings[823] = ItemType.DarkOakChestBoat; + mappings[824] = ItemType.PaleOakBoat; + mappings[825] = ItemType.PaleOakChestBoat; + mappings[826] = ItemType.MangroveBoat; + mappings[827] = ItemType.MangroveChestBoat; + mappings[828] = ItemType.BambooRaft; + mappings[829] = ItemType.BambooChestRaft; + mappings[830] = ItemType.StructureBlock; + mappings[831] = ItemType.Jigsaw; + mappings[832] = ItemType.TestBlock; + mappings[833] = ItemType.TestInstanceBlock; + mappings[834] = ItemType.TurtleHelmet; + mappings[835] = ItemType.TurtleScute; + mappings[836] = ItemType.ArmadilloScute; + mappings[837] = ItemType.WolfArmor; + mappings[838] = ItemType.FlintAndSteel; + mappings[839] = ItemType.Bowl; + mappings[840] = ItemType.Apple; + mappings[841] = ItemType.Bow; + mappings[842] = ItemType.Arrow; + mappings[843] = ItemType.Coal; + mappings[844] = ItemType.Charcoal; + mappings[845] = ItemType.Diamond; + mappings[846] = ItemType.Emerald; + mappings[847] = ItemType.LapisLazuli; + mappings[848] = ItemType.Quartz; + mappings[849] = ItemType.AmethystShard; + mappings[850] = ItemType.RawIron; + mappings[851] = ItemType.IronIngot; + mappings[852] = ItemType.RawCopper; + mappings[853] = ItemType.CopperIngot; + mappings[854] = ItemType.RawGold; + mappings[855] = ItemType.GoldIngot; + mappings[856] = ItemType.NetheriteIngot; + mappings[857] = ItemType.NetheriteScrap; + mappings[858] = ItemType.WoodenSword; + mappings[859] = ItemType.WoodenShovel; + mappings[860] = ItemType.WoodenPickaxe; + mappings[861] = ItemType.WoodenAxe; + mappings[862] = ItemType.WoodenHoe; + mappings[863] = ItemType.StoneSword; + mappings[864] = ItemType.StoneShovel; + mappings[865] = ItemType.StonePickaxe; + mappings[866] = ItemType.StoneAxe; + mappings[867] = ItemType.StoneHoe; + mappings[868] = ItemType.GoldenSword; + mappings[869] = ItemType.GoldenShovel; + mappings[870] = ItemType.GoldenPickaxe; + mappings[871] = ItemType.GoldenAxe; + mappings[872] = ItemType.GoldenHoe; + mappings[873] = ItemType.IronSword; + mappings[874] = ItemType.IronShovel; + mappings[875] = ItemType.IronPickaxe; + mappings[876] = ItemType.IronAxe; + mappings[877] = ItemType.IronHoe; + mappings[878] = ItemType.DiamondSword; + mappings[879] = ItemType.DiamondShovel; + mappings[880] = ItemType.DiamondPickaxe; + mappings[881] = ItemType.DiamondAxe; + mappings[882] = ItemType.DiamondHoe; + mappings[883] = ItemType.NetheriteSword; + mappings[884] = ItemType.NetheriteShovel; + mappings[885] = ItemType.NetheritePickaxe; + mappings[886] = ItemType.NetheriteAxe; + mappings[887] = ItemType.NetheriteHoe; + mappings[888] = ItemType.Stick; + mappings[889] = ItemType.MushroomStew; + mappings[890] = ItemType.String; + mappings[891] = ItemType.Feather; + mappings[892] = ItemType.Gunpowder; + mappings[893] = ItemType.WheatSeeds; + mappings[894] = ItemType.Wheat; + mappings[895] = ItemType.Bread; + mappings[896] = ItemType.LeatherHelmet; + mappings[897] = ItemType.LeatherChestplate; + mappings[898] = ItemType.LeatherLeggings; + mappings[899] = ItemType.LeatherBoots; + mappings[900] = ItemType.ChainmailHelmet; + mappings[901] = ItemType.ChainmailChestplate; + mappings[902] = ItemType.ChainmailLeggings; + mappings[903] = ItemType.ChainmailBoots; + mappings[904] = ItemType.IronHelmet; + mappings[905] = ItemType.IronChestplate; + mappings[906] = ItemType.IronLeggings; + mappings[907] = ItemType.IronBoots; + mappings[908] = ItemType.DiamondHelmet; + mappings[909] = ItemType.DiamondChestplate; + mappings[910] = ItemType.DiamondLeggings; + mappings[911] = ItemType.DiamondBoots; + mappings[912] = ItemType.GoldenHelmet; + mappings[913] = ItemType.GoldenChestplate; + mappings[914] = ItemType.GoldenLeggings; + mappings[915] = ItemType.GoldenBoots; + mappings[916] = ItemType.NetheriteHelmet; + mappings[917] = ItemType.NetheriteChestplate; + mappings[918] = ItemType.NetheriteLeggings; + mappings[919] = ItemType.NetheriteBoots; + mappings[920] = ItemType.Flint; + mappings[921] = ItemType.Porkchop; + mappings[922] = ItemType.CookedPorkchop; + mappings[923] = ItemType.Painting; + mappings[924] = ItemType.GoldenApple; + mappings[925] = ItemType.EnchantedGoldenApple; + mappings[926] = ItemType.OakSign; + mappings[927] = ItemType.SpruceSign; + mappings[928] = ItemType.BirchSign; + mappings[929] = ItemType.JungleSign; + mappings[930] = ItemType.AcaciaSign; + mappings[931] = ItemType.CherrySign; + mappings[932] = ItemType.DarkOakSign; + mappings[933] = ItemType.PaleOakSign; + mappings[934] = ItemType.MangroveSign; + mappings[935] = ItemType.BambooSign; + mappings[936] = ItemType.CrimsonSign; + mappings[937] = ItemType.WarpedSign; + mappings[938] = ItemType.OakHangingSign; + mappings[939] = ItemType.SpruceHangingSign; + mappings[940] = ItemType.BirchHangingSign; + mappings[941] = ItemType.JungleHangingSign; + mappings[942] = ItemType.AcaciaHangingSign; + mappings[943] = ItemType.CherryHangingSign; + mappings[944] = ItemType.DarkOakHangingSign; + mappings[945] = ItemType.PaleOakHangingSign; + mappings[946] = ItemType.MangroveHangingSign; + mappings[947] = ItemType.BambooHangingSign; + mappings[948] = ItemType.CrimsonHangingSign; + mappings[949] = ItemType.WarpedHangingSign; + mappings[950] = ItemType.Bucket; + mappings[951] = ItemType.WaterBucket; + mappings[952] = ItemType.LavaBucket; + mappings[953] = ItemType.PowderSnowBucket; + mappings[954] = ItemType.Snowball; + mappings[955] = ItemType.Leather; + mappings[956] = ItemType.MilkBucket; + mappings[957] = ItemType.PufferfishBucket; + mappings[958] = ItemType.SalmonBucket; + mappings[959] = ItemType.CodBucket; + mappings[960] = ItemType.TropicalFishBucket; + mappings[961] = ItemType.AxolotlBucket; + mappings[962] = ItemType.TadpoleBucket; + mappings[963] = ItemType.Brick; + mappings[964] = ItemType.ClayBall; + mappings[965] = ItemType.DriedKelpBlock; + mappings[966] = ItemType.Paper; + mappings[967] = ItemType.Book; + mappings[968] = ItemType.SlimeBall; + mappings[969] = ItemType.Egg; + mappings[970] = ItemType.BlueEgg; + mappings[971] = ItemType.BrownEgg; + mappings[972] = ItemType.Compass; + mappings[973] = ItemType.RecoveryCompass; + mappings[974] = ItemType.Bundle; + mappings[975] = ItemType.WhiteBundle; + mappings[976] = ItemType.OrangeBundle; + mappings[977] = ItemType.MagentaBundle; + mappings[978] = ItemType.LightBlueBundle; + mappings[979] = ItemType.YellowBundle; + mappings[980] = ItemType.LimeBundle; + mappings[981] = ItemType.PinkBundle; + mappings[982] = ItemType.GrayBundle; + mappings[983] = ItemType.LightGrayBundle; + mappings[984] = ItemType.CyanBundle; + mappings[985] = ItemType.PurpleBundle; + mappings[986] = ItemType.BlueBundle; + mappings[987] = ItemType.BrownBundle; + mappings[988] = ItemType.GreenBundle; + mappings[989] = ItemType.RedBundle; + mappings[990] = ItemType.BlackBundle; + mappings[991] = ItemType.FishingRod; + mappings[992] = ItemType.Clock; + mappings[993] = ItemType.Spyglass; + mappings[994] = ItemType.GlowstoneDust; + mappings[995] = ItemType.Cod; + mappings[996] = ItemType.Salmon; + mappings[997] = ItemType.TropicalFish; + mappings[998] = ItemType.Pufferfish; + mappings[999] = ItemType.CookedCod; + mappings[1000] = ItemType.CookedSalmon; + mappings[1001] = ItemType.InkSac; + mappings[1002] = ItemType.GlowInkSac; + mappings[1003] = ItemType.CocoaBeans; + mappings[1004] = ItemType.WhiteDye; + mappings[1005] = ItemType.OrangeDye; + mappings[1006] = ItemType.MagentaDye; + mappings[1007] = ItemType.LightBlueDye; + mappings[1008] = ItemType.YellowDye; + mappings[1009] = ItemType.LimeDye; + mappings[1010] = ItemType.PinkDye; + mappings[1011] = ItemType.GrayDye; + mappings[1012] = ItemType.LightGrayDye; + mappings[1013] = ItemType.CyanDye; + mappings[1014] = ItemType.PurpleDye; + mappings[1015] = ItemType.BlueDye; + mappings[1016] = ItemType.BrownDye; + mappings[1017] = ItemType.GreenDye; + mappings[1018] = ItemType.RedDye; + mappings[1019] = ItemType.BlackDye; + mappings[1020] = ItemType.BoneMeal; + mappings[1021] = ItemType.Bone; + mappings[1022] = ItemType.Sugar; + mappings[1023] = ItemType.Cake; + mappings[1024] = ItemType.WhiteBed; + mappings[1025] = ItemType.OrangeBed; + mappings[1026] = ItemType.MagentaBed; + mappings[1027] = ItemType.LightBlueBed; + mappings[1028] = ItemType.YellowBed; + mappings[1029] = ItemType.LimeBed; + mappings[1030] = ItemType.PinkBed; + mappings[1031] = ItemType.GrayBed; + mappings[1032] = ItemType.LightGrayBed; + mappings[1033] = ItemType.CyanBed; + mappings[1034] = ItemType.PurpleBed; + mappings[1035] = ItemType.BlueBed; + mappings[1036] = ItemType.BrownBed; + mappings[1037] = ItemType.GreenBed; + mappings[1038] = ItemType.RedBed; + mappings[1039] = ItemType.BlackBed; + mappings[1040] = ItemType.Cookie; + mappings[1041] = ItemType.Crafter; + mappings[1042] = ItemType.FilledMap; + mappings[1043] = ItemType.Shears; + mappings[1044] = ItemType.MelonSlice; + mappings[1045] = ItemType.DriedKelp; + mappings[1046] = ItemType.PumpkinSeeds; + mappings[1047] = ItemType.MelonSeeds; + mappings[1048] = ItemType.Beef; + mappings[1049] = ItemType.CookedBeef; + mappings[1050] = ItemType.Chicken; + mappings[1051] = ItemType.CookedChicken; + mappings[1052] = ItemType.RottenFlesh; + mappings[1053] = ItemType.EnderPearl; + mappings[1054] = ItemType.BlazeRod; + mappings[1055] = ItemType.GhastTear; + mappings[1056] = ItemType.GoldNugget; + mappings[1057] = ItemType.NetherWart; + mappings[1058] = ItemType.GlassBottle; + mappings[1059] = ItemType.Potion; + mappings[1060] = ItemType.SpiderEye; + mappings[1061] = ItemType.FermentedSpiderEye; + mappings[1062] = ItemType.BlazePowder; + mappings[1063] = ItemType.MagmaCream; + mappings[1064] = ItemType.BrewingStand; + mappings[1065] = ItemType.Cauldron; + mappings[1066] = ItemType.EnderEye; + mappings[1067] = ItemType.GlisteringMelonSlice; + mappings[1068] = ItemType.ArmadilloSpawnEgg; + mappings[1069] = ItemType.AllaySpawnEgg; + mappings[1070] = ItemType.AxolotlSpawnEgg; + mappings[1071] = ItemType.BatSpawnEgg; + mappings[1072] = ItemType.BeeSpawnEgg; + mappings[1073] = ItemType.BlazeSpawnEgg; + mappings[1074] = ItemType.BoggedSpawnEgg; + mappings[1075] = ItemType.BreezeSpawnEgg; + mappings[1076] = ItemType.CatSpawnEgg; + mappings[1077] = ItemType.CamelSpawnEgg; + mappings[1078] = ItemType.CaveSpiderSpawnEgg; + mappings[1079] = ItemType.ChickenSpawnEgg; + mappings[1080] = ItemType.CodSpawnEgg; + mappings[1081] = ItemType.CowSpawnEgg; + mappings[1082] = ItemType.CreeperSpawnEgg; + mappings[1083] = ItemType.DolphinSpawnEgg; + mappings[1084] = ItemType.DonkeySpawnEgg; + mappings[1085] = ItemType.DrownedSpawnEgg; + mappings[1086] = ItemType.ElderGuardianSpawnEgg; + mappings[1087] = ItemType.EnderDragonSpawnEgg; + mappings[1088] = ItemType.EndermanSpawnEgg; + mappings[1089] = ItemType.EndermiteSpawnEgg; + mappings[1090] = ItemType.EvokerSpawnEgg; + mappings[1091] = ItemType.FoxSpawnEgg; + mappings[1092] = ItemType.FrogSpawnEgg; + mappings[1093] = ItemType.GhastSpawnEgg; + mappings[1094] = ItemType.GlowSquidSpawnEgg; + mappings[1095] = ItemType.GoatSpawnEgg; + mappings[1096] = ItemType.GuardianSpawnEgg; + mappings[1097] = ItemType.HoglinSpawnEgg; + mappings[1098] = ItemType.HorseSpawnEgg; + mappings[1099] = ItemType.HuskSpawnEgg; + mappings[1100] = ItemType.IronGolemSpawnEgg; + mappings[1101] = ItemType.LlamaSpawnEgg; + mappings[1102] = ItemType.MagmaCubeSpawnEgg; + mappings[1103] = ItemType.MooshroomSpawnEgg; + mappings[1104] = ItemType.MuleSpawnEgg; + mappings[1105] = ItemType.OcelotSpawnEgg; + mappings[1106] = ItemType.PandaSpawnEgg; + mappings[1107] = ItemType.ParrotSpawnEgg; + mappings[1108] = ItemType.PhantomSpawnEgg; + mappings[1109] = ItemType.PigSpawnEgg; + mappings[1110] = ItemType.PiglinSpawnEgg; + mappings[1111] = ItemType.PiglinBruteSpawnEgg; + mappings[1112] = ItemType.PillagerSpawnEgg; + mappings[1113] = ItemType.PolarBearSpawnEgg; + mappings[1114] = ItemType.PufferfishSpawnEgg; + mappings[1115] = ItemType.RabbitSpawnEgg; + mappings[1116] = ItemType.RavagerSpawnEgg; + mappings[1117] = ItemType.SalmonSpawnEgg; + mappings[1118] = ItemType.SheepSpawnEgg; + mappings[1119] = ItemType.ShulkerSpawnEgg; + mappings[1120] = ItemType.SilverfishSpawnEgg; + mappings[1121] = ItemType.SkeletonSpawnEgg; + mappings[1122] = ItemType.SkeletonHorseSpawnEgg; + mappings[1123] = ItemType.SlimeSpawnEgg; + mappings[1124] = ItemType.SnifferSpawnEgg; + mappings[1125] = ItemType.SnowGolemSpawnEgg; + mappings[1126] = ItemType.SpiderSpawnEgg; + mappings[1127] = ItemType.SquidSpawnEgg; + mappings[1128] = ItemType.StraySpawnEgg; + mappings[1129] = ItemType.StriderSpawnEgg; + mappings[1130] = ItemType.TadpoleSpawnEgg; + mappings[1131] = ItemType.TraderLlamaSpawnEgg; + mappings[1132] = ItemType.TropicalFishSpawnEgg; + mappings[1133] = ItemType.TurtleSpawnEgg; + mappings[1134] = ItemType.VexSpawnEgg; + mappings[1135] = ItemType.VillagerSpawnEgg; + mappings[1136] = ItemType.VindicatorSpawnEgg; + mappings[1137] = ItemType.WanderingTraderSpawnEgg; + mappings[1138] = ItemType.WardenSpawnEgg; + mappings[1139] = ItemType.WitchSpawnEgg; + mappings[1140] = ItemType.WitherSpawnEgg; + mappings[1141] = ItemType.WitherSkeletonSpawnEgg; + mappings[1142] = ItemType.WolfSpawnEgg; + mappings[1143] = ItemType.ZoglinSpawnEgg; + mappings[1144] = ItemType.CreakingSpawnEgg; + mappings[1145] = ItemType.ZombieSpawnEgg; + mappings[1146] = ItemType.ZombieHorseSpawnEgg; + mappings[1147] = ItemType.ZombieVillagerSpawnEgg; + mappings[1148] = ItemType.ZombifiedPiglinSpawnEgg; + mappings[1149] = ItemType.ExperienceBottle; + mappings[1150] = ItemType.FireCharge; + mappings[1151] = ItemType.WindCharge; + mappings[1152] = ItemType.WritableBook; + mappings[1153] = ItemType.WrittenBook; + mappings[1154] = ItemType.BreezeRod; + mappings[1155] = ItemType.Mace; + mappings[1156] = ItemType.ItemFrame; + mappings[1157] = ItemType.GlowItemFrame; + mappings[1158] = ItemType.FlowerPot; + mappings[1159] = ItemType.Carrot; + mappings[1160] = ItemType.Potato; + mappings[1161] = ItemType.BakedPotato; + mappings[1162] = ItemType.PoisonousPotato; + mappings[1163] = ItemType.Map; + mappings[1164] = ItemType.GoldenCarrot; + mappings[1165] = ItemType.SkeletonSkull; + mappings[1166] = ItemType.WitherSkeletonSkull; + mappings[1167] = ItemType.PlayerHead; + mappings[1168] = ItemType.ZombieHead; + mappings[1169] = ItemType.CreeperHead; + mappings[1170] = ItemType.DragonHead; + mappings[1171] = ItemType.PiglinHead; + mappings[1172] = ItemType.NetherStar; + mappings[1173] = ItemType.PumpkinPie; + mappings[1174] = ItemType.FireworkRocket; + mappings[1175] = ItemType.FireworkStar; + mappings[1176] = ItemType.EnchantedBook; + mappings[1177] = ItemType.NetherBrick; + mappings[1178] = ItemType.ResinBrick; + mappings[1179] = ItemType.PrismarineShard; + mappings[1180] = ItemType.PrismarineCrystals; + mappings[1181] = ItemType.Rabbit; + mappings[1182] = ItemType.CookedRabbit; + mappings[1183] = ItemType.RabbitStew; + mappings[1184] = ItemType.RabbitFoot; + mappings[1185] = ItemType.RabbitHide; + mappings[1186] = ItemType.ArmorStand; + mappings[1187] = ItemType.IronHorseArmor; + mappings[1188] = ItemType.GoldenHorseArmor; + mappings[1189] = ItemType.DiamondHorseArmor; + mappings[1190] = ItemType.LeatherHorseArmor; + mappings[1191] = ItemType.Lead; + mappings[1192] = ItemType.NameTag; + mappings[1193] = ItemType.CommandBlockMinecart; + mappings[1194] = ItemType.Mutton; + mappings[1195] = ItemType.CookedMutton; + mappings[1196] = ItemType.WhiteBanner; + mappings[1197] = ItemType.OrangeBanner; + mappings[1198] = ItemType.MagentaBanner; + mappings[1199] = ItemType.LightBlueBanner; + mappings[1200] = ItemType.YellowBanner; + mappings[1201] = ItemType.LimeBanner; + mappings[1202] = ItemType.PinkBanner; + mappings[1203] = ItemType.GrayBanner; + mappings[1204] = ItemType.LightGrayBanner; + mappings[1205] = ItemType.CyanBanner; + mappings[1206] = ItemType.PurpleBanner; + mappings[1207] = ItemType.BlueBanner; + mappings[1208] = ItemType.BrownBanner; + mappings[1209] = ItemType.GreenBanner; + mappings[1210] = ItemType.RedBanner; + mappings[1211] = ItemType.BlackBanner; + mappings[1212] = ItemType.EndCrystal; + mappings[1213] = ItemType.ChorusFruit; + mappings[1214] = ItemType.PoppedChorusFruit; + mappings[1215] = ItemType.TorchflowerSeeds; + mappings[1216] = ItemType.PitcherPod; + mappings[1217] = ItemType.Beetroot; + mappings[1218] = ItemType.BeetrootSeeds; + mappings[1219] = ItemType.BeetrootSoup; + mappings[1220] = ItemType.DragonBreath; + mappings[1221] = ItemType.SplashPotion; + mappings[1222] = ItemType.SpectralArrow; + mappings[1223] = ItemType.TippedArrow; + mappings[1224] = ItemType.LingeringPotion; + mappings[1225] = ItemType.Shield; + mappings[1226] = ItemType.TotemOfUndying; + mappings[1227] = ItemType.ShulkerShell; + mappings[1228] = ItemType.IronNugget; + mappings[1229] = ItemType.KnowledgeBook; + mappings[1230] = ItemType.DebugStick; + mappings[1231] = ItemType.MusicDisc13; + mappings[1232] = ItemType.MusicDiscCat; + mappings[1233] = ItemType.MusicDiscBlocks; + mappings[1234] = ItemType.MusicDiscChirp; + mappings[1235] = ItemType.MusicDiscCreator; + mappings[1236] = ItemType.MusicDiscCreatorMusicBox; + mappings[1237] = ItemType.MusicDiscFar; + mappings[1238] = ItemType.MusicDiscMall; + mappings[1239] = ItemType.MusicDiscMellohi; + mappings[1240] = ItemType.MusicDiscStal; + mappings[1241] = ItemType.MusicDiscStrad; + mappings[1242] = ItemType.MusicDiscWard; + mappings[1243] = ItemType.MusicDisc11; + mappings[1244] = ItemType.MusicDiscWait; + mappings[1245] = ItemType.MusicDiscOtherside; + mappings[1246] = ItemType.MusicDiscRelic; + mappings[1247] = ItemType.MusicDisc5; + mappings[1248] = ItemType.MusicDiscPigstep; + mappings[1249] = ItemType.MusicDiscPrecipice; + mappings[1250] = ItemType.DiscFragment5; + mappings[1251] = ItemType.Trident; + mappings[1252] = ItemType.NautilusShell; + mappings[1253] = ItemType.HeartOfTheSea; + mappings[1254] = ItemType.Crossbow; + mappings[1255] = ItemType.SuspiciousStew; + mappings[1256] = ItemType.Loom; + mappings[1257] = ItemType.FlowerBannerPattern; + mappings[1258] = ItemType.CreeperBannerPattern; + mappings[1259] = ItemType.SkullBannerPattern; + mappings[1260] = ItemType.MojangBannerPattern; + mappings[1261] = ItemType.GlobeBannerPattern; + mappings[1262] = ItemType.PiglinBannerPattern; + mappings[1263] = ItemType.FlowBannerPattern; + mappings[1264] = ItemType.GusterBannerPattern; + mappings[1265] = ItemType.FieldMasonedBannerPattern; + mappings[1266] = ItemType.BordureIndentedBannerPattern; + mappings[1267] = ItemType.GoatHorn; + mappings[1268] = ItemType.Composter; + mappings[1269] = ItemType.Barrel; + mappings[1270] = ItemType.Smoker; + mappings[1271] = ItemType.BlastFurnace; + mappings[1272] = ItemType.CartographyTable; + mappings[1273] = ItemType.FletchingTable; + mappings[1274] = ItemType.Grindstone; + mappings[1275] = ItemType.SmithingTable; + mappings[1276] = ItemType.Stonecutter; + mappings[1277] = ItemType.Bell; + mappings[1278] = ItemType.Lantern; + mappings[1279] = ItemType.SoulLantern; + mappings[1280] = ItemType.SweetBerries; + mappings[1281] = ItemType.GlowBerries; + mappings[1282] = ItemType.Campfire; + mappings[1283] = ItemType.SoulCampfire; + mappings[1284] = ItemType.Shroomlight; + mappings[1285] = ItemType.Honeycomb; + mappings[1286] = ItemType.BeeNest; + mappings[1287] = ItemType.Beehive; + mappings[1288] = ItemType.HoneyBottle; + mappings[1289] = ItemType.HoneycombBlock; + mappings[1290] = ItemType.Lodestone; + mappings[1291] = ItemType.CryingObsidian; + mappings[1292] = ItemType.Blackstone; + mappings[1293] = ItemType.BlackstoneSlab; + mappings[1294] = ItemType.BlackstoneStairs; + mappings[1295] = ItemType.GildedBlackstone; + mappings[1296] = ItemType.PolishedBlackstone; + mappings[1297] = ItemType.PolishedBlackstoneSlab; + mappings[1298] = ItemType.PolishedBlackstoneStairs; + mappings[1299] = ItemType.ChiseledPolishedBlackstone; + mappings[1300] = ItemType.PolishedBlackstoneBricks; + mappings[1301] = ItemType.PolishedBlackstoneBrickSlab; + mappings[1302] = ItemType.PolishedBlackstoneBrickStairs; + mappings[1303] = ItemType.CrackedPolishedBlackstoneBricks; + mappings[1304] = ItemType.RespawnAnchor; + mappings[1305] = ItemType.Candle; + mappings[1306] = ItemType.WhiteCandle; + mappings[1307] = ItemType.OrangeCandle; + mappings[1308] = ItemType.MagentaCandle; + mappings[1309] = ItemType.LightBlueCandle; + mappings[1310] = ItemType.YellowCandle; + mappings[1311] = ItemType.LimeCandle; + mappings[1312] = ItemType.PinkCandle; + mappings[1313] = ItemType.GrayCandle; + mappings[1314] = ItemType.LightGrayCandle; + mappings[1315] = ItemType.CyanCandle; + mappings[1316] = ItemType.PurpleCandle; + mappings[1317] = ItemType.BlueCandle; + mappings[1318] = ItemType.BrownCandle; + mappings[1319] = ItemType.GreenCandle; + mappings[1320] = ItemType.RedCandle; + mappings[1321] = ItemType.BlackCandle; + mappings[1322] = ItemType.SmallAmethystBud; + mappings[1323] = ItemType.MediumAmethystBud; + mappings[1324] = ItemType.LargeAmethystBud; + mappings[1325] = ItemType.AmethystCluster; + mappings[1326] = ItemType.PointedDripstone; + mappings[1327] = ItemType.OchreFroglight; + mappings[1328] = ItemType.VerdantFroglight; + mappings[1329] = ItemType.PearlescentFroglight; + mappings[1330] = ItemType.Frogspawn; + mappings[1331] = ItemType.EchoShard; + mappings[1332] = ItemType.Brush; + mappings[1333] = ItemType.NetheriteUpgradeSmithingTemplate; + mappings[1334] = ItemType.SentryArmorTrimSmithingTemplate; + mappings[1335] = ItemType.DuneArmorTrimSmithingTemplate; + mappings[1336] = ItemType.CoastArmorTrimSmithingTemplate; + mappings[1337] = ItemType.WildArmorTrimSmithingTemplate; + mappings[1338] = ItemType.WardArmorTrimSmithingTemplate; + mappings[1339] = ItemType.EyeArmorTrimSmithingTemplate; + mappings[1340] = ItemType.VexArmorTrimSmithingTemplate; + mappings[1341] = ItemType.TideArmorTrimSmithingTemplate; + mappings[1342] = ItemType.SnoutArmorTrimSmithingTemplate; + mappings[1343] = ItemType.RibArmorTrimSmithingTemplate; + mappings[1344] = ItemType.SpireArmorTrimSmithingTemplate; + mappings[1345] = ItemType.WayfinderArmorTrimSmithingTemplate; + mappings[1346] = ItemType.ShaperArmorTrimSmithingTemplate; + mappings[1347] = ItemType.SilenceArmorTrimSmithingTemplate; + mappings[1348] = ItemType.RaiserArmorTrimSmithingTemplate; + mappings[1349] = ItemType.HostArmorTrimSmithingTemplate; + mappings[1350] = ItemType.FlowArmorTrimSmithingTemplate; + mappings[1351] = ItemType.BoltArmorTrimSmithingTemplate; + mappings[1352] = ItemType.AnglerPotterySherd; + mappings[1353] = ItemType.ArcherPotterySherd; + mappings[1354] = ItemType.ArmsUpPotterySherd; + mappings[1355] = ItemType.BladePotterySherd; + mappings[1356] = ItemType.BrewerPotterySherd; + mappings[1357] = ItemType.BurnPotterySherd; + mappings[1358] = ItemType.DangerPotterySherd; + mappings[1359] = ItemType.ExplorerPotterySherd; + mappings[1360] = ItemType.FlowPotterySherd; + mappings[1361] = ItemType.FriendPotterySherd; + mappings[1362] = ItemType.GusterPotterySherd; + mappings[1363] = ItemType.HeartPotterySherd; + mappings[1364] = ItemType.HeartbreakPotterySherd; + mappings[1365] = ItemType.HowlPotterySherd; + mappings[1366] = ItemType.MinerPotterySherd; + mappings[1367] = ItemType.MournerPotterySherd; + mappings[1368] = ItemType.PlentyPotterySherd; + mappings[1369] = ItemType.PrizePotterySherd; + mappings[1370] = ItemType.ScrapePotterySherd; + mappings[1371] = ItemType.SheafPotterySherd; + mappings[1372] = ItemType.ShelterPotterySherd; + mappings[1373] = ItemType.SkullPotterySherd; + mappings[1374] = ItemType.SnortPotterySherd; + mappings[1375] = ItemType.CopperGrate; + mappings[1376] = ItemType.ExposedCopperGrate; + mappings[1377] = ItemType.WeatheredCopperGrate; + mappings[1378] = ItemType.OxidizedCopperGrate; + mappings[1379] = ItemType.WaxedCopperGrate; + mappings[1380] = ItemType.WaxedExposedCopperGrate; + mappings[1381] = ItemType.WaxedWeatheredCopperGrate; + mappings[1382] = ItemType.WaxedOxidizedCopperGrate; + mappings[1383] = ItemType.CopperBulb; + mappings[1384] = ItemType.ExposedCopperBulb; + mappings[1385] = ItemType.WeatheredCopperBulb; + mappings[1386] = ItemType.OxidizedCopperBulb; + mappings[1387] = ItemType.WaxedCopperBulb; + mappings[1388] = ItemType.WaxedExposedCopperBulb; + mappings[1389] = ItemType.WaxedWeatheredCopperBulb; + mappings[1390] = ItemType.WaxedOxidizedCopperBulb; + mappings[1391] = ItemType.TrialSpawner; + mappings[1392] = ItemType.TrialKey; + mappings[1393] = ItemType.OminousTrialKey; + mappings[1394] = ItemType.Vault; + mappings[1395] = ItemType.OminousBottle; + } + + protected override Dictionary GetDict() + { + return mappings; + } + } +} diff --git a/MinecraftClient/Inventory/ItemType.cs b/MinecraftClient/Inventory/ItemType.cs index bbe97785..1809b7ab 100644 --- a/MinecraftClient/Inventory/ItemType.cs +++ b/MinecraftClient/Inventory/ItemType.cs @@ -138,6 +138,7 @@ namespace MinecraftClient.Inventory BlueConcrete, BlueConcretePowder, BlueDye, + BlueEgg, // blue egg BlueGlazedTerracotta, BlueIce, BlueOrchid, @@ -177,6 +178,7 @@ namespace MinecraftClient.Inventory BrownConcrete, BrownConcretePowder, BrownDye, + BrownEgg, // brown egg BrownGlazedTerracotta, BrownMushroom, BrownMushroomBlock, @@ -194,7 +196,9 @@ namespace MinecraftClient.Inventory BuddingAmethyst, Bundle, BurnPotterySherd, + Bush, // bush Cactus, + CactusFlower, // cactus flower Cake, Calcite, CalibratedSculkSensor, @@ -439,6 +443,8 @@ namespace MinecraftClient.Inventory DripstoneBlock, Dropper, DrownedSpawnEgg, + DryShortGrass, // dry short grass + DryTallGrass, // dry tall grass DuneArmorTrimSmithingTemplate, EchoShard, Egg, @@ -487,6 +493,7 @@ namespace MinecraftClient.Inventory FireCoral, FireCoralBlock, FireCoralFan, + FireflyBush, // firefly bush FireworkRocket, FireworkStar, FishingRod, @@ -658,6 +665,7 @@ namespace MinecraftClient.Inventory LargeFern, LavaBucket, Lead, + LeafLitter, // leaf litter Leather, LeatherBoots, LeatherChestplate, @@ -1235,6 +1243,8 @@ namespace MinecraftClient.Inventory TallGrass, Target, Terracotta, + TestBlock, // test block + TestInstanceBlock, // test instance block TideArmorTrimSmithingTemplate, TintedGlass, TippedArrow, @@ -1364,6 +1374,7 @@ namespace MinecraftClient.Inventory WhiteWool, WhiteBundle, WildArmorTrimSmithingTemplate, + Wildflowers, // wildflowers WindCharge, WitchSpawnEgg, WitherRose, diff --git a/MinecraftClient/Mapping/BlockPalettes/Palette1215.cs b/MinecraftClient/Mapping/BlockPalettes/Palette1215.cs new file mode 100644 index 00000000..c01f5d00 --- /dev/null +++ b/MinecraftClient/Mapping/BlockPalettes/Palette1215.cs @@ -0,0 +1,1838 @@ +using System.Collections.Generic; + +namespace MinecraftClient.Mapping.BlockPalettes +{ + public class Palette1215 : BlockPalette + { + private static readonly Dictionary materials = new(); + + static Palette1215() + { + for (int i = 9492; i <= 9515; i++) + materials[i] = Material.AcaciaButton; + for (int i = 12973; i <= 13036; i++) + materials[i] = Material.AcaciaDoor; + for (int i = 12589; i <= 12620; i++) + materials[i] = Material.AcaciaFence; + for (int i = 12301; i <= 12332; i++) + materials[i] = Material.AcaciaFenceGate; + for (int i = 5130; i <= 5193; i++) + materials[i] = Material.AcaciaHangingSign; + for (int i = 364; i <= 391; i++) + materials[i] = Material.AcaciaLeaves; + for (int i = 148; i <= 150; i++) + materials[i] = Material.AcaciaLog; + materials[19] = Material.AcaciaPlanks; + for (int i = 5900; i <= 5901; i++) + materials[i] = Material.AcaciaPressurePlate; + for (int i = 37; i <= 38; i++) + materials[i] = Material.AcaciaSapling; + for (int i = 4462; i <= 4493; i++) + materials[i] = Material.AcaciaSign; + for (int i = 12075; i <= 12080; i++) + materials[i] = Material.AcaciaSlab; + for (int i = 10693; i <= 10772; i++) + materials[i] = Material.AcaciaStairs; + for (int i = 6396; i <= 6459; i++) + materials[i] = Material.AcaciaTrapdoor; + for (int i = 5730; i <= 5737; i++) + materials[i] = Material.AcaciaWallHangingSign; + for (int i = 4882; i <= 4889; i++) + materials[i] = Material.AcaciaWallSign; + for (int i = 213; i <= 215; i++) + materials[i] = Material.AcaciaWood; + for (int i = 10129; i <= 10152; i++) + materials[i] = Material.ActivatorRail; + materials[0] = Material.Air; + materials[2125] = Material.Allium; + materials[22059] = Material.AmethystBlock; + for (int i = 22061; i <= 22072; i++) + materials[i] = Material.AmethystCluster; + materials[20476] = Material.AncientDebris; + materials[6] = Material.Andesite; + for (int i = 15159; i <= 15164; i++) + materials[i] = Material.AndesiteSlab; + for (int i = 14785; i <= 14864; i++) + materials[i] = Material.AndesiteStairs; + for (int i = 17775; i <= 18098; i++) + materials[i] = Material.AndesiteWall; + for (int i = 9916; i <= 9919; i++) + materials[i] = Material.Anvil; + for (int i = 7060; i <= 7063; i++) + materials[i] = Material.AttachedMelonStem; + for (int i = 7056; i <= 7059; i++) + materials[i] = Material.AttachedPumpkinStem; + materials[25852] = Material.Azalea; + for (int i = 504; i <= 531; i++) + materials[i] = Material.AzaleaLeaves; + materials[2126] = Material.AzureBluet; + for (int i = 13968; i <= 13979; i++) + materials[i] = Material.Bamboo; + for (int i = 168; i <= 170; i++) + materials[i] = Material.BambooBlock; + for (int i = 9612; i <= 9635; i++) + materials[i] = Material.BambooButton; + for (int i = 13293; i <= 13356; i++) + materials[i] = Material.BambooDoor; + for (int i = 12749; i <= 12780; i++) + materials[i] = Material.BambooFence; + for (int i = 12461; i <= 12492; i++) + materials[i] = Material.BambooFenceGate; + for (int i = 5642; i <= 5705; i++) + materials[i] = Material.BambooHangingSign; + materials[28] = Material.BambooMosaic; + for (int i = 12111; i <= 12116; i++) + materials[i] = Material.BambooMosaicSlab; + for (int i = 11173; i <= 11252; i++) + materials[i] = Material.BambooMosaicStairs; + materials[27] = Material.BambooPlanks; + for (int i = 5910; i <= 5911; i++) + materials[i] = Material.BambooPressurePlate; + materials[13967] = Material.BambooSapling; + for (int i = 4654; i <= 4685; i++) + materials[i] = Material.BambooSign; + for (int i = 12105; i <= 12110; i++) + materials[i] = Material.BambooSlab; + for (int i = 11093; i <= 11172; i++) + materials[i] = Material.BambooStairs; + for (int i = 6716; i <= 6779; i++) + materials[i] = Material.BambooTrapdoor; + for (int i = 5794; i <= 5801; i++) + materials[i] = Material.BambooWallHangingSign; + for (int i = 4930; i <= 4937; i++) + materials[i] = Material.BambooWallSign; + for (int i = 19431; i <= 19442; i++) + materials[i] = Material.Barrel; + for (int i = 11254; i <= 11255; i++) + materials[i] = Material.Barrier; + for (int i = 6031; i <= 6033; i++) + materials[i] = Material.Basalt; + materials[8702] = Material.Beacon; + materials[85] = Material.Bedrock; + for (int i = 20425; i <= 20448; i++) + materials[i] = Material.BeeNest; + for (int i = 20449; i <= 20472; i++) + materials[i] = Material.Beehive; + for (int i = 13532; i <= 13535; i++) + materials[i] = Material.Beetroots; + for (int i = 19494; i <= 19525; i++) + materials[i] = Material.Bell; + for (int i = 25904; i <= 25935; i++) + materials[i] = Material.BigDripleaf; + for (int i = 25936; i <= 25943; i++) + materials[i] = Material.BigDripleafStem; + for (int i = 9444; i <= 9467; i++) + materials[i] = Material.BirchButton; + for (int i = 12845; i <= 12908; i++) + materials[i] = Material.BirchDoor; + for (int i = 12525; i <= 12556; i++) + materials[i] = Material.BirchFence; + for (int i = 12237; i <= 12268; i++) + materials[i] = Material.BirchFenceGate; + for (int i = 5066; i <= 5129; i++) + materials[i] = Material.BirchHangingSign; + for (int i = 308; i <= 335; i++) + materials[i] = Material.BirchLeaves; + for (int i = 142; i <= 144; i++) + materials[i] = Material.BirchLog; + materials[17] = Material.BirchPlanks; + for (int i = 5896; i <= 5897; i++) + materials[i] = Material.BirchPressurePlate; + for (int i = 33; i <= 34; i++) + materials[i] = Material.BirchSapling; + for (int i = 4430; i <= 4461; i++) + materials[i] = Material.BirchSign; + for (int i = 12063; i <= 12068; i++) + materials[i] = Material.BirchSlab; + for (int i = 8530; i <= 8609; i++) + materials[i] = Material.BirchStairs; + for (int i = 6268; i <= 6331; i++) + materials[i] = Material.BirchTrapdoor; + for (int i = 5722; i <= 5729; i++) + materials[i] = Material.BirchWallHangingSign; + for (int i = 4874; i <= 4881; i++) + materials[i] = Material.BirchWallSign; + for (int i = 207; i <= 209; i++) + materials[i] = Material.BirchWood; + for (int i = 11888; i <= 11903; i++) + materials[i] = Material.BlackBanner; + for (int i = 1971; i <= 1986; i++) + materials[i] = Material.BlackBed; + for (int i = 22009; i <= 22024; i++) + materials[i] = Material.BlackCandle; + for (int i = 22057; i <= 22058; i++) + materials[i] = Material.BlackCandleCake; + materials[11632] = Material.BlackCarpet; + materials[13766] = Material.BlackConcrete; + materials[13782] = Material.BlackConcretePowder; + for (int i = 13747; i <= 13750; i++) + materials[i] = Material.BlackGlazedTerracotta; + for (int i = 13681; i <= 13686; i++) + materials[i] = Material.BlackShulkerBox; + materials[6139] = Material.BlackStainedGlass; + for (int i = 10661; i <= 10692; i++) + materials[i] = Material.BlackStainedGlassPane; + materials[10180] = Material.BlackTerracotta; + for (int i = 11964; i <= 11967; i++) + materials[i] = Material.BlackWallBanner; + materials[2108] = Material.BlackWool; + materials[20488] = Material.Blackstone; + for (int i = 20893; i <= 20898; i++) + materials[i] = Material.BlackstoneSlab; + for (int i = 20489; i <= 20568; i++) + materials[i] = Material.BlackstoneStairs; + for (int i = 20569; i <= 20892; i++) + materials[i] = Material.BlackstoneWall; + for (int i = 19451; i <= 19458; i++) + materials[i] = Material.BlastFurnace; + for (int i = 11824; i <= 11839; i++) + materials[i] = Material.BlueBanner; + for (int i = 1907; i <= 1922; i++) + materials[i] = Material.BlueBed; + for (int i = 21945; i <= 21960; i++) + materials[i] = Material.BlueCandle; + for (int i = 22049; i <= 22050; i++) + materials[i] = Material.BlueCandleCake; + materials[11628] = Material.BlueCarpet; + materials[13762] = Material.BlueConcrete; + materials[13778] = Material.BlueConcretePowder; + for (int i = 13731; i <= 13734; i++) + materials[i] = Material.BlueGlazedTerracotta; + materials[13964] = Material.BlueIce; + materials[2124] = Material.BlueOrchid; + for (int i = 13657; i <= 13662; i++) + materials[i] = Material.BlueShulkerBox; + materials[6135] = Material.BlueStainedGlass; + for (int i = 10533; i <= 10564; i++) + materials[i] = Material.BlueStainedGlassPane; + materials[10176] = Material.BlueTerracotta; + for (int i = 11948; i <= 11951; i++) + materials[i] = Material.BlueWallBanner; + materials[2104] = Material.BlueWool; + for (int i = 13569; i <= 13571; i++) + materials[i] = Material.BoneBlock; + materials[2142] = Material.Bookshelf; + for (int i = 13848; i <= 13849; i++) + materials[i] = Material.BrainCoral; + materials[13832] = Material.BrainCoralBlock; + for (int i = 13868; i <= 13869; i++) + materials[i] = Material.BrainCoralFan; + for (int i = 13924; i <= 13931; i++) + materials[i] = Material.BrainCoralWallFan; + for (int i = 8174; i <= 8181; i++) + materials[i] = Material.BrewingStand; + for (int i = 12153; i <= 12158; i++) + materials[i] = Material.BrickSlab; + for (int i = 7400; i <= 7479; i++) + materials[i] = Material.BrickStairs; + for (int i = 15183; i <= 15506; i++) + materials[i] = Material.BrickWall; + materials[2139] = Material.Bricks; + for (int i = 11840; i <= 11855; i++) + materials[i] = Material.BrownBanner; + for (int i = 1923; i <= 1938; i++) + materials[i] = Material.BrownBed; + for (int i = 21961; i <= 21976; i++) + materials[i] = Material.BrownCandle; + for (int i = 22051; i <= 22052; i++) + materials[i] = Material.BrownCandleCake; + materials[11629] = Material.BrownCarpet; + materials[13763] = Material.BrownConcrete; + materials[13779] = Material.BrownConcretePowder; + for (int i = 13735; i <= 13738; i++) + materials[i] = Material.BrownGlazedTerracotta; + materials[2135] = Material.BrownMushroom; + for (int i = 6792; i <= 6855; i++) + materials[i] = Material.BrownMushroomBlock; + for (int i = 13663; i <= 13668; i++) + materials[i] = Material.BrownShulkerBox; + materials[6136] = Material.BrownStainedGlass; + for (int i = 10565; i <= 10596; i++) + materials[i] = Material.BrownStainedGlassPane; + materials[10177] = Material.BrownTerracotta; + for (int i = 11952; i <= 11955; i++) + materials[i] = Material.BrownWallBanner; + materials[2105] = Material.BrownWool; + for (int i = 13983; i <= 13984; i++) + materials[i] = Material.BubbleColumn; + for (int i = 13850; i <= 13851; i++) + materials[i] = Material.BubbleCoral; + materials[13833] = Material.BubbleCoralBlock; + for (int i = 13870; i <= 13871; i++) + materials[i] = Material.BubbleCoralFan; + for (int i = 13932; i <= 13939; i++) + materials[i] = Material.BubbleCoralWallFan; + materials[22060] = Material.BuddingAmethyst; + materials[2051] = Material.Bush; + for (int i = 5960; i <= 5975; i++) + materials[i] = Material.Cactus; + materials[5976] = Material.CactusFlower; + for (int i = 6053; i <= 6059; i++) + materials[i] = Material.Cake; + materials[23344] = Material.Calcite; + for (int i = 23443; i <= 23826; i++) + materials[i] = Material.CalibratedSculkSensor; + for (int i = 19534; i <= 19565; i++) + materials[i] = Material.Campfire; + for (int i = 21753; i <= 21768; i++) + materials[i] = Material.Candle; + for (int i = 22025; i <= 22026; i++) + materials[i] = Material.CandleCake; + for (int i = 9380; i <= 9387; i++) + materials[i] = Material.Carrots; + materials[19459] = Material.CartographyTable; + for (int i = 6045; i <= 6048; i++) + materials[i] = Material.CarvedPumpkin; + materials[8182] = Material.Cauldron; + materials[13982] = Material.CaveAir; + for (int i = 25797; i <= 25848; i++) + materials[i] = Material.CaveVines; + for (int i = 25849; i <= 25850; i++) + materials[i] = Material.CaveVinesPlant; + for (int i = 7016; i <= 7021; i++) + materials[i] = Material.Chain; + for (int i = 13550; i <= 13561; i++) + materials[i] = Material.ChainCommandBlock; + for (int i = 9516; i <= 9539; i++) + materials[i] = Material.CherryButton; + for (int i = 13037; i <= 13100; i++) + materials[i] = Material.CherryDoor; + for (int i = 12621; i <= 12652; i++) + materials[i] = Material.CherryFence; + for (int i = 12333; i <= 12364; i++) + materials[i] = Material.CherryFenceGate; + for (int i = 5194; i <= 5257; i++) + materials[i] = Material.CherryHangingSign; + for (int i = 392; i <= 419; i++) + materials[i] = Material.CherryLeaves; + for (int i = 151; i <= 153; i++) + materials[i] = Material.CherryLog; + materials[20] = Material.CherryPlanks; + for (int i = 5902; i <= 5903; i++) + materials[i] = Material.CherryPressurePlate; + for (int i = 39; i <= 40; i++) + materials[i] = Material.CherrySapling; + for (int i = 4494; i <= 4525; i++) + materials[i] = Material.CherrySign; + for (int i = 12081; i <= 12086; i++) + materials[i] = Material.CherrySlab; + for (int i = 10773; i <= 10852; i++) + materials[i] = Material.CherryStairs; + for (int i = 6460; i <= 6523; i++) + materials[i] = Material.CherryTrapdoor; + for (int i = 5738; i <= 5745; i++) + materials[i] = Material.CherryWallHangingSign; + for (int i = 4890; i <= 4897; i++) + materials[i] = Material.CherryWallSign; + for (int i = 216; i <= 218; i++) + materials[i] = Material.CherryWood; + for (int i = 3018; i <= 3041; i++) + materials[i] = Material.Chest; + for (int i = 9920; i <= 9923; i++) + materials[i] = Material.ChippedAnvil; + for (int i = 2143; i <= 2398; i++) + materials[i] = Material.ChiseledBookshelf; + materials[23979] = Material.ChiseledCopper; + materials[27611] = Material.ChiseledDeepslate; + materials[21750] = Material.ChiseledNetherBricks; + materials[20902] = Material.ChiseledPolishedBlackstone; + materials[10045] = Material.ChiseledQuartzBlock; + materials[11969] = Material.ChiseledRedSandstone; + materials[8055] = Material.ChiseledResinBricks; + materials[579] = Material.ChiseledSandstone; + materials[6783] = Material.ChiseledStoneBricks; + materials[22931] = Material.ChiseledTuff; + materials[23343] = Material.ChiseledTuffBricks; + for (int i = 13427; i <= 13432; i++) + materials[i] = Material.ChorusFlower; + for (int i = 13363; i <= 13426; i++) + materials[i] = Material.ChorusPlant; + materials[5977] = Material.Clay; + materials[27910] = Material.ClosedEyeblossom; + materials[11634] = Material.CoalBlock; + materials[133] = Material.CoalOre; + materials[11] = Material.CoarseDirt; + materials[25967] = Material.CobbledDeepslate; + for (int i = 26048; i <= 26053; i++) + materials[i] = Material.CobbledDeepslateSlab; + for (int i = 25968; i <= 26047; i++) + materials[i] = Material.CobbledDeepslateStairs; + for (int i = 26054; i <= 26377; i++) + materials[i] = Material.CobbledDeepslateWall; + materials[14] = Material.Cobblestone; + for (int i = 12147; i <= 12152; i++) + materials[i] = Material.CobblestoneSlab; + for (int i = 4778; i <= 4857; i++) + materials[i] = Material.CobblestoneStairs; + for (int i = 8703; i <= 9026; i++) + materials[i] = Material.CobblestoneWall; + materials[2047] = Material.Cobweb; + for (int i = 8203; i <= 8214; i++) + materials[i] = Material.Cocoa; + for (int i = 8690; i <= 8701; i++) + materials[i] = Material.CommandBlock; + for (int i = 9984; i <= 9999; i++) + materials[i] = Material.Comparator; + for (int i = 20400; i <= 20408; i++) + materials[i] = Material.Composter; + for (int i = 13965; i <= 13966; i++) + materials[i] = Material.Conduit; + materials[23966] = Material.CopperBlock; + for (int i = 25720; i <= 25723; i++) + materials[i] = Material.CopperBulb; + for (int i = 24680; i <= 24743; i++) + materials[i] = Material.CopperDoor; + for (int i = 25704; i <= 25705; i++) + materials[i] = Material.CopperGrate; + materials[23970] = Material.CopperOre; + for (int i = 25192; i <= 25255; i++) + materials[i] = Material.CopperTrapdoor; + materials[2132] = Material.Cornflower; + materials[27612] = Material.CrackedDeepslateBricks; + materials[27613] = Material.CrackedDeepslateTiles; + materials[21751] = Material.CrackedNetherBricks; + materials[20901] = Material.CrackedPolishedBlackstoneBricks; + materials[6782] = Material.CrackedStoneBricks; + for (int i = 27650; i <= 27697; i++) + materials[i] = Material.Crafter; + materials[4341] = Material.CraftingTable; + for (int i = 2920; i <= 2937; i++) + materials[i] = Material.CreakingHeart; + for (int i = 9796; i <= 9827; i++) + materials[i] = Material.CreeperHead; + for (int i = 9828; i <= 9835; i++) + materials[i] = Material.CreeperWallHead; + for (int i = 20123; i <= 20146; i++) + materials[i] = Material.CrimsonButton; + for (int i = 20171; i <= 20234; i++) + materials[i] = Material.CrimsonDoor; + for (int i = 19707; i <= 19738; i++) + materials[i] = Material.CrimsonFence; + for (int i = 19899; i <= 19930; i++) + materials[i] = Material.CrimsonFenceGate; + materials[19632] = Material.CrimsonFungus; + for (int i = 5450; i <= 5513; i++) + materials[i] = Material.CrimsonHangingSign; + for (int i = 19625; i <= 19627; i++) + materials[i] = Material.CrimsonHyphae; + materials[19631] = Material.CrimsonNylium; + materials[19689] = Material.CrimsonPlanks; + for (int i = 19703; i <= 19704; i++) + materials[i] = Material.CrimsonPressurePlate; + materials[19688] = Material.CrimsonRoots; + for (int i = 20299; i <= 20330; i++) + materials[i] = Material.CrimsonSign; + for (int i = 19691; i <= 19696; i++) + materials[i] = Material.CrimsonSlab; + for (int i = 19963; i <= 20042; i++) + materials[i] = Material.CrimsonStairs; + for (int i = 19619; i <= 19621; i++) + materials[i] = Material.CrimsonStem; + for (int i = 19771; i <= 19834; i++) + materials[i] = Material.CrimsonTrapdoor; + for (int i = 5778; i <= 5785; i++) + materials[i] = Material.CrimsonWallHangingSign; + for (int i = 20363; i <= 20370; i++) + materials[i] = Material.CrimsonWallSign; + materials[20477] = Material.CryingObsidian; + materials[23975] = Material.CutCopper; + for (int i = 24322; i <= 24327; i++) + materials[i] = Material.CutCopperSlab; + for (int i = 24224; i <= 24303; i++) + materials[i] = Material.CutCopperStairs; + materials[11970] = Material.CutRedSandstone; + for (int i = 12189; i <= 12194; i++) + materials[i] = Material.CutRedSandstoneSlab; + materials[580] = Material.CutSandstone; + for (int i = 12135; i <= 12140; i++) + materials[i] = Material.CutSandstoneSlab; + for (int i = 11792; i <= 11807; i++) + materials[i] = Material.CyanBanner; + for (int i = 1875; i <= 1890; i++) + materials[i] = Material.CyanBed; + for (int i = 21913; i <= 21928; i++) + materials[i] = Material.CyanCandle; + for (int i = 22045; i <= 22046; i++) + materials[i] = Material.CyanCandleCake; + materials[11626] = Material.CyanCarpet; + materials[13760] = Material.CyanConcrete; + materials[13776] = Material.CyanConcretePowder; + for (int i = 13723; i <= 13726; i++) + materials[i] = Material.CyanGlazedTerracotta; + for (int i = 13645; i <= 13650; i++) + materials[i] = Material.CyanShulkerBox; + materials[6133] = Material.CyanStainedGlass; + for (int i = 10469; i <= 10500; i++) + materials[i] = Material.CyanStainedGlassPane; + materials[10174] = Material.CyanTerracotta; + for (int i = 11940; i <= 11943; i++) + materials[i] = Material.CyanWallBanner; + materials[2102] = Material.CyanWool; + for (int i = 9924; i <= 9927; i++) + materials[i] = Material.DamagedAnvil; + materials[2121] = Material.Dandelion; + for (int i = 9540; i <= 9563; i++) + materials[i] = Material.DarkOakButton; + for (int i = 13101; i <= 13164; i++) + materials[i] = Material.DarkOakDoor; + for (int i = 12653; i <= 12684; i++) + materials[i] = Material.DarkOakFence; + for (int i = 12365; i <= 12396; i++) + materials[i] = Material.DarkOakFenceGate; + for (int i = 5322; i <= 5385; i++) + materials[i] = Material.DarkOakHangingSign; + for (int i = 420; i <= 447; i++) + materials[i] = Material.DarkOakLeaves; + for (int i = 154; i <= 156; i++) + materials[i] = Material.DarkOakLog; + materials[21] = Material.DarkOakPlanks; + for (int i = 5904; i <= 5905; i++) + materials[i] = Material.DarkOakPressurePlate; + for (int i = 41; i <= 42; i++) + materials[i] = Material.DarkOakSapling; + for (int i = 4558; i <= 4589; i++) + materials[i] = Material.DarkOakSign; + for (int i = 12087; i <= 12092; i++) + materials[i] = Material.DarkOakSlab; + for (int i = 10853; i <= 10932; i++) + materials[i] = Material.DarkOakStairs; + for (int i = 6524; i <= 6587; i++) + materials[i] = Material.DarkOakTrapdoor; + for (int i = 5754; i <= 5761; i++) + materials[i] = Material.DarkOakWallHangingSign; + for (int i = 4906; i <= 4913; i++) + materials[i] = Material.DarkOakWallSign; + for (int i = 219; i <= 221; i++) + materials[i] = Material.DarkOakWood; + materials[11354] = Material.DarkPrismarine; + for (int i = 11607; i <= 11612; i++) + materials[i] = Material.DarkPrismarineSlab; + for (int i = 11515; i <= 11594; i++) + materials[i] = Material.DarkPrismarineStairs; + for (int i = 10000; i <= 10031; i++) + materials[i] = Material.DaylightDetector; + for (int i = 13838; i <= 13839; i++) + materials[i] = Material.DeadBrainCoral; + materials[13827] = Material.DeadBrainCoralBlock; + for (int i = 13858; i <= 13859; i++) + materials[i] = Material.DeadBrainCoralFan; + for (int i = 13884; i <= 13891; i++) + materials[i] = Material.DeadBrainCoralWallFan; + for (int i = 13840; i <= 13841; i++) + materials[i] = Material.DeadBubbleCoral; + materials[13828] = Material.DeadBubbleCoralBlock; + for (int i = 13860; i <= 13861; i++) + materials[i] = Material.DeadBubbleCoralFan; + for (int i = 13892; i <= 13899; i++) + materials[i] = Material.DeadBubbleCoralWallFan; + materials[2050] = Material.DeadBush; + for (int i = 13842; i <= 13843; i++) + materials[i] = Material.DeadFireCoral; + materials[13829] = Material.DeadFireCoralBlock; + for (int i = 13862; i <= 13863; i++) + materials[i] = Material.DeadFireCoralFan; + for (int i = 13900; i <= 13907; i++) + materials[i] = Material.DeadFireCoralWallFan; + for (int i = 13844; i <= 13845; i++) + materials[i] = Material.DeadHornCoral; + materials[13830] = Material.DeadHornCoralBlock; + for (int i = 13864; i <= 13865; i++) + materials[i] = Material.DeadHornCoralFan; + for (int i = 13908; i <= 13915; i++) + materials[i] = Material.DeadHornCoralWallFan; + for (int i = 13836; i <= 13837; i++) + materials[i] = Material.DeadTubeCoral; + materials[13826] = Material.DeadTubeCoralBlock; + for (int i = 13856; i <= 13857; i++) + materials[i] = Material.DeadTubeCoralFan; + for (int i = 13876; i <= 13883; i++) + materials[i] = Material.DeadTubeCoralWallFan; + for (int i = 27634; i <= 27649; i++) + materials[i] = Material.DecoratedPot; + for (int i = 25964; i <= 25966; i++) + materials[i] = Material.Deepslate; + for (int i = 27281; i <= 27286; i++) + materials[i] = Material.DeepslateBrickSlab; + for (int i = 27201; i <= 27280; i++) + materials[i] = Material.DeepslateBrickStairs; + for (int i = 27287; i <= 27610; i++) + materials[i] = Material.DeepslateBrickWall; + materials[27200] = Material.DeepslateBricks; + materials[134] = Material.DeepslateCoalOre; + materials[23971] = Material.DeepslateCopperOre; + materials[4339] = Material.DeepslateDiamondOre; + materials[8296] = Material.DeepslateEmeraldOre; + materials[130] = Material.DeepslateGoldOre; + materials[132] = Material.DeepslateIronOre; + materials[564] = Material.DeepslateLapisOre; + for (int i = 5914; i <= 5915; i++) + materials[i] = Material.DeepslateRedstoneOre; + for (int i = 26870; i <= 26875; i++) + materials[i] = Material.DeepslateTileSlab; + for (int i = 26790; i <= 26869; i++) + materials[i] = Material.DeepslateTileStairs; + for (int i = 26876; i <= 27199; i++) + materials[i] = Material.DeepslateTileWall; + materials[26789] = Material.DeepslateTiles; + for (int i = 2011; i <= 2034; i++) + materials[i] = Material.DetectorRail; + materials[4340] = Material.DiamondBlock; + materials[4338] = Material.DiamondOre; + materials[4] = Material.Diorite; + for (int i = 15177; i <= 15182; i++) + materials[i] = Material.DioriteSlab; + for (int i = 15025; i <= 15104; i++) + materials[i] = Material.DioriteStairs; + for (int i = 19071; i <= 19394; i++) + materials[i] = Material.DioriteWall; + materials[10] = Material.Dirt; + materials[13536] = Material.DirtPath; + for (int i = 566; i <= 577; i++) + materials[i] = Material.Dispenser; + materials[8200] = Material.DragonEgg; + for (int i = 9836; i <= 9867; i++) + materials[i] = Material.DragonHead; + for (int i = 9868; i <= 9875; i++) + materials[i] = Material.DragonWallHead; + materials[13810] = Material.DriedKelpBlock; + materials[25796] = Material.DripstoneBlock; + for (int i = 10153; i <= 10164; i++) + materials[i] = Material.Dropper; + materials[8449] = Material.EmeraldBlock; + materials[8295] = Material.EmeraldOre; + materials[8173] = Material.EnchantingTable; + materials[13537] = Material.EndGateway; + materials[8190] = Material.EndPortal; + for (int i = 8191; i <= 8198; i++) + materials[i] = Material.EndPortalFrame; + for (int i = 13357; i <= 13362; i++) + materials[i] = Material.EndRod; + materials[8199] = Material.EndStone; + for (int i = 15135; i <= 15140; i++) + materials[i] = Material.EndStoneBrickSlab; + for (int i = 14385; i <= 14464; i++) + materials[i] = Material.EndStoneBrickStairs; + for (int i = 18747; i <= 19070; i++) + materials[i] = Material.EndStoneBrickWall; + materials[13517] = Material.EndStoneBricks; + for (int i = 8297; i <= 8304; i++) + materials[i] = Material.EnderChest; + materials[23978] = Material.ExposedChiseledCopper; + materials[23967] = Material.ExposedCopper; + for (int i = 25724; i <= 25727; i++) + materials[i] = Material.ExposedCopperBulb; + for (int i = 24744; i <= 24807; i++) + materials[i] = Material.ExposedCopperDoor; + for (int i = 25706; i <= 25707; i++) + materials[i] = Material.ExposedCopperGrate; + for (int i = 25256; i <= 25319; i++) + materials[i] = Material.ExposedCopperTrapdoor; + materials[23974] = Material.ExposedCutCopper; + for (int i = 24316; i <= 24321; i++) + materials[i] = Material.ExposedCutCopperSlab; + for (int i = 24144; i <= 24223; i++) + materials[i] = Material.ExposedCutCopperStairs; + for (int i = 4350; i <= 4357; i++) + materials[i] = Material.Farmland; + materials[2049] = Material.Fern; + for (int i = 2406; i <= 2917; i++) + materials[i] = Material.Fire; + for (int i = 13852; i <= 13853; i++) + materials[i] = Material.FireCoral; + materials[13834] = Material.FireCoralBlock; + for (int i = 13872; i <= 13873; i++) + materials[i] = Material.FireCoralFan; + for (int i = 13940; i <= 13947; i++) + materials[i] = Material.FireCoralWallFan; + materials[27913] = Material.FireflyBush; + materials[19460] = Material.FletchingTable; + materials[9351] = Material.FlowerPot; + materials[25853] = Material.FloweringAzalea; + for (int i = 532; i <= 559; i++) + materials[i] = Material.FloweringAzaleaLeaves; + materials[27632] = Material.Frogspawn; + for (int i = 13562; i <= 13565; i++) + materials[i] = Material.FrostedIce; + for (int i = 4358; i <= 4365; i++) + materials[i] = Material.Furnace; + materials[21313] = Material.GildedBlackstone; + materials[562] = Material.Glass; + for (int i = 7022; i <= 7053; i++) + materials[i] = Material.GlassPane; + for (int i = 7112; i <= 7239; i++) + materials[i] = Material.GlowLichen; + materials[6042] = Material.Glowstone; + materials[2137] = Material.GoldBlock; + materials[129] = Material.GoldOre; + materials[2] = Material.Granite; + for (int i = 15153; i <= 15158; i++) + materials[i] = Material.GraniteSlab; + for (int i = 14705; i <= 14784; i++) + materials[i] = Material.GraniteStairs; + for (int i = 16479; i <= 16802; i++) + materials[i] = Material.GraniteWall; + for (int i = 8; i <= 9; i++) + materials[i] = Material.GrassBlock; + materials[124] = Material.Gravel; + for (int i = 11760; i <= 11775; i++) + materials[i] = Material.GrayBanner; + for (int i = 1843; i <= 1858; i++) + materials[i] = Material.GrayBed; + for (int i = 21881; i <= 21896; i++) + materials[i] = Material.GrayCandle; + for (int i = 22041; i <= 22042; i++) + materials[i] = Material.GrayCandleCake; + materials[11624] = Material.GrayCarpet; + materials[13758] = Material.GrayConcrete; + materials[13774] = Material.GrayConcretePowder; + for (int i = 13715; i <= 13718; i++) + materials[i] = Material.GrayGlazedTerracotta; + for (int i = 13633; i <= 13638; i++) + materials[i] = Material.GrayShulkerBox; + materials[6131] = Material.GrayStainedGlass; + for (int i = 10405; i <= 10436; i++) + materials[i] = Material.GrayStainedGlassPane; + materials[10172] = Material.GrayTerracotta; + for (int i = 11932; i <= 11935; i++) + materials[i] = Material.GrayWallBanner; + materials[2100] = Material.GrayWool; + for (int i = 11856; i <= 11871; i++) + materials[i] = Material.GreenBanner; + for (int i = 1939; i <= 1954; i++) + materials[i] = Material.GreenBed; + for (int i = 21977; i <= 21992; i++) + materials[i] = Material.GreenCandle; + for (int i = 22053; i <= 22054; i++) + materials[i] = Material.GreenCandleCake; + materials[11630] = Material.GreenCarpet; + materials[13764] = Material.GreenConcrete; + materials[13780] = Material.GreenConcretePowder; + for (int i = 13739; i <= 13742; i++) + materials[i] = Material.GreenGlazedTerracotta; + for (int i = 13669; i <= 13674; i++) + materials[i] = Material.GreenShulkerBox; + materials[6137] = Material.GreenStainedGlass; + for (int i = 10597; i <= 10628; i++) + materials[i] = Material.GreenStainedGlassPane; + materials[10178] = Material.GreenTerracotta; + for (int i = 11956; i <= 11959; i++) + materials[i] = Material.GreenWallBanner; + materials[2106] = Material.GreenWool; + for (int i = 19461; i <= 19472; i++) + materials[i] = Material.Grindstone; + for (int i = 25960; i <= 25961; i++) + materials[i] = Material.HangingRoots; + for (int i = 11614; i <= 11616; i++) + materials[i] = Material.HayBlock; + for (int i = 27742; i <= 27743; i++) + materials[i] = Material.HeavyCore; + for (int i = 9968; i <= 9983; i++) + materials[i] = Material.HeavyWeightedPressurePlate; + materials[20473] = Material.HoneyBlock; + materials[20474] = Material.HoneycombBlock; + for (int i = 10034; i <= 10043; i++) + materials[i] = Material.Hopper; + for (int i = 13854; i <= 13855; i++) + materials[i] = Material.HornCoral; + materials[13835] = Material.HornCoralBlock; + for (int i = 13874; i <= 13875; i++) + materials[i] = Material.HornCoralFan; + for (int i = 13948; i <= 13955; i++) + materials[i] = Material.HornCoralWallFan; + materials[5958] = Material.Ice; + materials[6791] = Material.InfestedChiseledStoneBricks; + materials[6787] = Material.InfestedCobblestone; + materials[6790] = Material.InfestedCrackedStoneBricks; + for (int i = 27614; i <= 27616; i++) + materials[i] = Material.InfestedDeepslate; + materials[6789] = Material.InfestedMossyStoneBricks; + materials[6786] = Material.InfestedStone; + materials[6788] = Material.InfestedStoneBricks; + for (int i = 6984; i <= 7015; i++) + materials[i] = Material.IronBars; + materials[2138] = Material.IronBlock; + for (int i = 5828; i <= 5891; i++) + materials[i] = Material.IronDoor; + materials[131] = Material.IronOre; + for (int i = 11288; i <= 11351; i++) + materials[i] = Material.IronTrapdoor; + for (int i = 6049; i <= 6052; i++) + materials[i] = Material.JackOLantern; + for (int i = 20383; i <= 20394; i++) + materials[i] = Material.Jigsaw; + for (int i = 5994; i <= 5995; i++) + materials[i] = Material.Jukebox; + for (int i = 9468; i <= 9491; i++) + materials[i] = Material.JungleButton; + for (int i = 12909; i <= 12972; i++) + materials[i] = Material.JungleDoor; + for (int i = 12557; i <= 12588; i++) + materials[i] = Material.JungleFence; + for (int i = 12269; i <= 12300; i++) + materials[i] = Material.JungleFenceGate; + for (int i = 5258; i <= 5321; i++) + materials[i] = Material.JungleHangingSign; + for (int i = 336; i <= 363; i++) + materials[i] = Material.JungleLeaves; + for (int i = 145; i <= 147; i++) + materials[i] = Material.JungleLog; + materials[18] = Material.JunglePlanks; + for (int i = 5898; i <= 5899; i++) + materials[i] = Material.JunglePressurePlate; + for (int i = 35; i <= 36; i++) + materials[i] = Material.JungleSapling; + for (int i = 4526; i <= 4557; i++) + materials[i] = Material.JungleSign; + for (int i = 12069; i <= 12074; i++) + materials[i] = Material.JungleSlab; + for (int i = 8610; i <= 8689; i++) + materials[i] = Material.JungleStairs; + for (int i = 6332; i <= 6395; i++) + materials[i] = Material.JungleTrapdoor; + for (int i = 5746; i <= 5753; i++) + materials[i] = Material.JungleWallHangingSign; + for (int i = 4898; i <= 4905; i++) + materials[i] = Material.JungleWallSign; + for (int i = 210; i <= 212; i++) + materials[i] = Material.JungleWood; + for (int i = 13783; i <= 13808; i++) + materials[i] = Material.Kelp; + materials[13809] = Material.KelpPlant; + for (int i = 4750; i <= 4757; i++) + materials[i] = Material.Ladder; + for (int i = 19526; i <= 19529; i++) + materials[i] = Material.Lantern; + materials[565] = Material.LapisBlock; + materials[563] = Material.LapisOre; + for (int i = 22073; i <= 22084; i++) + materials[i] = Material.LargeAmethystBud; + for (int i = 11646; i <= 11647; i++) + materials[i] = Material.LargeFern; + for (int i = 102; i <= 117; i++) + materials[i] = Material.Lava; + materials[8186] = Material.LavaCauldron; + for (int i = 25887; i <= 25902; i++) + materials[i] = Material.LeafLitter; + for (int i = 19473; i <= 19488; i++) + materials[i] = Material.Lectern; + for (int i = 5802; i <= 5825; i++) + materials[i] = Material.Lever; + for (int i = 11256; i <= 11287; i++) + materials[i] = Material.Light; + for (int i = 11696; i <= 11711; i++) + materials[i] = Material.LightBlueBanner; + for (int i = 1779; i <= 1794; i++) + materials[i] = Material.LightBlueBed; + for (int i = 21817; i <= 21832; i++) + materials[i] = Material.LightBlueCandle; + for (int i = 22033; i <= 22034; i++) + materials[i] = Material.LightBlueCandleCake; + materials[11620] = Material.LightBlueCarpet; + materials[13754] = Material.LightBlueConcrete; + materials[13770] = Material.LightBlueConcretePowder; + for (int i = 13699; i <= 13702; i++) + materials[i] = Material.LightBlueGlazedTerracotta; + for (int i = 13609; i <= 13614; i++) + materials[i] = Material.LightBlueShulkerBox; + materials[6127] = Material.LightBlueStainedGlass; + for (int i = 10277; i <= 10308; i++) + materials[i] = Material.LightBlueStainedGlassPane; + materials[10168] = Material.LightBlueTerracotta; + for (int i = 11916; i <= 11919; i++) + materials[i] = Material.LightBlueWallBanner; + materials[2096] = Material.LightBlueWool; + for (int i = 11776; i <= 11791; i++) + materials[i] = Material.LightGrayBanner; + for (int i = 1859; i <= 1874; i++) + materials[i] = Material.LightGrayBed; + for (int i = 21897; i <= 21912; i++) + materials[i] = Material.LightGrayCandle; + for (int i = 22043; i <= 22044; i++) + materials[i] = Material.LightGrayCandleCake; + materials[11625] = Material.LightGrayCarpet; + materials[13759] = Material.LightGrayConcrete; + materials[13775] = Material.LightGrayConcretePowder; + for (int i = 13719; i <= 13722; i++) + materials[i] = Material.LightGrayGlazedTerracotta; + for (int i = 13639; i <= 13644; i++) + materials[i] = Material.LightGrayShulkerBox; + materials[6132] = Material.LightGrayStainedGlass; + for (int i = 10437; i <= 10468; i++) + materials[i] = Material.LightGrayStainedGlassPane; + materials[10173] = Material.LightGrayTerracotta; + for (int i = 11936; i <= 11939; i++) + materials[i] = Material.LightGrayWallBanner; + materials[2101] = Material.LightGrayWool; + for (int i = 9952; i <= 9967; i++) + materials[i] = Material.LightWeightedPressurePlate; + for (int i = 25752; i <= 25775; i++) + materials[i] = Material.LightningRod; + for (int i = 11638; i <= 11639; i++) + materials[i] = Material.Lilac; + materials[2134] = Material.LilyOfTheValley; + materials[7642] = Material.LilyPad; + for (int i = 11728; i <= 11743; i++) + materials[i] = Material.LimeBanner; + for (int i = 1811; i <= 1826; i++) + materials[i] = Material.LimeBed; + for (int i = 21849; i <= 21864; i++) + materials[i] = Material.LimeCandle; + for (int i = 22037; i <= 22038; i++) + materials[i] = Material.LimeCandleCake; + materials[11622] = Material.LimeCarpet; + materials[13756] = Material.LimeConcrete; + materials[13772] = Material.LimeConcretePowder; + for (int i = 13707; i <= 13710; i++) + materials[i] = Material.LimeGlazedTerracotta; + for (int i = 13621; i <= 13626; i++) + materials[i] = Material.LimeShulkerBox; + materials[6129] = Material.LimeStainedGlass; + for (int i = 10341; i <= 10372; i++) + materials[i] = Material.LimeStainedGlassPane; + materials[10170] = Material.LimeTerracotta; + for (int i = 11924; i <= 11927; i++) + materials[i] = Material.LimeWallBanner; + materials[2098] = Material.LimeWool; + materials[20487] = Material.Lodestone; + for (int i = 19427; i <= 19430; i++) + materials[i] = Material.Loom; + for (int i = 11680; i <= 11695; i++) + materials[i] = Material.MagentaBanner; + for (int i = 1763; i <= 1778; i++) + materials[i] = Material.MagentaBed; + for (int i = 21801; i <= 21816; i++) + materials[i] = Material.MagentaCandle; + for (int i = 22031; i <= 22032; i++) + materials[i] = Material.MagentaCandleCake; + materials[11619] = Material.MagentaCarpet; + materials[13753] = Material.MagentaConcrete; + materials[13769] = Material.MagentaConcretePowder; + for (int i = 13695; i <= 13698; i++) + materials[i] = Material.MagentaGlazedTerracotta; + for (int i = 13603; i <= 13608; i++) + materials[i] = Material.MagentaShulkerBox; + materials[6126] = Material.MagentaStainedGlass; + for (int i = 10245; i <= 10276; i++) + materials[i] = Material.MagentaStainedGlassPane; + materials[10167] = Material.MagentaTerracotta; + for (int i = 11912; i <= 11915; i++) + materials[i] = Material.MagentaWallBanner; + materials[2095] = Material.MagentaWool; + materials[13566] = Material.MagmaBlock; + for (int i = 9588; i <= 9611; i++) + materials[i] = Material.MangroveButton; + for (int i = 13229; i <= 13292; i++) + materials[i] = Material.MangroveDoor; + for (int i = 12717; i <= 12748; i++) + materials[i] = Material.MangroveFence; + for (int i = 12429; i <= 12460; i++) + materials[i] = Material.MangroveFenceGate; + for (int i = 5578; i <= 5641; i++) + materials[i] = Material.MangroveHangingSign; + for (int i = 476; i <= 503; i++) + materials[i] = Material.MangroveLeaves; + for (int i = 160; i <= 162; i++) + materials[i] = Material.MangroveLog; + materials[26] = Material.MangrovePlanks; + for (int i = 5908; i <= 5909; i++) + materials[i] = Material.MangrovePressurePlate; + for (int i = 45; i <= 84; i++) + materials[i] = Material.MangrovePropagule; + for (int i = 163; i <= 164; i++) + materials[i] = Material.MangroveRoots; + for (int i = 4622; i <= 4653; i++) + materials[i] = Material.MangroveSign; + for (int i = 12099; i <= 12104; i++) + materials[i] = Material.MangroveSlab; + for (int i = 11013; i <= 11092; i++) + materials[i] = Material.MangroveStairs; + for (int i = 6652; i <= 6715; i++) + materials[i] = Material.MangroveTrapdoor; + for (int i = 5770; i <= 5777; i++) + materials[i] = Material.MangroveWallHangingSign; + for (int i = 4922; i <= 4929; i++) + materials[i] = Material.MangroveWallSign; + for (int i = 222; i <= 224; i++) + materials[i] = Material.MangroveWood; + for (int i = 22085; i <= 22096; i++) + materials[i] = Material.MediumAmethystBud; + materials[7055] = Material.Melon; + for (int i = 7072; i <= 7079; i++) + materials[i] = Material.MelonStem; + materials[25903] = Material.MossBlock; + materials[25854] = Material.MossCarpet; + materials[2399] = Material.MossyCobblestone; + for (int i = 15129; i <= 15134; i++) + materials[i] = Material.MossyCobblestoneSlab; + for (int i = 14305; i <= 14384; i++) + materials[i] = Material.MossyCobblestoneStairs; + for (int i = 9027; i <= 9350; i++) + materials[i] = Material.MossyCobblestoneWall; + for (int i = 15117; i <= 15122; i++) + materials[i] = Material.MossyStoneBrickSlab; + for (int i = 14145; i <= 14224; i++) + materials[i] = Material.MossyStoneBrickStairs; + for (int i = 16155; i <= 16478; i++) + materials[i] = Material.MossyStoneBrickWall; + materials[6781] = Material.MossyStoneBricks; + for (int i = 2109; i <= 2120; i++) + materials[i] = Material.MovingPiston; + materials[25963] = Material.Mud; + for (int i = 12165; i <= 12170; i++) + materials[i] = Material.MudBrickSlab; + for (int i = 7560; i <= 7639; i++) + materials[i] = Material.MudBrickStairs; + for (int i = 17127; i <= 17450; i++) + materials[i] = Material.MudBrickWall; + materials[6785] = Material.MudBricks; + for (int i = 165; i <= 167; i++) + materials[i] = Material.MuddyMangroveRoots; + for (int i = 6920; i <= 6983; i++) + materials[i] = Material.MushroomStem; + for (int i = 7640; i <= 7641; i++) + materials[i] = Material.Mycelium; + for (int i = 8057; i <= 8088; i++) + materials[i] = Material.NetherBrickFence; + for (int i = 12171; i <= 12176; i++) + materials[i] = Material.NetherBrickSlab; + for (int i = 8089; i <= 8168; i++) + materials[i] = Material.NetherBrickStairs; + for (int i = 17451; i <= 17774; i++) + materials[i] = Material.NetherBrickWall; + materials[8056] = Material.NetherBricks; + materials[135] = Material.NetherGoldOre; + for (int i = 6043; i <= 6044; i++) + materials[i] = Material.NetherPortal; + materials[10033] = Material.NetherQuartzOre; + materials[19618] = Material.NetherSprouts; + for (int i = 8169; i <= 8172; i++) + materials[i] = Material.NetherWart; + materials[13567] = Material.NetherWartBlock; + materials[20475] = Material.NetheriteBlock; + materials[6028] = Material.Netherrack; + for (int i = 581; i <= 1730; i++) + materials[i] = Material.NoteBlock; + for (int i = 9396; i <= 9419; i++) + materials[i] = Material.OakButton; + for (int i = 4686; i <= 4749; i++) + materials[i] = Material.OakDoor; + for (int i = 5996; i <= 6027; i++) + materials[i] = Material.OakFence; + for (int i = 7368; i <= 7399; i++) + materials[i] = Material.OakFenceGate; + for (int i = 4938; i <= 5001; i++) + materials[i] = Material.OakHangingSign; + for (int i = 252; i <= 279; i++) + materials[i] = Material.OakLeaves; + for (int i = 136; i <= 138; i++) + materials[i] = Material.OakLog; + materials[15] = Material.OakPlanks; + for (int i = 5892; i <= 5893; i++) + materials[i] = Material.OakPressurePlate; + for (int i = 29; i <= 30; i++) + materials[i] = Material.OakSapling; + for (int i = 4366; i <= 4397; i++) + materials[i] = Material.OakSign; + for (int i = 12051; i <= 12056; i++) + materials[i] = Material.OakSlab; + for (int i = 2938; i <= 3017; i++) + materials[i] = Material.OakStairs; + for (int i = 6140; i <= 6203; i++) + materials[i] = Material.OakTrapdoor; + for (int i = 5706; i <= 5713; i++) + materials[i] = Material.OakWallHangingSign; + for (int i = 4858; i <= 4865; i++) + materials[i] = Material.OakWallSign; + for (int i = 201; i <= 203; i++) + materials[i] = Material.OakWood; + for (int i = 13573; i <= 13584; i++) + materials[i] = Material.Observer; + materials[2400] = Material.Obsidian; + for (int i = 27623; i <= 27625; i++) + materials[i] = Material.OchreFroglight; + materials[27909] = Material.OpenEyeblossom; + for (int i = 11664; i <= 11679; i++) + materials[i] = Material.OrangeBanner; + for (int i = 1747; i <= 1762; i++) + materials[i] = Material.OrangeBed; + for (int i = 21785; i <= 21800; i++) + materials[i] = Material.OrangeCandle; + for (int i = 22029; i <= 22030; i++) + materials[i] = Material.OrangeCandleCake; + materials[11618] = Material.OrangeCarpet; + materials[13752] = Material.OrangeConcrete; + materials[13768] = Material.OrangeConcretePowder; + for (int i = 13691; i <= 13694; i++) + materials[i] = Material.OrangeGlazedTerracotta; + for (int i = 13597; i <= 13602; i++) + materials[i] = Material.OrangeShulkerBox; + materials[6125] = Material.OrangeStainedGlass; + for (int i = 10213; i <= 10244; i++) + materials[i] = Material.OrangeStainedGlassPane; + materials[10166] = Material.OrangeTerracotta; + materials[2128] = Material.OrangeTulip; + for (int i = 11908; i <= 11911; i++) + materials[i] = Material.OrangeWallBanner; + materials[2094] = Material.OrangeWool; + materials[2131] = Material.OxeyeDaisy; + materials[23976] = Material.OxidizedChiseledCopper; + materials[23969] = Material.OxidizedCopper; + for (int i = 25732; i <= 25735; i++) + materials[i] = Material.OxidizedCopperBulb; + for (int i = 24808; i <= 24871; i++) + materials[i] = Material.OxidizedCopperDoor; + for (int i = 25710; i <= 25711; i++) + materials[i] = Material.OxidizedCopperGrate; + for (int i = 25320; i <= 25383; i++) + materials[i] = Material.OxidizedCopperTrapdoor; + materials[23972] = Material.OxidizedCutCopper; + for (int i = 24304; i <= 24309; i++) + materials[i] = Material.OxidizedCutCopperSlab; + for (int i = 23984; i <= 24063; i++) + materials[i] = Material.OxidizedCutCopperStairs; + materials[11635] = Material.PackedIce; + materials[6784] = Material.PackedMud; + for (int i = 27907; i <= 27908; i++) + materials[i] = Material.PaleHangingMoss; + materials[27744] = Material.PaleMossBlock; + for (int i = 27745; i <= 27906; i++) + materials[i] = Material.PaleMossCarpet; + for (int i = 9564; i <= 9587; i++) + materials[i] = Material.PaleOakButton; + for (int i = 13165; i <= 13228; i++) + materials[i] = Material.PaleOakDoor; + for (int i = 12685; i <= 12716; i++) + materials[i] = Material.PaleOakFence; + for (int i = 12397; i <= 12428; i++) + materials[i] = Material.PaleOakFenceGate; + for (int i = 5386; i <= 5449; i++) + materials[i] = Material.PaleOakHangingSign; + for (int i = 448; i <= 475; i++) + materials[i] = Material.PaleOakLeaves; + for (int i = 157; i <= 159; i++) + materials[i] = Material.PaleOakLog; + materials[25] = Material.PaleOakPlanks; + for (int i = 5906; i <= 5907; i++) + materials[i] = Material.PaleOakPressurePlate; + for (int i = 43; i <= 44; i++) + materials[i] = Material.PaleOakSapling; + for (int i = 4590; i <= 4621; i++) + materials[i] = Material.PaleOakSign; + for (int i = 12093; i <= 12098; i++) + materials[i] = Material.PaleOakSlab; + for (int i = 10933; i <= 11012; i++) + materials[i] = Material.PaleOakStairs; + for (int i = 6588; i <= 6651; i++) + materials[i] = Material.PaleOakTrapdoor; + for (int i = 5762; i <= 5769; i++) + materials[i] = Material.PaleOakWallHangingSign; + for (int i = 4914; i <= 4921; i++) + materials[i] = Material.PaleOakWallSign; + for (int i = 22; i <= 24; i++) + materials[i] = Material.PaleOakWood; + for (int i = 27629; i <= 27631; i++) + materials[i] = Material.PearlescentFroglight; + for (int i = 11642; i <= 11643; i++) + materials[i] = Material.Peony; + for (int i = 12141; i <= 12146; i++) + materials[i] = Material.PetrifiedOakSlab; + for (int i = 9876; i <= 9907; i++) + materials[i] = Material.PiglinHead; + for (int i = 9908; i <= 9915; i++) + materials[i] = Material.PiglinWallHead; + for (int i = 11744; i <= 11759; i++) + materials[i] = Material.PinkBanner; + for (int i = 1827; i <= 1842; i++) + materials[i] = Material.PinkBed; + for (int i = 21865; i <= 21880; i++) + materials[i] = Material.PinkCandle; + for (int i = 22039; i <= 22040; i++) + materials[i] = Material.PinkCandleCake; + materials[11623] = Material.PinkCarpet; + materials[13757] = Material.PinkConcrete; + materials[13773] = Material.PinkConcretePowder; + for (int i = 13711; i <= 13714; i++) + materials[i] = Material.PinkGlazedTerracotta; + for (int i = 25855; i <= 25870; i++) + materials[i] = Material.PinkPetals; + for (int i = 13627; i <= 13632; i++) + materials[i] = Material.PinkShulkerBox; + materials[6130] = Material.PinkStainedGlass; + for (int i = 10373; i <= 10404; i++) + materials[i] = Material.PinkStainedGlassPane; + materials[10171] = Material.PinkTerracotta; + materials[2130] = Material.PinkTulip; + for (int i = 11928; i <= 11931; i++) + materials[i] = Material.PinkWallBanner; + materials[2099] = Material.PinkWool; + for (int i = 2057; i <= 2068; i++) + materials[i] = Material.Piston; + for (int i = 2069; i <= 2092; i++) + materials[i] = Material.PistonHead; + for (int i = 13520; i <= 13529; i++) + materials[i] = Material.PitcherCrop; + for (int i = 13530; i <= 13531; i++) + materials[i] = Material.PitcherPlant; + for (int i = 9756; i <= 9787; i++) + materials[i] = Material.PlayerHead; + for (int i = 9788; i <= 9795; i++) + materials[i] = Material.PlayerWallHead; + for (int i = 12; i <= 13; i++) + materials[i] = Material.Podzol; + for (int i = 25776; i <= 25795; i++) + materials[i] = Material.PointedDripstone; + materials[7] = Material.PolishedAndesite; + for (int i = 15171; i <= 15176; i++) + materials[i] = Material.PolishedAndesiteSlab; + for (int i = 14945; i <= 15024; i++) + materials[i] = Material.PolishedAndesiteStairs; + for (int i = 6034; i <= 6036; i++) + materials[i] = Material.PolishedBasalt; + materials[20899] = Material.PolishedBlackstone; + for (int i = 20903; i <= 20908; i++) + materials[i] = Material.PolishedBlackstoneBrickSlab; + for (int i = 20909; i <= 20988; i++) + materials[i] = Material.PolishedBlackstoneBrickStairs; + for (int i = 20989; i <= 21312; i++) + materials[i] = Material.PolishedBlackstoneBrickWall; + materials[20900] = Material.PolishedBlackstoneBricks; + for (int i = 21402; i <= 21425; i++) + materials[i] = Material.PolishedBlackstoneButton; + for (int i = 21400; i <= 21401; i++) + materials[i] = Material.PolishedBlackstonePressurePlate; + for (int i = 21394; i <= 21399; i++) + materials[i] = Material.PolishedBlackstoneSlab; + for (int i = 21314; i <= 21393; i++) + materials[i] = Material.PolishedBlackstoneStairs; + for (int i = 21426; i <= 21749; i++) + materials[i] = Material.PolishedBlackstoneWall; + materials[26378] = Material.PolishedDeepslate; + for (int i = 26459; i <= 26464; i++) + materials[i] = Material.PolishedDeepslateSlab; + for (int i = 26379; i <= 26458; i++) + materials[i] = Material.PolishedDeepslateStairs; + for (int i = 26465; i <= 26788; i++) + materials[i] = Material.PolishedDeepslateWall; + materials[5] = Material.PolishedDiorite; + for (int i = 15123; i <= 15128; i++) + materials[i] = Material.PolishedDioriteSlab; + for (int i = 14225; i <= 14304; i++) + materials[i] = Material.PolishedDioriteStairs; + materials[3] = Material.PolishedGranite; + for (int i = 15105; i <= 15110; i++) + materials[i] = Material.PolishedGraniteSlab; + for (int i = 13985; i <= 14064; i++) + materials[i] = Material.PolishedGraniteStairs; + materials[22520] = Material.PolishedTuff; + for (int i = 22521; i <= 22526; i++) + materials[i] = Material.PolishedTuffSlab; + for (int i = 22527; i <= 22606; i++) + materials[i] = Material.PolishedTuffStairs; + for (int i = 22607; i <= 22930; i++) + materials[i] = Material.PolishedTuffWall; + materials[2123] = Material.Poppy; + for (int i = 9388; i <= 9395; i++) + materials[i] = Material.Potatoes; + materials[9357] = Material.PottedAcaciaSapling; + materials[9366] = Material.PottedAllium; + materials[27621] = Material.PottedAzaleaBush; + materials[9367] = Material.PottedAzureBluet; + materials[13980] = Material.PottedBamboo; + materials[9355] = Material.PottedBirchSapling; + materials[9365] = Material.PottedBlueOrchid; + materials[9377] = Material.PottedBrownMushroom; + materials[9379] = Material.PottedCactus; + materials[9358] = Material.PottedCherrySapling; + materials[27912] = Material.PottedClosedEyeblossom; + materials[9373] = Material.PottedCornflower; + materials[20483] = Material.PottedCrimsonFungus; + materials[20485] = Material.PottedCrimsonRoots; + materials[9363] = Material.PottedDandelion; + materials[9359] = Material.PottedDarkOakSapling; + materials[9378] = Material.PottedDeadBush; + materials[9362] = Material.PottedFern; + materials[27622] = Material.PottedFloweringAzaleaBush; + materials[9356] = Material.PottedJungleSapling; + materials[9374] = Material.PottedLilyOfTheValley; + materials[9361] = Material.PottedMangrovePropagule; + materials[9353] = Material.PottedOakSapling; + materials[27911] = Material.PottedOpenEyeblossom; + materials[9369] = Material.PottedOrangeTulip; + materials[9372] = Material.PottedOxeyeDaisy; + materials[9360] = Material.PottedPaleOakSapling; + materials[9371] = Material.PottedPinkTulip; + materials[9364] = Material.PottedPoppy; + materials[9376] = Material.PottedRedMushroom; + materials[9368] = Material.PottedRedTulip; + materials[9354] = Material.PottedSpruceSapling; + materials[9352] = Material.PottedTorchflower; + materials[20484] = Material.PottedWarpedFungus; + materials[20486] = Material.PottedWarpedRoots; + materials[9370] = Material.PottedWhiteTulip; + materials[9375] = Material.PottedWitherRose; + materials[23346] = Material.PowderSnow; + for (int i = 8187; i <= 8189; i++) + materials[i] = Material.PowderSnowCauldron; + for (int i = 1987; i <= 2010; i++) + materials[i] = Material.PoweredRail; + materials[11352] = Material.Prismarine; + for (int i = 11601; i <= 11606; i++) + materials[i] = Material.PrismarineBrickSlab; + for (int i = 11435; i <= 11514; i++) + materials[i] = Material.PrismarineBrickStairs; + materials[11353] = Material.PrismarineBricks; + for (int i = 11595; i <= 11600; i++) + materials[i] = Material.PrismarineSlab; + for (int i = 11355; i <= 11434; i++) + materials[i] = Material.PrismarineStairs; + for (int i = 15507; i <= 15830; i++) + materials[i] = Material.PrismarineWall; + materials[7054] = Material.Pumpkin; + for (int i = 7064; i <= 7071; i++) + materials[i] = Material.PumpkinStem; + for (int i = 11808; i <= 11823; i++) + materials[i] = Material.PurpleBanner; + for (int i = 1891; i <= 1906; i++) + materials[i] = Material.PurpleBed; + for (int i = 21929; i <= 21944; i++) + materials[i] = Material.PurpleCandle; + for (int i = 22047; i <= 22048; i++) + materials[i] = Material.PurpleCandleCake; + materials[11627] = Material.PurpleCarpet; + materials[13761] = Material.PurpleConcrete; + materials[13777] = Material.PurpleConcretePowder; + for (int i = 13727; i <= 13730; i++) + materials[i] = Material.PurpleGlazedTerracotta; + for (int i = 13651; i <= 13656; i++) + materials[i] = Material.PurpleShulkerBox; + materials[6134] = Material.PurpleStainedGlass; + for (int i = 10501; i <= 10532; i++) + materials[i] = Material.PurpleStainedGlassPane; + materials[10175] = Material.PurpleTerracotta; + for (int i = 11944; i <= 11947; i++) + materials[i] = Material.PurpleWallBanner; + materials[2103] = Material.PurpleWool; + materials[13433] = Material.PurpurBlock; + for (int i = 13434; i <= 13436; i++) + materials[i] = Material.PurpurPillar; + for (int i = 12195; i <= 12200; i++) + materials[i] = Material.PurpurSlab; + for (int i = 13437; i <= 13516; i++) + materials[i] = Material.PurpurStairs; + materials[10044] = Material.QuartzBlock; + materials[21752] = Material.QuartzBricks; + for (int i = 10046; i <= 10048; i++) + materials[i] = Material.QuartzPillar; + for (int i = 12177; i <= 12182; i++) + materials[i] = Material.QuartzSlab; + for (int i = 10049; i <= 10128; i++) + materials[i] = Material.QuartzStairs; + for (int i = 4758; i <= 4777; i++) + materials[i] = Material.Rail; + materials[27619] = Material.RawCopperBlock; + materials[27620] = Material.RawGoldBlock; + materials[27618] = Material.RawIronBlock; + for (int i = 11872; i <= 11887; i++) + materials[i] = Material.RedBanner; + for (int i = 1955; i <= 1970; i++) + materials[i] = Material.RedBed; + for (int i = 21993; i <= 22008; i++) + materials[i] = Material.RedCandle; + for (int i = 22055; i <= 22056; i++) + materials[i] = Material.RedCandleCake; + materials[11631] = Material.RedCarpet; + materials[13765] = Material.RedConcrete; + materials[13781] = Material.RedConcretePowder; + for (int i = 13743; i <= 13746; i++) + materials[i] = Material.RedGlazedTerracotta; + materials[2136] = Material.RedMushroom; + for (int i = 6856; i <= 6919; i++) + materials[i] = Material.RedMushroomBlock; + for (int i = 15165; i <= 15170; i++) + materials[i] = Material.RedNetherBrickSlab; + for (int i = 14865; i <= 14944; i++) + materials[i] = Material.RedNetherBrickStairs; + for (int i = 18099; i <= 18422; i++) + materials[i] = Material.RedNetherBrickWall; + materials[13568] = Material.RedNetherBricks; + materials[123] = Material.RedSand; + materials[11968] = Material.RedSandstone; + for (int i = 12183; i <= 12188; i++) + materials[i] = Material.RedSandstoneSlab; + for (int i = 11971; i <= 12050; i++) + materials[i] = Material.RedSandstoneStairs; + for (int i = 15831; i <= 16154; i++) + materials[i] = Material.RedSandstoneWall; + for (int i = 13675; i <= 13680; i++) + materials[i] = Material.RedShulkerBox; + materials[6138] = Material.RedStainedGlass; + for (int i = 10629; i <= 10660; i++) + materials[i] = Material.RedStainedGlassPane; + materials[10179] = Material.RedTerracotta; + materials[2127] = Material.RedTulip; + for (int i = 11960; i <= 11963; i++) + materials[i] = Material.RedWallBanner; + materials[2107] = Material.RedWool; + materials[10032] = Material.RedstoneBlock; + for (int i = 8201; i <= 8202; i++) + materials[i] = Material.RedstoneLamp; + for (int i = 5912; i <= 5913; i++) + materials[i] = Material.RedstoneOre; + for (int i = 5916; i <= 5917; i++) + materials[i] = Material.RedstoneTorch; + for (int i = 5918; i <= 5925; i++) + materials[i] = Material.RedstoneWallTorch; + for (int i = 3042; i <= 4337; i++) + materials[i] = Material.RedstoneWire; + materials[27633] = Material.ReinforcedDeepslate; + for (int i = 6060; i <= 6123; i++) + materials[i] = Material.Repeater; + for (int i = 13538; i <= 13549; i++) + materials[i] = Material.RepeatingCommandBlock; + materials[7643] = Material.ResinBlock; + for (int i = 7725; i <= 7730; i++) + materials[i] = Material.ResinBrickSlab; + for (int i = 7645; i <= 7724; i++) + materials[i] = Material.ResinBrickStairs; + for (int i = 7731; i <= 8054; i++) + materials[i] = Material.ResinBrickWall; + materials[7644] = Material.ResinBricks; + for (int i = 7240; i <= 7367; i++) + materials[i] = Material.ResinClump; + for (int i = 20478; i <= 20482; i++) + materials[i] = Material.RespawnAnchor; + materials[25962] = Material.RootedDirt; + for (int i = 11640; i <= 11641; i++) + materials[i] = Material.RoseBush; + materials[118] = Material.Sand; + materials[578] = Material.Sandstone; + for (int i = 12129; i <= 12134; i++) + materials[i] = Material.SandstoneSlab; + for (int i = 8215; i <= 8294; i++) + materials[i] = Material.SandstoneStairs; + for (int i = 18423; i <= 18746; i++) + materials[i] = Material.SandstoneWall; + for (int i = 19395; i <= 19426; i++) + materials[i] = Material.Scaffolding; + materials[23827] = Material.Sculk; + for (int i = 23956; i <= 23957; i++) + materials[i] = Material.SculkCatalyst; + for (int i = 23347; i <= 23442; i++) + materials[i] = Material.SculkSensor; + for (int i = 23958; i <= 23965; i++) + materials[i] = Material.SculkShrieker; + for (int i = 23828; i <= 23955; i++) + materials[i] = Material.SculkVein; + materials[11613] = Material.SeaLantern; + for (int i = 13956; i <= 13963; i++) + materials[i] = Material.SeaPickle; + materials[2054] = Material.Seagrass; + materials[2052] = Material.ShortDryGrass; + materials[2048] = Material.ShortGrass; + materials[19633] = Material.Shroomlight; + for (int i = 13585; i <= 13590; i++) + materials[i] = Material.ShulkerBox; + for (int i = 9636; i <= 9667; i++) + materials[i] = Material.SkeletonSkull; + for (int i = 9668; i <= 9675; i++) + materials[i] = Material.SkeletonWallSkull; + materials[11253] = Material.SlimeBlock; + for (int i = 22097; i <= 22108; i++) + materials[i] = Material.SmallAmethystBud; + for (int i = 25944; i <= 25959; i++) + materials[i] = Material.SmallDripleaf; + materials[19489] = Material.SmithingTable; + for (int i = 19443; i <= 19450; i++) + materials[i] = Material.Smoker; + materials[27617] = Material.SmoothBasalt; + materials[12203] = Material.SmoothQuartz; + for (int i = 15147; i <= 15152; i++) + materials[i] = Material.SmoothQuartzSlab; + for (int i = 14625; i <= 14704; i++) + materials[i] = Material.SmoothQuartzStairs; + materials[12204] = Material.SmoothRedSandstone; + for (int i = 15111; i <= 15116; i++) + materials[i] = Material.SmoothRedSandstoneSlab; + for (int i = 14065; i <= 14144; i++) + materials[i] = Material.SmoothRedSandstoneStairs; + materials[12202] = Material.SmoothSandstone; + for (int i = 15141; i <= 15146; i++) + materials[i] = Material.SmoothSandstoneSlab; + for (int i = 14545; i <= 14624; i++) + materials[i] = Material.SmoothSandstoneStairs; + materials[12201] = Material.SmoothStone; + for (int i = 12123; i <= 12128; i++) + materials[i] = Material.SmoothStoneSlab; + for (int i = 13823; i <= 13825; i++) + materials[i] = Material.SnifferEgg; + for (int i = 5950; i <= 5957; i++) + materials[i] = Material.Snow; + materials[5959] = Material.SnowBlock; + for (int i = 19566; i <= 19597; i++) + materials[i] = Material.SoulCampfire; + materials[2918] = Material.SoulFire; + for (int i = 19530; i <= 19533; i++) + materials[i] = Material.SoulLantern; + materials[6029] = Material.SoulSand; + materials[6030] = Material.SoulSoil; + materials[6037] = Material.SoulTorch; + for (int i = 6038; i <= 6041; i++) + materials[i] = Material.SoulWallTorch; + materials[2919] = Material.Spawner; + materials[560] = Material.Sponge; + materials[25851] = Material.SporeBlossom; + for (int i = 9420; i <= 9443; i++) + materials[i] = Material.SpruceButton; + for (int i = 12781; i <= 12844; i++) + materials[i] = Material.SpruceDoor; + for (int i = 12493; i <= 12524; i++) + materials[i] = Material.SpruceFence; + for (int i = 12205; i <= 12236; i++) + materials[i] = Material.SpruceFenceGate; + for (int i = 5002; i <= 5065; i++) + materials[i] = Material.SpruceHangingSign; + for (int i = 280; i <= 307; i++) + materials[i] = Material.SpruceLeaves; + for (int i = 139; i <= 141; i++) + materials[i] = Material.SpruceLog; + materials[16] = Material.SprucePlanks; + for (int i = 5894; i <= 5895; i++) + materials[i] = Material.SprucePressurePlate; + for (int i = 31; i <= 32; i++) + materials[i] = Material.SpruceSapling; + for (int i = 4398; i <= 4429; i++) + materials[i] = Material.SpruceSign; + for (int i = 12057; i <= 12062; i++) + materials[i] = Material.SpruceSlab; + for (int i = 8450; i <= 8529; i++) + materials[i] = Material.SpruceStairs; + for (int i = 6204; i <= 6267; i++) + materials[i] = Material.SpruceTrapdoor; + for (int i = 5714; i <= 5721; i++) + materials[i] = Material.SpruceWallHangingSign; + for (int i = 4866; i <= 4873; i++) + materials[i] = Material.SpruceWallSign; + for (int i = 204; i <= 206; i++) + materials[i] = Material.SpruceWood; + for (int i = 2035; i <= 2046; i++) + materials[i] = Material.StickyPiston; + materials[1] = Material.Stone; + for (int i = 12159; i <= 12164; i++) + materials[i] = Material.StoneBrickSlab; + for (int i = 7480; i <= 7559; i++) + materials[i] = Material.StoneBrickStairs; + for (int i = 16803; i <= 17126; i++) + materials[i] = Material.StoneBrickWall; + materials[6780] = Material.StoneBricks; + for (int i = 5926; i <= 5949; i++) + materials[i] = Material.StoneButton; + for (int i = 5826; i <= 5827; i++) + materials[i] = Material.StonePressurePlate; + for (int i = 12117; i <= 12122; i++) + materials[i] = Material.StoneSlab; + for (int i = 14465; i <= 14544; i++) + materials[i] = Material.StoneStairs; + for (int i = 19490; i <= 19493; i++) + materials[i] = Material.Stonecutter; + for (int i = 180; i <= 182; i++) + materials[i] = Material.StrippedAcaciaLog; + for (int i = 237; i <= 239; i++) + materials[i] = Material.StrippedAcaciaWood; + for (int i = 198; i <= 200; i++) + materials[i] = Material.StrippedBambooBlock; + for (int i = 174; i <= 176; i++) + materials[i] = Material.StrippedBirchLog; + for (int i = 231; i <= 233; i++) + materials[i] = Material.StrippedBirchWood; + for (int i = 183; i <= 185; i++) + materials[i] = Material.StrippedCherryLog; + for (int i = 240; i <= 242; i++) + materials[i] = Material.StrippedCherryWood; + for (int i = 19628; i <= 19630; i++) + materials[i] = Material.StrippedCrimsonHyphae; + for (int i = 19622; i <= 19624; i++) + materials[i] = Material.StrippedCrimsonStem; + for (int i = 186; i <= 188; i++) + materials[i] = Material.StrippedDarkOakLog; + for (int i = 243; i <= 245; i++) + materials[i] = Material.StrippedDarkOakWood; + for (int i = 177; i <= 179; i++) + materials[i] = Material.StrippedJungleLog; + for (int i = 234; i <= 236; i++) + materials[i] = Material.StrippedJungleWood; + for (int i = 195; i <= 197; i++) + materials[i] = Material.StrippedMangroveLog; + for (int i = 249; i <= 251; i++) + materials[i] = Material.StrippedMangroveWood; + for (int i = 192; i <= 194; i++) + materials[i] = Material.StrippedOakLog; + for (int i = 225; i <= 227; i++) + materials[i] = Material.StrippedOakWood; + for (int i = 189; i <= 191; i++) + materials[i] = Material.StrippedPaleOakLog; + for (int i = 246; i <= 248; i++) + materials[i] = Material.StrippedPaleOakWood; + for (int i = 171; i <= 173; i++) + materials[i] = Material.StrippedSpruceLog; + for (int i = 228; i <= 230; i++) + materials[i] = Material.StrippedSpruceWood; + for (int i = 19611; i <= 19613; i++) + materials[i] = Material.StrippedWarpedHyphae; + for (int i = 19605; i <= 19607; i++) + materials[i] = Material.StrippedWarpedStem; + for (int i = 20379; i <= 20382; i++) + materials[i] = Material.StructureBlock; + materials[13572] = Material.StructureVoid; + for (int i = 5978; i <= 5993; i++) + materials[i] = Material.SugarCane; + for (int i = 11636; i <= 11637; i++) + materials[i] = Material.Sunflower; + for (int i = 125; i <= 128; i++) + materials[i] = Material.SuspiciousGravel; + for (int i = 119; i <= 122; i++) + materials[i] = Material.SuspiciousSand; + for (int i = 19598; i <= 19601; i++) + materials[i] = Material.SweetBerryBush; + materials[2053] = Material.TallDryGrass; + for (int i = 11644; i <= 11645; i++) + materials[i] = Material.TallGrass; + for (int i = 2055; i <= 2056; i++) + materials[i] = Material.TallSeagrass; + for (int i = 20409; i <= 20424; i++) + materials[i] = Material.Target; + materials[11633] = Material.Terracotta; + for (int i = 20395; i <= 20398; i++) + materials[i] = Material.TestBlock; + materials[20399] = Material.TestInstanceBlock; + materials[23345] = Material.TintedGlass; + for (int i = 2140; i <= 2141; i++) + materials[i] = Material.Tnt; + materials[2401] = Material.Torch; + materials[2122] = Material.Torchflower; + for (int i = 13518; i <= 13519; i++) + materials[i] = Material.TorchflowerCrop; + for (int i = 9928; i <= 9951; i++) + materials[i] = Material.TrappedChest; + for (int i = 27698; i <= 27709; i++) + materials[i] = Material.TrialSpawner; + for (int i = 8321; i <= 8448; i++) + materials[i] = Material.Tripwire; + for (int i = 8305; i <= 8320; i++) + materials[i] = Material.TripwireHook; + for (int i = 13846; i <= 13847; i++) + materials[i] = Material.TubeCoral; + materials[13831] = Material.TubeCoralBlock; + for (int i = 13866; i <= 13867; i++) + materials[i] = Material.TubeCoralFan; + for (int i = 13916; i <= 13923; i++) + materials[i] = Material.TubeCoralWallFan; + materials[22109] = Material.Tuff; + for (int i = 22933; i <= 22938; i++) + materials[i] = Material.TuffBrickSlab; + for (int i = 22939; i <= 23018; i++) + materials[i] = Material.TuffBrickStairs; + for (int i = 23019; i <= 23342; i++) + materials[i] = Material.TuffBrickWall; + materials[22932] = Material.TuffBricks; + for (int i = 22110; i <= 22115; i++) + materials[i] = Material.TuffSlab; + for (int i = 22116; i <= 22195; i++) + materials[i] = Material.TuffStairs; + for (int i = 22196; i <= 22519; i++) + materials[i] = Material.TuffWall; + for (int i = 13811; i <= 13822; i++) + materials[i] = Material.TurtleEgg; + for (int i = 19661; i <= 19686; i++) + materials[i] = Material.TwistingVines; + materials[19687] = Material.TwistingVinesPlant; + for (int i = 27710; i <= 27741; i++) + materials[i] = Material.Vault; + for (int i = 27626; i <= 27628; i++) + materials[i] = Material.VerdantFroglight; + for (int i = 7080; i <= 7111; i++) + materials[i] = Material.Vine; + materials[13981] = Material.VoidAir; + for (int i = 2402; i <= 2405; i++) + materials[i] = Material.WallTorch; + for (int i = 20147; i <= 20170; i++) + materials[i] = Material.WarpedButton; + for (int i = 20235; i <= 20298; i++) + materials[i] = Material.WarpedDoor; + for (int i = 19739; i <= 19770; i++) + materials[i] = Material.WarpedFence; + for (int i = 19931; i <= 19962; i++) + materials[i] = Material.WarpedFenceGate; + materials[19615] = Material.WarpedFungus; + for (int i = 5514; i <= 5577; i++) + materials[i] = Material.WarpedHangingSign; + for (int i = 19608; i <= 19610; i++) + materials[i] = Material.WarpedHyphae; + materials[19614] = Material.WarpedNylium; + materials[19690] = Material.WarpedPlanks; + for (int i = 19705; i <= 19706; i++) + materials[i] = Material.WarpedPressurePlate; + materials[19617] = Material.WarpedRoots; + for (int i = 20331; i <= 20362; i++) + materials[i] = Material.WarpedSign; + for (int i = 19697; i <= 19702; i++) + materials[i] = Material.WarpedSlab; + for (int i = 20043; i <= 20122; i++) + materials[i] = Material.WarpedStairs; + for (int i = 19602; i <= 19604; i++) + materials[i] = Material.WarpedStem; + for (int i = 19835; i <= 19898; i++) + materials[i] = Material.WarpedTrapdoor; + for (int i = 5786; i <= 5793; i++) + materials[i] = Material.WarpedWallHangingSign; + for (int i = 20371; i <= 20378; i++) + materials[i] = Material.WarpedWallSign; + materials[19616] = Material.WarpedWartBlock; + for (int i = 86; i <= 101; i++) + materials[i] = Material.Water; + for (int i = 8183; i <= 8185; i++) + materials[i] = Material.WaterCauldron; + materials[23983] = Material.WaxedChiseledCopper; + materials[24328] = Material.WaxedCopperBlock; + for (int i = 25736; i <= 25739; i++) + materials[i] = Material.WaxedCopperBulb; + for (int i = 24936; i <= 24999; i++) + materials[i] = Material.WaxedCopperDoor; + for (int i = 25712; i <= 25713; i++) + materials[i] = Material.WaxedCopperGrate; + for (int i = 25448; i <= 25511; i++) + materials[i] = Material.WaxedCopperTrapdoor; + materials[24335] = Material.WaxedCutCopper; + for (int i = 24674; i <= 24679; i++) + materials[i] = Material.WaxedCutCopperSlab; + for (int i = 24576; i <= 24655; i++) + materials[i] = Material.WaxedCutCopperStairs; + materials[23982] = Material.WaxedExposedChiseledCopper; + materials[24330] = Material.WaxedExposedCopper; + for (int i = 25740; i <= 25743; i++) + materials[i] = Material.WaxedExposedCopperBulb; + for (int i = 25000; i <= 25063; i++) + materials[i] = Material.WaxedExposedCopperDoor; + for (int i = 25714; i <= 25715; i++) + materials[i] = Material.WaxedExposedCopperGrate; + for (int i = 25512; i <= 25575; i++) + materials[i] = Material.WaxedExposedCopperTrapdoor; + materials[24334] = Material.WaxedExposedCutCopper; + for (int i = 24668; i <= 24673; i++) + materials[i] = Material.WaxedExposedCutCopperSlab; + for (int i = 24496; i <= 24575; i++) + materials[i] = Material.WaxedExposedCutCopperStairs; + materials[23980] = Material.WaxedOxidizedChiseledCopper; + materials[24331] = Material.WaxedOxidizedCopper; + for (int i = 25748; i <= 25751; i++) + materials[i] = Material.WaxedOxidizedCopperBulb; + for (int i = 25064; i <= 25127; i++) + materials[i] = Material.WaxedOxidizedCopperDoor; + for (int i = 25718; i <= 25719; i++) + materials[i] = Material.WaxedOxidizedCopperGrate; + for (int i = 25576; i <= 25639; i++) + materials[i] = Material.WaxedOxidizedCopperTrapdoor; + materials[24332] = Material.WaxedOxidizedCutCopper; + for (int i = 24656; i <= 24661; i++) + materials[i] = Material.WaxedOxidizedCutCopperSlab; + for (int i = 24336; i <= 24415; i++) + materials[i] = Material.WaxedOxidizedCutCopperStairs; + materials[23981] = Material.WaxedWeatheredChiseledCopper; + materials[24329] = Material.WaxedWeatheredCopper; + for (int i = 25744; i <= 25747; i++) + materials[i] = Material.WaxedWeatheredCopperBulb; + for (int i = 25128; i <= 25191; i++) + materials[i] = Material.WaxedWeatheredCopperDoor; + for (int i = 25716; i <= 25717; i++) + materials[i] = Material.WaxedWeatheredCopperGrate; + for (int i = 25640; i <= 25703; i++) + materials[i] = Material.WaxedWeatheredCopperTrapdoor; + materials[24333] = Material.WaxedWeatheredCutCopper; + for (int i = 24662; i <= 24667; i++) + materials[i] = Material.WaxedWeatheredCutCopperSlab; + for (int i = 24416; i <= 24495; i++) + materials[i] = Material.WaxedWeatheredCutCopperStairs; + materials[23977] = Material.WeatheredChiseledCopper; + materials[23968] = Material.WeatheredCopper; + for (int i = 25728; i <= 25731; i++) + materials[i] = Material.WeatheredCopperBulb; + for (int i = 24872; i <= 24935; i++) + materials[i] = Material.WeatheredCopperDoor; + for (int i = 25708; i <= 25709; i++) + materials[i] = Material.WeatheredCopperGrate; + for (int i = 25384; i <= 25447; i++) + materials[i] = Material.WeatheredCopperTrapdoor; + materials[23973] = Material.WeatheredCutCopper; + for (int i = 24310; i <= 24315; i++) + materials[i] = Material.WeatheredCutCopperSlab; + for (int i = 24064; i <= 24143; i++) + materials[i] = Material.WeatheredCutCopperStairs; + for (int i = 19634; i <= 19659; i++) + materials[i] = Material.WeepingVines; + materials[19660] = Material.WeepingVinesPlant; + materials[561] = Material.WetSponge; + for (int i = 4342; i <= 4349; i++) + materials[i] = Material.Wheat; + for (int i = 11648; i <= 11663; i++) + materials[i] = Material.WhiteBanner; + for (int i = 1731; i <= 1746; i++) + materials[i] = Material.WhiteBed; + for (int i = 21769; i <= 21784; i++) + materials[i] = Material.WhiteCandle; + for (int i = 22027; i <= 22028; i++) + materials[i] = Material.WhiteCandleCake; + materials[11617] = Material.WhiteCarpet; + materials[13751] = Material.WhiteConcrete; + materials[13767] = Material.WhiteConcretePowder; + for (int i = 13687; i <= 13690; i++) + materials[i] = Material.WhiteGlazedTerracotta; + for (int i = 13591; i <= 13596; i++) + materials[i] = Material.WhiteShulkerBox; + materials[6124] = Material.WhiteStainedGlass; + for (int i = 10181; i <= 10212; i++) + materials[i] = Material.WhiteStainedGlassPane; + materials[10165] = Material.WhiteTerracotta; + materials[2129] = Material.WhiteTulip; + for (int i = 11904; i <= 11907; i++) + materials[i] = Material.WhiteWallBanner; + materials[2093] = Material.WhiteWool; + for (int i = 25871; i <= 25886; i++) + materials[i] = Material.Wildflowers; + materials[2133] = Material.WitherRose; + for (int i = 9676; i <= 9707; i++) + materials[i] = Material.WitherSkeletonSkull; + for (int i = 9708; i <= 9715; i++) + materials[i] = Material.WitherSkeletonWallSkull; + for (int i = 11712; i <= 11727; i++) + materials[i] = Material.YellowBanner; + for (int i = 1795; i <= 1810; i++) + materials[i] = Material.YellowBed; + for (int i = 21833; i <= 21848; i++) + materials[i] = Material.YellowCandle; + for (int i = 22035; i <= 22036; i++) + materials[i] = Material.YellowCandleCake; + materials[11621] = Material.YellowCarpet; + materials[13755] = Material.YellowConcrete; + materials[13771] = Material.YellowConcretePowder; + for (int i = 13703; i <= 13706; i++) + materials[i] = Material.YellowGlazedTerracotta; + for (int i = 13615; i <= 13620; i++) + materials[i] = Material.YellowShulkerBox; + materials[6128] = Material.YellowStainedGlass; + for (int i = 10309; i <= 10340; i++) + materials[i] = Material.YellowStainedGlassPane; + materials[10169] = Material.YellowTerracotta; + for (int i = 11920; i <= 11923; i++) + materials[i] = Material.YellowWallBanner; + materials[2097] = Material.YellowWool; + for (int i = 9716; i <= 9747; i++) + materials[i] = Material.ZombieHead; + for (int i = 9748; i <= 9755; i++) + materials[i] = Material.ZombieWallHead; + } + + protected override Dictionary GetDict() + { + return materials; + } + } +} diff --git a/MinecraftClient/Mapping/EntityMetaDataType.cs b/MinecraftClient/Mapping/EntityMetaDataType.cs index 53afecfa..075bb52d 100644 --- a/MinecraftClient/Mapping/EntityMetaDataType.cs +++ b/MinecraftClient/Mapping/EntityMetaDataType.cs @@ -26,6 +26,10 @@ public enum EntityMetaDataType Direction, OptionalUuid, /// + /// Boolean + UUID (1.21.5+, replaces OptionalUuid) + /// + OptionalLivingEntityReference, + /// /// VarInt /// BlockId, @@ -55,9 +59,25 @@ public enum EntityMetaDataType /// /// VarInt (1.20.6+) /// + CowVariant, + /// + /// VarInt (1.20.6+) + /// WolfVariant, + /// + /// VarInt (1.21.5+) + /// + WolfSoundVariant, FrogVariant, /// + /// VarInt (1.21.5+) + /// + PigVariant, + /// + /// VarInt (1.21.5+) + /// + ChickenVariant, + /// /// String + Position /// GlobalPosition, diff --git a/MinecraftClient/Mapping/EntityMetadataPalette.cs b/MinecraftClient/Mapping/EntityMetadataPalette.cs index 369672de..e9496d8b 100644 --- a/MinecraftClient/Mapping/EntityMetadataPalette.cs +++ b/MinecraftClient/Mapping/EntityMetadataPalette.cs @@ -24,6 +24,7 @@ public abstract class EntityMetadataPalette <= 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_5_Version => new EntityMetadataPalette1215(), // 1.21.5 _ => throw new NotImplementedException() }; } diff --git a/MinecraftClient/Mapping/EntityMetadataPalettes/EntityMetadataPalette1215.cs b/MinecraftClient/Mapping/EntityMetadataPalettes/EntityMetadataPalette1215.cs new file mode 100644 index 00000000..71653f03 --- /dev/null +++ b/MinecraftClient/Mapping/EntityMetadataPalettes/EntityMetadataPalette1215.cs @@ -0,0 +1,50 @@ +using System.Collections.Generic; + +namespace MinecraftClient.Mapping.EntityMetadataPalettes; + +public class EntityMetadataPalette1215 : EntityMetadataPalette +{ + private readonly Dictionary entityMetadataMappings = new() + { + { 0, EntityMetaDataType.Byte }, + { 1, EntityMetaDataType.VarInt }, + { 2, EntityMetaDataType.VarLong }, + { 3, EntityMetaDataType.Float }, + { 4, EntityMetaDataType.String }, + { 5, EntityMetaDataType.Chat }, + { 6, EntityMetaDataType.OptionalChat }, + { 7, EntityMetaDataType.Slot }, + { 8, EntityMetaDataType.Boolean }, + { 9, EntityMetaDataType.Rotation }, + { 10, EntityMetaDataType.Position }, + { 11, EntityMetaDataType.OptionalPosition }, + { 12, EntityMetaDataType.Direction }, + { 13, EntityMetaDataType.OptionalLivingEntityReference }, + { 14, EntityMetaDataType.BlockId }, + { 15, EntityMetaDataType.OptionalBlockId }, + { 16, EntityMetaDataType.Nbt }, + { 17, EntityMetaDataType.Particle }, + { 18, EntityMetaDataType.Particles }, + { 19, EntityMetaDataType.VillagerData }, + { 20, EntityMetaDataType.OptionalVarInt }, + { 21, EntityMetaDataType.Pose }, + { 22, EntityMetaDataType.CatVariant }, + { 23, EntityMetaDataType.CowVariant }, + { 24, EntityMetaDataType.WolfVariant }, + { 25, EntityMetaDataType.WolfSoundVariant }, + { 26, EntityMetaDataType.FrogVariant }, + { 27, EntityMetaDataType.PigVariant }, + { 28, EntityMetaDataType.ChickenVariant }, + { 29, EntityMetaDataType.OptionalGlobalPosition }, + { 30, EntityMetaDataType.PaintingVariant }, + { 31, EntityMetaDataType.SnifferState }, + { 32, EntityMetaDataType.ArmadilloState }, + { 33, EntityMetaDataType.Vector3 }, + { 34, EntityMetaDataType.Quaternion }, + }; + + public override Dictionary GetEntityMetadataMappingsList() + { + return entityMetadataMappings; + } +} diff --git a/MinecraftClient/Mapping/EntityPalettes/EntityPalette1215.cs b/MinecraftClient/Mapping/EntityPalettes/EntityPalette1215.cs new file mode 100644 index 00000000..ebfe6ab3 --- /dev/null +++ b/MinecraftClient/Mapping/EntityPalettes/EntityPalette1215.cs @@ -0,0 +1,168 @@ +using System.Collections.Generic; + +namespace MinecraftClient.Mapping.EntityPalettes +{ + public class EntityPalette1215 : EntityPalette + { + private static readonly Dictionary mappings = new(); + + static EntityPalette1215() + { + mappings[0] = EntityType.AcaciaBoat; + mappings[1] = EntityType.AcaciaChestBoat; + mappings[2] = EntityType.Allay; + mappings[3] = EntityType.AreaEffectCloud; + mappings[4] = EntityType.Armadillo; + mappings[5] = EntityType.ArmorStand; + mappings[6] = EntityType.Arrow; + mappings[7] = EntityType.Axolotl; + mappings[8] = EntityType.BambooChestRaft; + mappings[9] = EntityType.BambooRaft; + mappings[10] = EntityType.Bat; + mappings[11] = EntityType.Bee; + mappings[12] = EntityType.BirchBoat; + mappings[13] = EntityType.BirchChestBoat; + mappings[14] = EntityType.Blaze; + mappings[15] = EntityType.BlockDisplay; + mappings[16] = EntityType.Bogged; + mappings[17] = EntityType.Breeze; + mappings[18] = EntityType.BreezeWindCharge; + mappings[19] = EntityType.Camel; + mappings[20] = EntityType.Cat; + mappings[21] = EntityType.CaveSpider; + mappings[22] = EntityType.CherryBoat; + mappings[23] = EntityType.CherryChestBoat; + mappings[24] = EntityType.ChestMinecart; + mappings[25] = EntityType.Chicken; + mappings[26] = EntityType.Cod; + mappings[27] = EntityType.CommandBlockMinecart; + mappings[28] = EntityType.Cow; + mappings[29] = EntityType.Creaking; + mappings[30] = EntityType.Creeper; + mappings[31] = EntityType.DarkOakBoat; + mappings[32] = EntityType.DarkOakChestBoat; + mappings[33] = EntityType.Dolphin; + mappings[34] = EntityType.Donkey; + mappings[35] = EntityType.DragonFireball; + mappings[36] = EntityType.Drowned; + mappings[37] = EntityType.Egg; + mappings[38] = EntityType.ElderGuardian; + mappings[39] = EntityType.Enderman; + mappings[40] = EntityType.Endermite; + mappings[41] = EntityType.EnderDragon; + mappings[42] = EntityType.EnderPearl; + mappings[43] = EntityType.EndCrystal; + mappings[44] = EntityType.Evoker; + mappings[45] = EntityType.EvokerFangs; + mappings[46] = EntityType.ExperienceBottle; + mappings[47] = EntityType.ExperienceOrb; + mappings[48] = EntityType.EyeOfEnder; + mappings[49] = EntityType.FallingBlock; + mappings[50] = EntityType.Fireball; + mappings[51] = EntityType.FireworkRocket; + mappings[52] = EntityType.Fox; + mappings[53] = EntityType.Frog; + mappings[54] = EntityType.FurnaceMinecart; + mappings[55] = EntityType.Ghast; + mappings[56] = EntityType.Giant; + mappings[57] = EntityType.GlowItemFrame; + mappings[58] = EntityType.GlowSquid; + mappings[59] = EntityType.Goat; + mappings[60] = EntityType.Guardian; + mappings[61] = EntityType.Hoglin; + mappings[62] = EntityType.HopperMinecart; + mappings[63] = EntityType.Horse; + mappings[64] = EntityType.Husk; + mappings[65] = EntityType.Illusioner; + mappings[66] = EntityType.Interaction; + mappings[67] = EntityType.IronGolem; + mappings[68] = EntityType.Item; + mappings[69] = EntityType.ItemDisplay; + mappings[70] = EntityType.ItemFrame; + mappings[71] = EntityType.JungleBoat; + mappings[72] = EntityType.JungleChestBoat; + mappings[73] = EntityType.LeashKnot; + mappings[74] = EntityType.LightningBolt; + mappings[75] = EntityType.Llama; + mappings[76] = EntityType.LlamaSpit; + mappings[77] = EntityType.MagmaCube; + mappings[78] = EntityType.MangroveBoat; + mappings[79] = EntityType.MangroveChestBoat; + mappings[80] = EntityType.Marker; + mappings[81] = EntityType.Minecart; + mappings[82] = EntityType.Mooshroom; + mappings[83] = EntityType.Mule; + mappings[84] = EntityType.OakBoat; + mappings[85] = EntityType.OakChestBoat; + mappings[86] = EntityType.Ocelot; + mappings[87] = EntityType.OminousItemSpawner; + mappings[88] = EntityType.Painting; + mappings[89] = EntityType.PaleOakBoat; + mappings[90] = EntityType.PaleOakChestBoat; + mappings[91] = EntityType.Panda; + mappings[92] = EntityType.Parrot; + mappings[93] = EntityType.Phantom; + mappings[94] = EntityType.Pig; + mappings[95] = EntityType.Piglin; + mappings[96] = EntityType.PiglinBrute; + mappings[97] = EntityType.Pillager; + mappings[98] = EntityType.PolarBear; + mappings[99] = EntityType.SplashPotion; + mappings[100] = EntityType.LingeringPotion; + mappings[101] = EntityType.Pufferfish; + mappings[102] = EntityType.Rabbit; + mappings[103] = EntityType.Ravager; + mappings[104] = EntityType.Salmon; + mappings[105] = EntityType.Sheep; + mappings[106] = EntityType.Shulker; + mappings[107] = EntityType.ShulkerBullet; + mappings[108] = EntityType.Silverfish; + mappings[109] = EntityType.Skeleton; + mappings[110] = EntityType.SkeletonHorse; + mappings[111] = EntityType.Slime; + mappings[112] = EntityType.SmallFireball; + mappings[113] = EntityType.Sniffer; + mappings[114] = EntityType.Snowball; + mappings[115] = EntityType.SnowGolem; + mappings[116] = EntityType.SpawnerMinecart; + mappings[117] = EntityType.SpectralArrow; + mappings[118] = EntityType.Spider; + mappings[119] = EntityType.SpruceBoat; + mappings[120] = EntityType.SpruceChestBoat; + mappings[121] = EntityType.Squid; + mappings[122] = EntityType.Stray; + mappings[123] = EntityType.Strider; + mappings[124] = EntityType.Tadpole; + mappings[125] = EntityType.TextDisplay; + mappings[126] = EntityType.Tnt; + mappings[127] = EntityType.TntMinecart; + mappings[128] = EntityType.TraderLlama; + mappings[129] = EntityType.Trident; + mappings[130] = EntityType.TropicalFish; + mappings[131] = EntityType.Turtle; + mappings[132] = EntityType.Vex; + mappings[133] = EntityType.Villager; + mappings[134] = EntityType.Vindicator; + mappings[135] = EntityType.WanderingTrader; + mappings[136] = EntityType.Warden; + mappings[137] = EntityType.WindCharge; + mappings[138] = EntityType.Witch; + mappings[139] = EntityType.Wither; + mappings[140] = EntityType.WitherSkeleton; + mappings[141] = EntityType.WitherSkull; + mappings[142] = EntityType.Wolf; + mappings[143] = EntityType.Zoglin; + mappings[144] = EntityType.Zombie; + mappings[145] = EntityType.ZombieHorse; + mappings[146] = EntityType.ZombieVillager; + mappings[147] = EntityType.ZombifiedPiglin; + mappings[148] = EntityType.Player; + mappings[149] = EntityType.FishingBobber; + } + + protected override Dictionary GetDict() + { + return mappings; + } + } +} diff --git a/MinecraftClient/Mapping/EntityType.cs b/MinecraftClient/Mapping/EntityType.cs index 2aab3358..2dc813c8 100644 --- a/MinecraftClient/Mapping/EntityType.cs +++ b/MinecraftClient/Mapping/EntityType.cs @@ -118,6 +118,8 @@ namespace MinecraftClient.Mapping Pillager, Player, PolarBear, + SplashPotion, + LingeringPotion, Potion, Pufferfish, Rabbit, diff --git a/MinecraftClient/Mapping/EntityTypeExtensions.cs b/MinecraftClient/Mapping/EntityTypeExtensions.cs index e6546d22..8609a2c2 100644 --- a/MinecraftClient/Mapping/EntityTypeExtensions.cs +++ b/MinecraftClient/Mapping/EntityTypeExtensions.cs @@ -1,4 +1,4 @@ -namespace MinecraftClient.Mapping +namespace MinecraftClient.Mapping { public static class EntityTypeExtensions { @@ -110,6 +110,8 @@ case EntityType.Egg: case EntityType.EnderPearl: case EntityType.Potion: + case EntityType.SplashPotion: + case EntityType.LingeringPotion: case EntityType.Fireball: case EntityType.FireworkRocket: return true; diff --git a/MinecraftClient/Mapping/Material.cs b/MinecraftClient/Mapping/Material.cs index 0f43af41..9485e760 100644 --- a/MinecraftClient/Mapping/Material.cs +++ b/MinecraftClient/Mapping/Material.cs @@ -162,7 +162,9 @@ namespace MinecraftClient.Mapping BubbleCoralFan, BubbleCoralWallFan, BuddingAmethyst, + Bush, // bush Cactus, + CactusFlower, // cactus_flower Cake, Calcite, CalibratedSculkSensor, @@ -394,6 +396,7 @@ namespace MinecraftClient.Mapping FireCoralBlock, FireCoralFan, FireCoralWallFan, + FireflyBush, // firefly_bush FletchingTable, FlowerPot, FloweringAzalea, @@ -497,6 +500,7 @@ namespace MinecraftClient.Mapping LargeFern, Lava, LavaCauldron, + LeafLitter, // leaf_litter Lectern, Lever, Light, @@ -879,6 +883,7 @@ namespace MinecraftClient.Mapping SeaLantern, SeaPickle, Seagrass, + ShortDryGrass, // short_dry_grass ShortGrass, Shroomlight, ShulkerBox, @@ -972,10 +977,13 @@ namespace MinecraftClient.Mapping SuspiciousGravel, SuspiciousSand, SweetBerryBush, + TallDryGrass, // tall_dry_grass TallGrass, TallSeagrass, Target, Terracotta, + TestBlock, // test_block + TestInstanceBlock, // test_instance_block TintedGlass, Tnt, Torch, @@ -1090,6 +1098,7 @@ namespace MinecraftClient.Mapping WhiteTulip, WhiteWallBanner, WhiteWool, + Wildflowers, // wildflowers WitherRose, WitherSkeletonSkull, WitherSkeletonWallSkull, diff --git a/MinecraftClient/Protocol/Handlers/DataTypes.cs b/MinecraftClient/Protocol/Handlers/DataTypes.cs index 271d98f8..ab46dca7 100644 --- a/MinecraftClient/Protocol/Handlers/DataTypes.cs +++ b/MinecraftClient/Protocol/Handlers/DataTypes.cs @@ -826,6 +826,7 @@ namespace MinecraftClient.Protocol.Handlers value = ReadNextVarInt(cache); break; case EntityMetaDataType.OptionalUuid: // Optional UUID + case EntityMetaDataType.OptionalLivingEntityReference: // Optional Living Entity Reference (1.21.5+, same wire format) if (ReadNextBool(cache)) { value = ReadNextUUID(cache); @@ -873,10 +874,14 @@ namespace MinecraftClient.Protocol.Handlers case EntityMetaDataType.CatVariant: // Cat Variant value = ReadNextVarInt(cache); break; + case EntityMetaDataType.CowVariant: // Cow Variant (1.21.5+) case EntityMetaDataType.WolfVariant: // Wolf Variant (1.20.6+) + case EntityMetaDataType.WolfSoundVariant: // Wolf Sound Variant (1.21.5+) value = ReadNextVarInt(cache); break; case EntityMetaDataType.FrogVariant: // Frog Variant + case EntityMetaDataType.PigVariant: // Pig Variant (1.21.5+) + case EntityMetaDataType.ChickenVariant: // Chicken Variant (1.21.5+) value = ReadNextVarInt(cache); break; case EntityMetaDataType.GlobalPosition: // GlobalPos diff --git a/MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette1215.cs b/MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette1215.cs new file mode 100644 index 00000000..4ecc5079 --- /dev/null +++ b/MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette1215.cs @@ -0,0 +1,247 @@ +using System.Collections.Generic; + +namespace MinecraftClient.Protocol.Handlers.PacketPalettes; + +public class PacketPalette1215 : PacketTypePalette + { + private readonly Dictionary typeIn = new() + { + { 0x00, PacketTypesIn.Bundle }, // Bundle delimiter + { 0x01, PacketTypesIn.SpawnEntity }, // Add Entity + { 0x02, PacketTypesIn.EntityAnimation }, // Animate (was 0x03 in 1.21.4; AddExperienceOrb removed) + { 0x03, PacketTypesIn.Statistics }, // Award Stats + { 0x04, PacketTypesIn.BlockChangedAck }, // Block Changed Ack + { 0x05, PacketTypesIn.BlockBreakAnimation }, // Block Destruction + { 0x06, PacketTypesIn.BlockEntityData }, // Block Entity Data + { 0x07, PacketTypesIn.BlockAction }, // Block Event + { 0x08, PacketTypesIn.BlockChange }, // Block Update + { 0x09, PacketTypesIn.BossBar }, // Boss Event + { 0x0A, PacketTypesIn.ServerDifficulty }, // Change Difficulty + { 0x0B, PacketTypesIn.ChunkBatchFinished }, // Chunk Batch Finished + { 0x0C, PacketTypesIn.ChunkBatchStarted }, // Chunk Batch Start + { 0x0D, PacketTypesIn.ChunksBiomes }, // Chunks Biomes + { 0x0E, PacketTypesIn.ClearTiles }, // Clear Titles + { 0x0F, PacketTypesIn.TabComplete }, // Command Suggestions + { 0x10, PacketTypesIn.DeclareCommands }, // Commands + { 0x11, PacketTypesIn.CloseWindow }, // Container Close + { 0x12, PacketTypesIn.WindowItems }, // Container Set Content + { 0x13, PacketTypesIn.WindowProperty }, // Container Set Data + { 0x14, PacketTypesIn.SetSlot }, // Container Set Slot + { 0x15, PacketTypesIn.CookieRequest }, // Cookie Request + { 0x16, PacketTypesIn.SetCooldown }, // Cooldown + { 0x17, PacketTypesIn.ChatSuggestions }, // Custom Chat Completions + { 0x18, PacketTypesIn.PluginMessage }, // Custom Payload + { 0x19, PacketTypesIn.DamageEvent }, // Damage Event + { 0x1A, PacketTypesIn.DebugSample }, // Debug Sample + { 0x1B, PacketTypesIn.HideMessage }, // Delete Chat + { 0x1C, PacketTypesIn.Disconnect }, // Disconnect + { 0x1D, PacketTypesIn.ProfilelessChatMessage }, // Disguised Chat + { 0x1E, PacketTypesIn.EntityStatus }, // Entity Event + { 0x1F, PacketTypesIn.EntityPositionSync }, // Entity Position Sync + { 0x20, PacketTypesIn.Explosion }, // Explode + { 0x21, PacketTypesIn.UnloadChunk }, // Forget Level Chunk + { 0x22, PacketTypesIn.ChangeGameState }, // Game Event + { 0x23, PacketTypesIn.OpenHorseWindow }, // Horse Screen Open + { 0x24, PacketTypesIn.HurtAnimation }, // Hurt Animation + { 0x25, PacketTypesIn.InitializeWorldBorder }, // Initialize Border + { 0x26, PacketTypesIn.KeepAlive }, // Keep Alive + { 0x27, PacketTypesIn.ChunkData }, // Level Chunk With Light + { 0x28, PacketTypesIn.Effect }, // Level Event + { 0x29, PacketTypesIn.Particle }, // Level Particles + { 0x2A, PacketTypesIn.UpdateLight }, // Light Update + { 0x2B, PacketTypesIn.JoinGame }, // Login + { 0x2C, PacketTypesIn.MapData }, // Map Item Data + { 0x2D, PacketTypesIn.TradeList }, // Merchant Offers + { 0x2E, PacketTypesIn.EntityPosition }, // Move Entity Pos + { 0x2F, PacketTypesIn.EntityPositionAndRotation }, // Move Entity Pos Rot + { 0x30, PacketTypesIn.MoveMinecartAlongTrack }, // Move Minecart Along Track + { 0x31, PacketTypesIn.EntityRotation }, // Move Entity Rot + { 0x32, PacketTypesIn.VehicleMove }, // Move Vehicle + { 0x33, PacketTypesIn.OpenBook }, // Open Book + { 0x34, PacketTypesIn.OpenWindow }, // Open Screen + { 0x35, PacketTypesIn.OpenSignEditor }, // Open Sign Editor + { 0x36, PacketTypesIn.Ping }, // Ping + { 0x37, PacketTypesIn.PingResponse }, // Pong Response + { 0x38, PacketTypesIn.CraftRecipeResponse }, // Place Ghost Recipe + { 0x39, PacketTypesIn.PlayerAbilities }, // Player Abilities + { 0x3A, PacketTypesIn.ChatMessage }, // Player Chat + { 0x3B, PacketTypesIn.EndCombatEvent }, // Player Combat End + { 0x3C, PacketTypesIn.EnterCombatEvent }, // Player Combat Enter + { 0x3D, PacketTypesIn.DeathCombatEvent }, // Player Combat Kill + { 0x3E, PacketTypesIn.PlayerRemove }, // Player Info Remove + { 0x3F, PacketTypesIn.PlayerInfo }, // Player Info Update + { 0x40, PacketTypesIn.FacePlayer }, // Player Look At + { 0x41, PacketTypesIn.PlayerPositionAndLook }, // Player Position + { 0x42, PacketTypesIn.PlayerRotation }, // Player Rotation + { 0x43, PacketTypesIn.RecipeBookAdd }, // Recipe Book Add + { 0x44, PacketTypesIn.RecipeBookRemove }, // Recipe Book Remove + { 0x45, PacketTypesIn.RecipeBookSettings }, // Recipe Book Settings + { 0x46, PacketTypesIn.DestroyEntities }, // Remove Entities + { 0x47, PacketTypesIn.RemoveEntityEffect }, // Remove Mob Effect + { 0x48, PacketTypesIn.ResetScore }, // Reset Score + { 0x49, PacketTypesIn.RemoveResourcePack }, // Resource Pack Pop + { 0x4A, PacketTypesIn.ResourcePackSend }, // Resource Pack Push + { 0x4B, PacketTypesIn.Respawn }, // Respawn + { 0x4C, PacketTypesIn.EntityHeadLook }, // Rotate Head + { 0x4D, PacketTypesIn.MultiBlockChange }, // Section Blocks Update + { 0x4E, PacketTypesIn.SelectAdvancementTab }, // Select Advancements Tab + { 0x4F, PacketTypesIn.ServerData }, // Server Data + { 0x50, PacketTypesIn.ActionBar }, // Set Action Bar Text + { 0x51, PacketTypesIn.WorldBorderCenter }, // Set Border Center + { 0x52, PacketTypesIn.WorldBorderLerpSize }, // Set Border Lerp Size + { 0x53, PacketTypesIn.WorldBorderSize }, // Set Border Size + { 0x54, PacketTypesIn.WorldBorderWarningDelay }, // Set Border Warning Delay + { 0x55, PacketTypesIn.WorldBorderWarningReach }, // Set Border Warning Distance + { 0x56, PacketTypesIn.Camera }, // Set Camera + { 0x57, PacketTypesIn.UpdateViewPosition }, // Set Chunk Cache Center + { 0x58, PacketTypesIn.UpdateViewDistance }, // Set Chunk Cache Radius + { 0x59, PacketTypesIn.SetCursorItem }, // Set Cursor Item + { 0x5A, PacketTypesIn.SpawnPosition }, // Set Default Spawn Position + { 0x5B, PacketTypesIn.DisplayScoreboard }, // Set Display Objective + { 0x5C, PacketTypesIn.EntityMetadata }, // Set Entity Data + { 0x5D, PacketTypesIn.AttachEntity }, // Set Entity Link + { 0x5E, PacketTypesIn.EntityVelocity }, // Set Entity Motion + { 0x5F, PacketTypesIn.EntityEquipment }, // Set Equipment + { 0x60, PacketTypesIn.SetExperience }, // Set Experience + { 0x61, PacketTypesIn.UpdateHealth }, // Set Health + { 0x62, PacketTypesIn.SetHeldSlot }, // Set Held Slot + { 0x63, PacketTypesIn.ScoreboardObjective }, // Set Objective + { 0x64, PacketTypesIn.SetPassengers }, // Set Passengers + { 0x65, PacketTypesIn.SetPlayerInventory }, // Set Player Inventory + { 0x66, PacketTypesIn.Teams }, // Set Player Team + { 0x67, PacketTypesIn.UpdateScore }, // Set Score + { 0x68, PacketTypesIn.UpdateSimulationDistance }, // Set Simulation Distance + { 0x69, PacketTypesIn.SetTitleSubTitle }, // Set Subtitle Text + { 0x6A, PacketTypesIn.TimeUpdate }, // Set Time + { 0x6B, PacketTypesIn.SetTitleText }, // Set Title Text + { 0x6C, PacketTypesIn.SetTitleTime }, // Set Titles Animation + { 0x6D, PacketTypesIn.EntitySoundEffect }, // Sound Entity + { 0x6E, PacketTypesIn.SoundEffect }, // Sound + { 0x6F, PacketTypesIn.StartConfiguration }, // Start Configuration + { 0x70, PacketTypesIn.StopSound }, // Stop Sound + { 0x71, PacketTypesIn.StoreCookie }, // Store Cookie + { 0x72, PacketTypesIn.SystemChat }, // System Chat + { 0x73, PacketTypesIn.PlayerListHeaderAndFooter }, // Tab List + { 0x74, PacketTypesIn.NBTQueryResponse }, // Tag Query + { 0x75, PacketTypesIn.CollectItem }, // Take Item Entity + { 0x76, PacketTypesIn.EntityTeleport }, // Teleport Entity + { 0x77, PacketTypesIn.TestInstanceBlockStatus }, // Test Instance Block Status (new in 1.21.5) + { 0x78, PacketTypesIn.SetTickingState }, // Ticking State + { 0x79, PacketTypesIn.StepTick }, // Ticking Step + { 0x7A, PacketTypesIn.Transfer }, // Transfer + { 0x7B, PacketTypesIn.Advancements }, // Update Advancements + { 0x7C, PacketTypesIn.EntityProperties }, // Update Attributes + { 0x7D, PacketTypesIn.EntityEffect }, // Update Mob Effect + { 0x7E, PacketTypesIn.DeclareRecipes }, // Update Recipes + { 0x7F, PacketTypesIn.Tags }, // Update Tags + { 0x80, PacketTypesIn.ProjectilePower }, // Projectile Power + { 0x81, PacketTypesIn.CustomReportDetails }, // Custom Report Details + { 0x82, PacketTypesIn.ServerLinks } // Server Links + }; + + private readonly Dictionary typeOut = new() + { + { 0x00, PacketTypesOut.TeleportConfirm }, // Accept Teleportation + { 0x01, PacketTypesOut.QueryBlockNBT }, // Block Entity Tag Query + { 0x02, PacketTypesOut.BundleItemSelected }, // Bundle Item Selected + { 0x03, PacketTypesOut.SetDifficulty }, // Change Difficulty + { 0x04, PacketTypesOut.MessageAcknowledgment }, // Chat Ack + { 0x05, PacketTypesOut.ChatCommand }, // Chat Command + { 0x06, PacketTypesOut.SignedChatCommand }, // Chat Command Signed + { 0x07, PacketTypesOut.ChatMessage }, // Chat + { 0x08, PacketTypesOut.PlayerSession }, // Chat Session Update + { 0x09, PacketTypesOut.ChunkBatchReceived }, // Chunk Batch Received + { 0x0A, PacketTypesOut.ClientStatus }, // Client Command + { 0x0B, PacketTypesOut.ClientTickEnd }, // Client Tick End + { 0x0C, PacketTypesOut.ClientSettings }, // Client Information + { 0x0D, PacketTypesOut.TabComplete }, // Command Suggestion + { 0x0E, PacketTypesOut.AcknowledgeConfiguration }, // Configuration Acknowledged + { 0x0F, PacketTypesOut.ClickWindowButton }, // Container Button Click + { 0x10, PacketTypesOut.ClickWindow }, // Container Click + { 0x11, PacketTypesOut.CloseWindow }, // Container Close + { 0x12, PacketTypesOut.ChangeContainerSlotState }, // Container Slot State Changed + { 0x13, PacketTypesOut.CookieResponse }, // Cookie Response + { 0x14, PacketTypesOut.PluginMessage }, // Custom Payload + { 0x15, PacketTypesOut.DebugSampleSubscription }, // Debug Sample Subscription + { 0x16, PacketTypesOut.EditBook }, // Edit Book + { 0x17, PacketTypesOut.EntityNBTRequest }, // Entity Tag Query + { 0x18, PacketTypesOut.InteractEntity }, // Interact + { 0x19, PacketTypesOut.GenerateStructure }, // Jigsaw Generate + { 0x1A, PacketTypesOut.KeepAlive }, // Keep Alive + { 0x1B, PacketTypesOut.LockDifficulty }, // Lock Difficulty + { 0x1C, PacketTypesOut.PlayerPosition }, // Move Player Pos + { 0x1D, PacketTypesOut.PlayerPositionAndRotation }, // Move Player Pos Rot + { 0x1E, PacketTypesOut.PlayerRotation }, // Move Player Rot + { 0x1F, PacketTypesOut.PlayerMovement }, // Move Player Status Only + { 0x20, PacketTypesOut.VehicleMove }, // Move Vehicle + { 0x21, PacketTypesOut.SteerBoat }, // Paddle Boat + { 0x22, PacketTypesOut.PickItem }, // Pick Item From Block + { 0x23, PacketTypesOut.PickItemFromEntity }, // Pick Item From Entity + { 0x24, PacketTypesOut.PingRequest }, // Ping Request + { 0x25, PacketTypesOut.CraftRecipeRequest }, // Place Recipe + { 0x26, PacketTypesOut.PlayerAbilities }, // Player Abilities + { 0x27, PacketTypesOut.PlayerDigging }, // Player Action + { 0x28, PacketTypesOut.EntityAction }, // Player Command + { 0x29, PacketTypesOut.SteerVehicle }, // Player Input + { 0x2A, PacketTypesOut.PlayerLoaded }, // Player Loaded + { 0x2B, PacketTypesOut.Pong }, // Pong + { 0x2C, PacketTypesOut.SetDisplayedRecipe }, // Recipe Book Change Settings + { 0x2D, PacketTypesOut.SetRecipeBookState }, // Recipe Book Seen Recipe + { 0x2E, PacketTypesOut.NameItem }, // Rename Item + { 0x2F, PacketTypesOut.ResourcePackStatus }, // Resource Pack + { 0x30, PacketTypesOut.AdvancementTab }, // Seen Advancements + { 0x31, PacketTypesOut.SelectTrade }, // Select Trade + { 0x32, PacketTypesOut.SetBeaconEffect }, // Set Beacon + { 0x33, PacketTypesOut.HeldItemChange }, // Set Carried Item + { 0x34, PacketTypesOut.UpdateCommandBlock }, // Set Command Block + { 0x35, PacketTypesOut.UpdateCommandBlockMinecart }, // Set Command Minecart + { 0x36, PacketTypesOut.CreativeInventoryAction }, // Set Creative Mode Slot + { 0x37, PacketTypesOut.UpdateJigsawBlock }, // Set Jigsaw Block + { 0x38, PacketTypesOut.UpdateStructureBlock }, // Set Structure Block + { 0x39, PacketTypesOut.SetTestBlock }, // Set Test Block (new in 1.21.5) + { 0x3A, PacketTypesOut.UpdateSign }, // Sign Update + { 0x3B, PacketTypesOut.Animation }, // Swing + { 0x3C, PacketTypesOut.Spectate }, // Teleport To Entity + { 0x3D, PacketTypesOut.TestInstanceBlockAction }, // Test Instance Block Action (new in 1.21.5) + { 0x3E, PacketTypesOut.PlayerBlockPlacement }, // Use Item On + { 0x3F, PacketTypesOut.UseItem }, // Use Item + }; + + private readonly Dictionary configurationTypesIn = new() + { + { 0x00, ConfigurationPacketTypesIn.CookieRequest }, + { 0x01, ConfigurationPacketTypesIn.PluginMessage }, + { 0x02, ConfigurationPacketTypesIn.Disconnect }, + { 0x03, ConfigurationPacketTypesIn.FinishConfiguration }, + { 0x04, ConfigurationPacketTypesIn.KeepAlive }, + { 0x05, ConfigurationPacketTypesIn.Ping }, + { 0x06, ConfigurationPacketTypesIn.ResetChat }, + { 0x07, ConfigurationPacketTypesIn.RegistryData }, + { 0x08, ConfigurationPacketTypesIn.RemoveResourcePack }, + { 0x09, ConfigurationPacketTypesIn.ResourcePack }, + { 0x0A, ConfigurationPacketTypesIn.StoreCookie }, + { 0x0B, ConfigurationPacketTypesIn.Transfer }, + { 0x0C, ConfigurationPacketTypesIn.FeatureFlags }, + { 0x0D, ConfigurationPacketTypesIn.UpdateTags }, + { 0x0E, ConfigurationPacketTypesIn.KnownDataPacks }, + { 0x0F, ConfigurationPacketTypesIn.CustomReportDetails }, + { 0x10, ConfigurationPacketTypesIn.ServerLinks } + }; + + private readonly Dictionary configurationTypesOut = new() + { + { 0x00, ConfigurationPacketTypesOut.ClientInformation }, + { 0x01, ConfigurationPacketTypesOut.CookieResponse }, + { 0x02, ConfigurationPacketTypesOut.PluginMessage }, + { 0x03, ConfigurationPacketTypesOut.FinishConfiguration }, + { 0x04, ConfigurationPacketTypesOut.KeepAlive }, + { 0x05, ConfigurationPacketTypesOut.Pong }, + { 0x06, ConfigurationPacketTypesOut.ResourcePackResponse }, + { 0x07, ConfigurationPacketTypesOut.KnownDataPacks } + }; + + protected override Dictionary GetListIn() => typeIn; + protected override Dictionary GetListOut() => typeOut; + protected override Dictionary GetConfigurationListIn() => configurationTypesIn!; + protected override Dictionary GetConfigurationListOut() => configurationTypesOut!; + } diff --git a/MinecraftClient/Protocol/Handlers/PacketType18Handler.cs b/MinecraftClient/Protocol/Handlers/PacketType18Handler.cs index c03ade1b..ab800bb6 100644 --- a/MinecraftClient/Protocol/Handlers/PacketType18Handler.cs +++ b/MinecraftClient/Protocol/Handlers/PacketType18Handler.cs @@ -48,8 +48,9 @@ namespace MinecraftClient.Protocol.Handlers { PacketTypePalette p = protocol switch { - > Protocol18Handler.MC_1_21_4_Version => throw new NotImplementedException(Translations + > Protocol18Handler.MC_1_21_5_Version => throw new NotImplementedException(Translations .exception_palette_packet), + <= Protocol18Handler.MC_1_21_5_Version and > Protocol18Handler.MC_1_21_4_Version => new PacketPalette1215(), <= Protocol18Handler.MC_1_21_4_Version and > Protocol18Handler.MC_1_21_2_Version => new PacketPalette1214(), <= Protocol18Handler.MC_1_8_Version => new PacketPalette17(), <= Protocol18Handler.MC_1_11_2_Version => new PacketPalette110(), diff --git a/MinecraftClient/Protocol/Handlers/PacketTypesIn.cs b/MinecraftClient/Protocol/Handlers/PacketTypesIn.cs index 19d72455..7defe5e7 100644 --- a/MinecraftClient/Protocol/Handlers/PacketTypesIn.cs +++ b/MinecraftClient/Protocol/Handlers/PacketTypesIn.cs @@ -134,6 +134,7 @@ namespace MinecraftClient.Protocol.Handlers TabComplete, // Tags, // Teams, // + TestInstanceBlockStatus, // Added in 1.21.5 TimeUpdate, // Title, // TradeList, // diff --git a/MinecraftClient/Protocol/Handlers/PacketTypesOut.cs b/MinecraftClient/Protocol/Handlers/PacketTypesOut.cs index a93ea13b..3b1523eb 100644 --- a/MinecraftClient/Protocol/Handlers/PacketTypesOut.cs +++ b/MinecraftClient/Protocol/Handlers/PacketTypesOut.cs @@ -71,6 +71,8 @@ namespace MinecraftClient.Protocol.Handlers UpdateJigsawBlock, // UpdateSign, // UpdateStructureBlock, // + SetTestBlock, // Added in 1.21.5 + TestInstanceBlockAction, // Added in 1.21.5 UseItem, // VehicleMove, // WindowConfirmation, // diff --git a/MinecraftClient/Protocol/Handlers/Protocol18.cs b/MinecraftClient/Protocol/Handlers/Protocol18.cs index b2393fa9..e9019316 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol18.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol18.cs @@ -75,6 +75,7 @@ namespace MinecraftClient.Protocol.Handlers internal const int MC_1_21_Version = 767; internal const int MC_1_21_2_Version = 768; internal const int MC_1_21_4_Version = 769; + internal const int MC_1_21_5_Version = 770; private int compression_treshold = -1; private int autocomplete_transaction_id = 0; @@ -126,21 +127,21 @@ namespace MinecraftClient.Protocol.Handlers lastSeenMessagesCollector = protocolVersion >= MC_1_19_3_Version ? new(20) : new(5); chunkBatchStartTime = GetNanos(); - if (handler.GetTerrainEnabled() && protocolVersion > MC_1_21_4_Version) + if (handler.GetTerrainEnabled() && protocolVersion > MC_1_21_5_Version) { log.Error($"§c{Translations.extra_terrainandmovement_disabled}"); handler.SetTerrainEnabled(false); } if (handler.GetInventoryEnabled() && - protocolVersion is < MC_1_8_Version or > MC_1_21_4_Version) + protocolVersion is < MC_1_8_Version or > MC_1_21_5_Version) { log.Error($"§c{Translations.extra_inventory_disabled}"); handler.SetInventoryEnabled(false); } if (handler.GetEntityHandlingEnabled() && - protocolVersion is < MC_1_8_Version or > MC_1_21_4_Version) + protocolVersion is < MC_1_8_Version or > MC_1_21_5_Version) { log.Error($"§c{Translations.extra_entity_disabled}"); handler.SetEntityHandlingEnabled(false); @@ -149,8 +150,9 @@ namespace MinecraftClient.Protocol.Handlers Block.Palette = protocolVersion switch { // Block palette - > MC_1_21_4_Version when handler.GetTerrainEnabled() => + > MC_1_21_5_Version when handler.GetTerrainEnabled() => throw new NotImplementedException(Translations.exception_palette_block), + >= MC_1_21_5_Version => new Palette1215(), >= MC_1_21_4_Version => new Palette1214(), >= MC_1_21_2_Version => new Palette1212(), >= MC_1_20_6_Version => new Palette1206(), @@ -170,8 +172,9 @@ namespace MinecraftClient.Protocol.Handlers entityPalette = protocolVersion switch { // Entity palette - > MC_1_21_4_Version when handler.GetEntityHandlingEnabled() => + > MC_1_21_5_Version when handler.GetEntityHandlingEnabled() => throw new NotImplementedException(Translations.exception_palette_entity), + >= MC_1_21_5_Version => new EntityPalette1215(), >= MC_1_21_4_Version => new EntityPalette1214(), >= MC_1_21_2_Version => new EntityPalette1212(), >= MC_1_20_6_Version => new EntityPalette1206(), @@ -195,8 +198,9 @@ namespace MinecraftClient.Protocol.Handlers itemPalette = protocolVersion switch { // Item palette - > MC_1_21_4_Version when handler.GetInventoryEnabled() => + > MC_1_21_5_Version when handler.GetInventoryEnabled() => throw new NotImplementedException(Translations.exception_palette_item), + >= MC_1_21_5_Version => new ItemPalette1215(), >= MC_1_21_4_Version => new ItemPalette1214(), >= MC_1_21_2_Version => new ItemPalette1212(), >= MC_1_21_Version => new ItemPalette121(), @@ -2631,7 +2635,7 @@ namespace MinecraftClient.Protocol.Handlers // Also make a palette for field? Will be a lot of work var healthField = protocolVersion switch { - > MC_1_21_4_Version => throw new NotImplementedException(Translations + > MC_1_21_5_Version => throw new NotImplementedException(Translations .exception_palette_healthfield), // 1.17 and above >= MC_1_17_Version => 9, diff --git a/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/BlocksAttacksComponent.cs b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/BlocksAttacksComponent.cs new file mode 100644 index 00000000..f756e9a2 --- /dev/null +++ b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/BlocksAttacksComponent.cs @@ -0,0 +1,83 @@ +using System.Collections.Generic; +using MinecraftClient.Inventory.ItemPalettes; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Core; + +namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_5; + +public class BlocksAttacksComponent(DataTypes dataTypes, ItemPalette itemPalette, SubComponentRegistry subComponentRegistry) + : StructuredComponent(dataTypes, itemPalette, subComponentRegistry) +{ + public float BlockDelaySeconds { get; set; } + public float DisableCooldownScale { get; set; } + public List RawDamageReductions { get; set; } = []; + public float ItemDamageThreshold { get; set; } + public float ItemDamageBase { get; set; } + public float ItemDamageFactor { get; set; } + + public override void Parse(Queue data) + { + BlockDelaySeconds = dataTypes.ReadNextFloat(data); + DisableCooldownScale = dataTypes.ReadNextFloat(data); + + var reductionCount = dataTypes.ReadNextVarInt(data); + for (var i = 0; i < reductionCount; i++) + { + var horizontalBlockingAngle = dataTypes.ReadNextFloat(data); + + var hasTypeFilter = dataTypes.ReadNextBool(data); + if (hasTypeFilter) + ReadHolderSet(data); + + var baseDmg = dataTypes.ReadNextFloat(data); + var factor = dataTypes.ReadNextFloat(data); + } + + ItemDamageThreshold = dataTypes.ReadNextFloat(data); + ItemDamageBase = dataTypes.ReadNextFloat(data); + ItemDamageFactor = dataTypes.ReadNextFloat(data); + + var hasBypassedBy = dataTypes.ReadNextBool(data); + if (hasBypassedBy) + dataTypes.ReadNextString(data); // TagKey as ResourceLocation + + var hasBlockSound = dataTypes.ReadNextBool(data); + if (hasBlockSound) + ReadSoundEventHolder(data); + + var hasDisableSound = dataTypes.ReadNextBool(data); + if (hasDisableSound) + ReadSoundEventHolder(data); + } + + private void ReadHolderSet(Queue data) + { + var sizeOrTag = dataTypes.ReadNextVarInt(data); + if (sizeOrTag == 0) + { + dataTypes.ReadNextString(data); // Tag ResourceLocation + } + else + { + var count = sizeOrTag - 1; + for (var i = 0; i < count; i++) + dataTypes.ReadNextVarInt(data); // Holder registry ids + } + } + + private void ReadSoundEventHolder(Queue data) + { + var holderId = dataTypes.ReadNextVarInt(data); + if (holderId == 0) + { + dataTypes.ReadNextString(data); // ResourceLocation + var hasFixedRange = dataTypes.ReadNextBool(data); + if (hasFixedRange) + dataTypes.ReadNextFloat(data); + } + } + + public override Queue Serialize() + { + return new Queue(); + } +} diff --git a/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/EitherHolderComponent.cs b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/EitherHolderComponent.cs new file mode 100644 index 00000000..4319693f --- /dev/null +++ b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/EitherHolderComponent.cs @@ -0,0 +1,51 @@ +using System.Collections.Generic; +using MinecraftClient.Inventory.ItemPalettes; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Core; + +namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_5; + +public class EitherHolderComponent(DataTypes dataTypes, ItemPalette itemPalette, SubComponentRegistry subComponentRegistry) + : StructuredComponent(dataTypes, itemPalette, subComponentRegistry) +{ + public bool IsHolder { get; set; } + public int HolderId { get; set; } + public string? ResourceKey { get; set; } + + public override void Parse(Queue data) + { + IsHolder = dataTypes.ReadNextBool(data); + if (IsHolder) + { + HolderId = dataTypes.ReadNextVarInt(data); + // For simple entity variants, holderId > 0 means registry ref (id = holderId - 1) + // holderId == 0 means inline data; for most variants the inline is just the variant fields + // We skip inline data since MCC doesn't use variant details + if (HolderId == 0) + { + // Read inline variant data - varies by type, but most are simple + // For chicken/variant specifically this might have additional fields + // We'll consume what we can based on the pattern + // TODO: If needed, specialize per variant type + } + } + else + { + ResourceKey = dataTypes.ReadNextString(data); + } + } + + public override Queue Serialize() + { + var bytes = new List(); + bytes.AddRange(DataTypes.GetBool(IsHolder)); + if (IsHolder) + { + bytes.AddRange(DataTypes.GetVarInt(HolderId)); + } + else + { + bytes.AddRange(DataTypes.GetString(ResourceKey ?? "")); + } + return new Queue(bytes); + } +} diff --git a/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/InstrumentComponent1215.cs b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/InstrumentComponent1215.cs new file mode 100644 index 00000000..bedbde20 --- /dev/null +++ b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/InstrumentComponent1215.cs @@ -0,0 +1,43 @@ +using System.Collections.Generic; +using MinecraftClient.Inventory.ItemPalettes; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Core; + +namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_5; + +public class InstrumentComponent1215(DataTypes dataTypes, ItemPalette itemPalette, SubComponentRegistry subComponentRegistry) + : StructuredComponent(dataTypes, itemPalette, subComponentRegistry) +{ + public override void Parse(Queue data) + { + // EitherHolder: Bool + (Holder OR ResourceLocation) + var isHolder = dataTypes.ReadNextBool(data); + if (isHolder) + { + var holderId = dataTypes.ReadNextVarInt(data); + if (holderId == 0) + { + // Inline Instrument: SoundEvent holder + VarInt useDuration + Float range + Component description + var soundHolderId = dataTypes.ReadNextVarInt(data); + if (soundHolderId == 0) + { + dataTypes.ReadNextString(data); // ResourceLocation + var hasFixedRange = dataTypes.ReadNextBool(data); + if (hasFixedRange) + dataTypes.ReadNextFloat(data); + } + dataTypes.ReadNextVarInt(data); // useDuration + dataTypes.ReadNextFloat(data); // range + dataTypes.ReadNextString(data); // description (Component as JSON string) + } + } + else + { + dataTypes.ReadNextString(data); // ResourceLocation key + } + } + + public override Queue Serialize() + { + return new Queue(); + } +} diff --git a/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/PaintingVariantHolderComponent.cs b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/PaintingVariantHolderComponent.cs new file mode 100644 index 00000000..a67bef25 --- /dev/null +++ b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/PaintingVariantHolderComponent.cs @@ -0,0 +1,35 @@ +using System.Collections.Generic; +using MinecraftClient.Inventory.ItemPalettes; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Core; + +namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_5; + +public class PaintingVariantHolderComponent(DataTypes dataTypes, ItemPalette itemPalette, SubComponentRegistry subComponentRegistry) + : StructuredComponent(dataTypes, itemPalette, subComponentRegistry) +{ + public override void Parse(Queue data) + { + // Holder: VarInt discriminator + var holderId = dataTypes.ReadNextVarInt(data); + if (holderId == 0) + { + // Inline PaintingVariant: VarInt width + VarInt height + ResourceLocation assetId + dataTypes.ReadNextVarInt(data); // width + dataTypes.ReadNextVarInt(data); // height + dataTypes.ReadNextString(data); // assetId + + // Optional title + if (dataTypes.ReadNextBool(data)) + dataTypes.ReadNextString(data); + + // Optional author + if (dataTypes.ReadNextBool(data)) + dataTypes.ReadNextString(data); + } + } + + public override Queue Serialize() + { + return new Queue(); + } +} diff --git a/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/PotionDurationScaleComponent.cs b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/PotionDurationScaleComponent.cs new file mode 100644 index 00000000..d0fac894 --- /dev/null +++ b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/PotionDurationScaleComponent.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using MinecraftClient.Inventory.ItemPalettes; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Core; + +namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_5; + +public class PotionDurationScaleComponent(DataTypes dataTypes, ItemPalette itemPalette, SubComponentRegistry subComponentRegistry) + : StructuredComponent(dataTypes, itemPalette, subComponentRegistry) +{ + public float Scale { get; set; } + + public override void Parse(Queue data) + { + Scale = dataTypes.ReadNextFloat(data); + } + + public override Queue Serialize() + { + var bytes = new List(); + bytes.AddRange(DataTypes.GetFloat(Scale)); + return new Queue(bytes); + } +} diff --git a/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/ProvidesBannerPatternsComponent.cs b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/ProvidesBannerPatternsComponent.cs new file mode 100644 index 00000000..0b0db7f7 --- /dev/null +++ b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/ProvidesBannerPatternsComponent.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using MinecraftClient.Inventory.ItemPalettes; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Core; + +namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_5; + +public class ProvidesBannerPatternsComponent(DataTypes dataTypes, ItemPalette itemPalette, SubComponentRegistry subComponentRegistry) + : StructuredComponent(dataTypes, itemPalette, subComponentRegistry) +{ + public string TagKey { get; set; } = string.Empty; + + public override void Parse(Queue data) + { + TagKey = dataTypes.ReadNextString(data); // ResourceLocation + } + + public override Queue Serialize() + { + var bytes = new List(); + bytes.AddRange(DataTypes.GetString(TagKey)); + return new Queue(bytes); + } +} diff --git a/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/ProvidesTrimMaterialComponent.cs b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/ProvidesTrimMaterialComponent.cs new file mode 100644 index 00000000..fde8db41 --- /dev/null +++ b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/ProvidesTrimMaterialComponent.cs @@ -0,0 +1,42 @@ +using System.Collections.Generic; +using MinecraftClient.Inventory.ItemPalettes; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Core; + +namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_5; + +public class ProvidesTrimMaterialComponent(DataTypes dataTypes, ItemPalette itemPalette, SubComponentRegistry subComponentRegistry) + : StructuredComponent(dataTypes, itemPalette, subComponentRegistry) +{ + public override void Parse(Queue data) + { + // EitherHolder: Bool + (Holder OR ResourceLocation) + var isHolder = dataTypes.ReadNextBool(data); + if (isHolder) + { + var holderId = dataTypes.ReadNextVarInt(data); + if (holderId == 0) + { + // Inline TrimMaterial: MaterialAssetGroup + Component description + // MaterialAssetGroup: string + map + dataTypes.ReadNextString(data); // base asset suffix + var overrideCount = dataTypes.ReadNextVarInt(data); + for (var i = 0; i < overrideCount; i++) + { + dataTypes.ReadNextString(data); // ResourceKey + dataTypes.ReadNextString(data); // override suffix + } + // description Component + dataTypes.ReadNextString(data); + } + } + else + { + dataTypes.ReadNextString(data); // ResourceLocation key + } + } + + public override Queue Serialize() + { + return new Queue(); + } +} diff --git a/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/SoundEventHolderComponent.cs b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/SoundEventHolderComponent.cs new file mode 100644 index 00000000..849f3018 --- /dev/null +++ b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/SoundEventHolderComponent.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using MinecraftClient.Inventory.ItemPalettes; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Core; + +namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_5; + +public class SoundEventHolderComponent(DataTypes dataTypes, ItemPalette itemPalette, SubComponentRegistry subComponentRegistry) + : StructuredComponent(dataTypes, itemPalette, subComponentRegistry) +{ + public int HolderId { get; set; } + public string? SoundLocation { get; set; } + public bool HasFixedRange { get; set; } + public float FixedRange { get; set; } + + public override void Parse(Queue data) + { + HolderId = dataTypes.ReadNextVarInt(data); + if (HolderId == 0) + { + SoundLocation = dataTypes.ReadNextString(data); + HasFixedRange = dataTypes.ReadNextBool(data); + if (HasFixedRange) + FixedRange = dataTypes.ReadNextFloat(data); + } + } + + public override Queue Serialize() + { + var bytes = new List(); + bytes.AddRange(DataTypes.GetVarInt(HolderId)); + if (HolderId == 0) + { + bytes.AddRange(DataTypes.GetString(SoundLocation ?? "")); + bytes.AddRange(DataTypes.GetBool(HasFixedRange)); + if (HasFixedRange) + bytes.AddRange(DataTypes.GetFloat(FixedRange)); + } + return new Queue(bytes); + } +} diff --git a/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/TooltipDisplayComponent.cs b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/TooltipDisplayComponent.cs new file mode 100644 index 00000000..9611e3d5 --- /dev/null +++ b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/TooltipDisplayComponent.cs @@ -0,0 +1,30 @@ +using System.Collections.Generic; +using MinecraftClient.Inventory.ItemPalettes; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Core; + +namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_5; + +public class TooltipDisplayComponent(DataTypes dataTypes, ItemPalette itemPalette, SubComponentRegistry subComponentRegistry) + : StructuredComponent(dataTypes, itemPalette, subComponentRegistry) +{ + public bool HideTooltip { get; set; } + public List HiddenComponentIds { get; set; } = []; + + public override void Parse(Queue data) + { + HideTooltip = dataTypes.ReadNextBool(data); + var count = dataTypes.ReadNextVarInt(data); + for (var i = 0; i < count; i++) + HiddenComponentIds.Add(dataTypes.ReadNextVarInt(data)); + } + + public override Queue Serialize() + { + var bytes = new List(); + bytes.AddRange(DataTypes.GetBool(HideTooltip)); + bytes.AddRange(DataTypes.GetVarInt(HiddenComponentIds.Count)); + foreach (var id in HiddenComponentIds) + bytes.AddRange(DataTypes.GetVarInt(id)); + return new Queue(bytes); + } +} diff --git a/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/VarIntComponent.cs b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/VarIntComponent.cs new file mode 100644 index 00000000..086b14cd --- /dev/null +++ b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/VarIntComponent.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; +using MinecraftClient.Inventory.ItemPalettes; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Core; + +namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_5; + +public class VarIntComponent(DataTypes dataTypes, ItemPalette itemPalette, SubComponentRegistry subComponentRegistry) + : StructuredComponent(dataTypes, itemPalette, subComponentRegistry) +{ + public int Value { get; set; } + + public override void Parse(Queue data) + { + Value = dataTypes.ReadNextVarInt(data); + } + + public override Queue Serialize() + { + var bytes = new List(); + bytes.AddRange(DataTypes.GetVarInt(Value)); + return new Queue(bytes); + } +} diff --git a/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/WeaponComponent.cs b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/WeaponComponent.cs new file mode 100644 index 00000000..64c513eb --- /dev/null +++ b/MinecraftClient/Protocol/Handlers/StructuredComponents/Components/1_21_5/WeaponComponent.cs @@ -0,0 +1,26 @@ +using System.Collections.Generic; +using MinecraftClient.Inventory.ItemPalettes; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Core; + +namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_5; + +public class WeaponComponent(DataTypes dataTypes, ItemPalette itemPalette, SubComponentRegistry subComponentRegistry) + : StructuredComponent(dataTypes, itemPalette, subComponentRegistry) +{ + public int ItemDamagePerAttack { get; set; } + public float DisableBlockingForSeconds { get; set; } + + public override void Parse(Queue data) + { + ItemDamagePerAttack = dataTypes.ReadNextVarInt(data); + DisableBlockingForSeconds = dataTypes.ReadNextFloat(data); + } + + public override Queue Serialize() + { + var bytes = new List(); + bytes.AddRange(DataTypes.GetVarInt(ItemDamagePerAttack)); + bytes.AddRange(DataTypes.GetFloat(DisableBlockingForSeconds)); + return new Queue(bytes); + } +} diff --git a/MinecraftClient/Protocol/Handlers/StructuredComponents/Registries/StructuredComponentsRegistry1215.cs b/MinecraftClient/Protocol/Handlers/StructuredComponents/Registries/StructuredComponentsRegistry1215.cs new file mode 100644 index 00000000..26b3b27e --- /dev/null +++ b/MinecraftClient/Protocol/Handlers/StructuredComponents/Registries/StructuredComponentsRegistry1215.cs @@ -0,0 +1,116 @@ +using MinecraftClient.Inventory.ItemPalettes; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Components; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_20_6; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_2; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Components._1_21_5; +using MinecraftClient.Protocol.Handlers.StructuredComponents.Core; + +namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Registries; + +public class StructuredComponentsRegistry1215 : StructuredComponentRegistry +{ + public StructuredComponentsRegistry1215(DataTypes dataTypes, ItemPalette itemPalette, SubComponentRegistry subComponentRegistry) + : base(dataTypes, itemPalette, subComponentRegistry) + { + RegisterComponent(0, "minecraft:custom_data"); + RegisterComponent(1, "minecraft:max_stack_size"); + RegisterComponent(2, "minecraft:max_damage"); + RegisterComponent(3, "minecraft:damage"); + RegisterComponent(4, "minecraft:unbreakable"); // Changed from Unbreakable (Bool) to Unit (empty) in 1.21.5 + RegisterComponent(5, "minecraft:custom_name"); + RegisterComponent(6, "minecraft:item_name"); + RegisterComponent(7, "minecraft:item_model"); + RegisterComponent(8, "minecraft:lore"); + RegisterComponent(9, "minecraft:rarity"); + RegisterComponent(10, "minecraft:enchantments"); + RegisterComponent(11, "minecraft:can_place_on"); + RegisterComponent(12, "minecraft:can_break"); + RegisterComponent(13, "minecraft:attribute_modifiers"); + RegisterComponent(14, "minecraft:custom_model_data"); + // 15: tooltip_display (NEW, replaces hide_additional_tooltip + hide_tooltip) + RegisterComponent(15, "minecraft:tooltip_display"); + RegisterComponent(16, "minecraft:repair_cost"); + RegisterComponent(17, "minecraft:creative_slot_lock"); + RegisterComponent(18, "minecraft:enchantment_glint_override"); + RegisterComponent(19, "minecraft:intangible_projectile"); + RegisterComponent(20, "minecraft:food"); + RegisterComponent(21, "minecraft:consumable"); + RegisterComponent(22, "minecraft:use_remainder"); + RegisterComponent(23, "minecraft:use_cooldown"); + RegisterComponent(24, "minecraft:damage_resistant"); + RegisterComponent(25, "minecraft:tool"); + RegisterComponent(26, "minecraft:weapon"); // NEW + RegisterComponent(27, "minecraft:enchantable"); + RegisterComponent(28, "minecraft:equippable"); + RegisterComponent(29, "minecraft:repairable"); + RegisterComponent(30, "minecraft:glider"); + RegisterComponent(31, "minecraft:tooltip_style"); + RegisterComponent(32, "minecraft:death_protection"); + RegisterComponent(33, "minecraft:blocks_attacks"); // NEW + RegisterComponent(34, "minecraft:stored_enchantments"); + RegisterComponent(35, "minecraft:dyed_color"); + RegisterComponent(36, "minecraft:map_color"); + RegisterComponent(37, "minecraft:map_id"); + RegisterComponent(38, "minecraft:map_decorations"); + RegisterComponent(39, "minecraft:map_post_processing"); + RegisterComponent(40, "minecraft:charged_projectiles"); + RegisterComponent(41, "minecraft:bundle_contents"); + RegisterComponent(42, "minecraft:potion_contents"); + RegisterComponent(43, "minecraft:potion_duration_scale"); // NEW + RegisterComponent(44, "minecraft:suspicious_stew_effects"); + RegisterComponent(45, "minecraft:writable_book_content"); + RegisterComponent(46, "minecraft:written_book_content"); + RegisterComponent(47, "minecraft:trim"); + RegisterComponent(48, "minecraft:debug_stick_state"); + RegisterComponent(49, "minecraft:entity_data"); + RegisterComponent(50, "minecraft:bucket_entity_data"); + RegisterComponent(51, "minecraft:block_entity_data"); + RegisterComponent(52, "minecraft:instrument"); // Changed to EitherHolder in 1.21.5 + RegisterComponent(53, "minecraft:provides_trim_material"); // NEW + RegisterComponent(54, "minecraft:ominous_bottle_amplifier"); + RegisterComponent(55, "minecraft:jukebox_playable"); + RegisterComponent(56, "minecraft:provides_banner_patterns"); // NEW + RegisterComponent(57, "minecraft:recipes"); + RegisterComponent(58, "minecraft:lodestone_tracker"); + RegisterComponent(59, "minecraft:firework_explosion"); + RegisterComponent(60, "minecraft:fireworks"); + RegisterComponent(61, "minecraft:profile"); + RegisterComponent(62, "minecraft:note_block_sound"); + RegisterComponent(63, "minecraft:banner_patterns"); + RegisterComponent(64, "minecraft:base_color"); + RegisterComponent(65, "minecraft:pot_decorations"); + RegisterComponent(66, "minecraft:container"); + RegisterComponent(67, "minecraft:block_state"); + RegisterComponent(68, "minecraft:bees"); // Wire format unchanged in 1.21.5 + RegisterComponent(69, "minecraft:lock"); + RegisterComponent(70, "minecraft:container_loot"); + + // Entity variant components (NEW in 1.21.5) + RegisterComponent(71, "minecraft:break_sound"); + RegisterComponent(72, "minecraft:villager/variant"); + RegisterComponent(73, "minecraft:wolf/variant"); + RegisterComponent(74, "minecraft:wolf/sound_variant"); + RegisterComponent(75, "minecraft:wolf/collar"); // DyeColor as VarInt + RegisterComponent(76, "minecraft:fox/variant"); + RegisterComponent(77, "minecraft:salmon/size"); + RegisterComponent(78, "minecraft:parrot/variant"); + RegisterComponent(79, "minecraft:tropical_fish/pattern"); + RegisterComponent(80, "minecraft:tropical_fish/base_color"); // DyeColor + RegisterComponent(81, "minecraft:tropical_fish/pattern_color"); // DyeColor + RegisterComponent(82, "minecraft:mooshroom/variant"); + RegisterComponent(83, "minecraft:rabbit/variant"); + RegisterComponent(84, "minecraft:pig/variant"); + RegisterComponent(85, "minecraft:cow/variant"); + RegisterComponent(86, "minecraft:chicken/variant"); // EitherHolder + RegisterComponent(87, "minecraft:frog/variant"); + RegisterComponent(88, "minecraft:horse/variant"); + RegisterComponent(89, "minecraft:painting/variant"); // Holder + RegisterComponent(90, "minecraft:llama/variant"); + RegisterComponent(91, "minecraft:axolotl/variant"); + RegisterComponent(92, "minecraft:cat/variant"); + RegisterComponent(93, "minecraft:cat/collar"); // DyeColor + RegisterComponent(94, "minecraft:sheep/color"); // DyeColor + RegisterComponent(95, "minecraft:shulker/color"); // DyeColor + } +} diff --git a/MinecraftClient/Protocol/Handlers/StructuredComponents/StructuredComponentsHandler.cs b/MinecraftClient/Protocol/Handlers/StructuredComponents/StructuredComponentsHandler.cs index 9729e5f4..7274c319 100644 --- a/MinecraftClient/Protocol/Handlers/StructuredComponents/StructuredComponentsHandler.cs +++ b/MinecraftClient/Protocol/Handlers/StructuredComponents/StructuredComponentsHandler.cs @@ -21,6 +21,7 @@ public class StructuredComponentsHandler { Protocol18Handler.MC_1_20_6_Version => typeof(SubComponentRegistry1206), Protocol18Handler.MC_1_21_Version => typeof(SubComponentRegistry121), + >= Protocol18Handler.MC_1_21_5_Version => typeof(SubComponentRegistry1212), >= Protocol18Handler.MC_1_21_2_Version => typeof(SubComponentRegistry1212), _ => throw new NotSupportedException($"Protocol version {protocolVersion} is not supported for subcomponent registries!") }; @@ -33,6 +34,7 @@ public class StructuredComponentsHandler { Protocol18Handler.MC_1_20_6_Version => typeof(StructuredComponentsRegistry1206), Protocol18Handler.MC_1_21_Version => typeof(StructuredComponentsRegistry121), + >= Protocol18Handler.MC_1_21_5_Version => typeof(StructuredComponentsRegistry1215), >= Protocol18Handler.MC_1_21_2_Version => typeof(StructuredComponentsRegistry1212), _ => throw new NotSupportedException($"Protocol version {protocolVersion} is not supported for structured component registries!") }; diff --git a/MinecraftClient/Protocol/ProtocolHandler.cs b/MinecraftClient/Protocol/ProtocolHandler.cs index aba121fa..684e351b 100644 --- a/MinecraftClient/Protocol/ProtocolHandler.cs +++ b/MinecraftClient/Protocol/ProtocolHandler.cs @@ -154,7 +154,7 @@ namespace MinecraftClient.Protocol { 4, 5, 47, 107, 108, 109, 110, 210, 315, 316, 335, 338, 340, 393, 401, 404, 477, 480, 485, 490, 498, 573, 575, 578, 735, 736, 751, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764, 765, 766, 767, 768, - 769 + 769, 770 }; if (Array.IndexOf(suppoertedVersionsProtocol18, protocolVersion) > -1) @@ -358,6 +358,8 @@ namespace MinecraftClient.Protocol return 768; case "1.21.4": return 769; + case "1.21.5": + return 770; default: return 0; } @@ -441,6 +443,7 @@ namespace MinecraftClient.Protocol 767 => "1.21", 768 => "1.21.2", 769 => "1.21.4", + 770 => "1.21.5", _ => "0.0" }; } diff --git a/scripts/gen_palette_1214.py b/scripts/gen_palette_1214.py new file mode 100644 index 00000000..cf3ce31c --- /dev/null +++ b/scripts/gen_palette_1214.py @@ -0,0 +1,112 @@ +#!/usr/bin/env python3 +""" +Generate Palette1214.cs from vanilla reports/blocks.json (1.21.4). + +Obtain blocks.json: + java -DbundlerMainClass=net.minecraft.data.Main -jar server.jar --reports --output + -> /reports/blocks.json + +Default input: /tmp/mc1214_reports/reports/blocks.json (run this script after generating reports). +""" +from __future__ import annotations + +import json +import re +import sys +from collections import defaultdict +from pathlib import Path + +ROOT = Path("/home/ryan/Minecraft/Minecraft-Console-Client-milutinke") +DEFAULT_JSON = Path("/tmp/mc1214_reports/reports/blocks.json") +OUT = ROOT / "MinecraftClient/Mapping/BlockPalettes/Palette1214.cs" + + +def snake_to_material_pascal(snake: str) -> str: + return "".join(part.capitalize() for part in snake.split("_")) + + +def merge_ranges(sorted_ids: list[int]) -> list[tuple[int, int]]: + if not sorted_ids: + return [] + ids = sorted(sorted_ids) + out: list[tuple[int, int]] = [] + s = e = ids[0] + for x in ids[1:]: + if x == e + 1: + e = x + else: + out.append((s, e)) + s = e = x + out.append((s, e)) + return out + + +def emit_palette(assignments: list[tuple[str, list[tuple[int, int]]]]) -> str: + lines = [ + "using System.Collections.Generic;", + "", + "namespace MinecraftClient.Mapping.BlockPalettes", + "{", + " public class Palette1214 : BlockPalette", + " {", + " private static readonly Dictionary materials = new();", + "", + " static Palette1214()", + " {", + ] + for mat, ranges in sorted(assignments, key=lambda x: x[0]): + for start, end in ranges: + if start == end: + lines.append(f" materials[{start}] = Material.{mat};") + else: + lines.append(f" for (int i = {start}; i <= {end}; i++)") + lines.append(f" materials[i] = Material.{mat};") + lines.extend( + [ + " }", + "", + " protected override Dictionary GetDict()", + " {", + " return materials;", + " }", + " }", + "}", + ] + ) + return "\n".join(lines) + "\n" + + +def main() -> None: + json_path = Path(sys.argv[1]) if len(sys.argv) > 1 else DEFAULT_JSON + if not json_path.is_file(): + raise SystemExit(f"Missing {json_path} — generate with server.jar --reports") + + data = json.loads(json_path.read_text(encoding="utf-8")) + ids_by_material: dict[str, list[int]] = defaultdict(list) + known: set[int] = set() + max_id = -1 + + for key, val in data.items(): + if not key.startswith("minecraft:"): + raise SystemExit(f"Unexpected block key: {key}") + name = key.split(":", 1)[1] + mat = snake_to_material_pascal(name) + for st in val["states"]: + sid = int(st["id"]) + if sid in known: + raise SystemExit(f"Duplicate state id {sid}") + known.add(sid) + max_id = max(max_id, sid) + ids_by_material[mat].append(sid) + + expected = max_id + 1 + if len(known) != expected: + raise SystemExit(f"Non-contiguous state IDs: have {len(known)}, expected 0..{max_id}") + + assignments = [(m, merge_ranges(ids)) for m, ids in ids_by_material.items()] + OUT.write_text(emit_palette(assignments), encoding="utf-8") + print(f"Wrote {OUT} ({expected} states, {len(data)} block types)") + + +if __name__ == "__main__": + main() diff --git a/tools/gen_entity_metadata_palette.py b/tools/gen_entity_metadata_palette.py index ab914cf8..260fe722 100644 --- a/tools/gen_entity_metadata_palette.py +++ b/tools/gen_entity_metadata_palette.py @@ -37,6 +37,7 @@ FIELD_TO_ENUM = { "OPTIONAL_BLOCK_POS": "OptionalPosition", "DIRECTION": "Direction", "OPTIONAL_UUID": "OptionalUuid", + "OPTIONAL_LIVING_ENTITY_REFERENCE": "OptionalLivingEntityReference", "BLOCK_STATE": "BlockId", "OPTIONAL_BLOCK_STATE": "OptionalBlockId", "COMPOUND_TAG": "Nbt", @@ -46,8 +47,12 @@ FIELD_TO_ENUM = { "OPTIONAL_UNSIGNED_INT": "OptionalVarInt", "POSE": "Pose", "CAT_VARIANT": "CatVariant", + "COW_VARIANT": "CowVariant", "WOLF_VARIANT": "WolfVariant", + "WOLF_SOUND_VARIANT": "WolfSoundVariant", "FROG_VARIANT": "FrogVariant", + "PIG_VARIANT": "PigVariant", + "CHICKEN_VARIANT": "ChickenVariant", "OPTIONAL_GLOBAL_POS": "OptionalGlobalPosition", "PAINTING_VARIANT": "PaintingVariant", "SNIFFER_STATE": "SnifferState",