diff --git a/MinecraftClient/ChatBots/AutoAttack.cs b/MinecraftClient/ChatBots/AutoAttack.cs index 8c60ff44..7085099a 100644 --- a/MinecraftClient/ChatBots/AutoAttack.cs +++ b/MinecraftClient/ChatBots/AutoAttack.cs @@ -103,11 +103,15 @@ namespace MinecraftClient.ChatBots } } } - // check entity distance and health again - if (shouldAttackEntity(entitiesToAttack[priorityEntity])) + + if (entitiesToAttack.ContainsKey(priorityEntity)) { - InteractEntity(priorityEntity, interactMode); // hit the entity! - SendAnimation(Inventory.Hand.MainHand); // Arm animation + // check entity distance and health again + if (shouldAttackEntity(entitiesToAttack[priorityEntity])) + { + InteractEntity(priorityEntity, interactMode); // hit the entity! + SendAnimation(Inventory.Hand.MainHand); // Arm animation + } } } else @@ -143,6 +147,22 @@ namespace MinecraftClient.ChatBots } } + public override void OnEntityHealth(Entity entity, float health) + { + if (!entity.Type.IsHostile()) + return; + + if (entitiesToAttack.ContainsKey(entity.ID)) + { + entitiesToAttack[entity.ID].Health = health; + + if (entitiesToAttack[entity.ID].Health <= 0) + { + entitiesToAttack.Remove(entity.ID); + } + } + } + public override void OnEntityMove(Entity entity) { shouldAttackEntity(entity); diff --git a/MinecraftClient/Commands/Move.cs b/MinecraftClient/Commands/Move.cs index 0af06344..6e9e7e2b 100644 --- a/MinecraftClient/Commands/Move.cs +++ b/MinecraftClient/Commands/Move.cs @@ -8,7 +8,7 @@ namespace MinecraftClient.Commands public class Move : Command { public override string CmdName { get { return "move"; } } - public override string CmdUsage { get { return "move [-f]"; } } + public override string CmdUsage { get { return "move [-f]"; } } public override string CmdDesc { get { return "walk or start walking. \"-f\": force unsafe movements like falling or touching fire"; } } public override string Run(McClient handler, string command, Dictionary localVars) @@ -17,7 +17,14 @@ namespace MinecraftClient.Commands bool takeRisk = false; if (args.Count < 1) - return GetCmdDescTranslated(); + { + string desc = GetCmdDescTranslated(); + + if (handler.GetTerrainEnabled()) + handler.Log.Info(getChunkLoadingStatus(handler.GetWorld())); + + return desc; + } if (args.Contains("-f")) { @@ -56,6 +63,11 @@ namespace MinecraftClient.Commands case "west": direction = Direction.West; break; case "north": direction = Direction.North; break; case "south": direction = Direction.South; break; + case "center": + Location current = handler.GetCurrentLocation(); + Location currentCenter = new Location(Math.Floor(current.X) + 0.5, current.Y, Math.Floor(current.Z) + 0.5); + handler.MoveTo(currentCenter, allowDirectTeleport: true); + return Translations.Get("cmd.move.walk", currentCenter, current); case "get": return handler.GetCurrentLocation().ToString(); default: return Translations.Get("cmd.look.unknown", args[0]); } @@ -76,8 +88,15 @@ namespace MinecraftClient.Commands int z = int.Parse(args[2]); Location goal = new Location(x, y, z); + if (handler.GetWorld().GetChunkColumn(goal) == null || handler.GetWorld().GetChunkColumn(goal).FullyLoaded == false) + return Translations.Get("cmd.move.chunk_not_loaded"); + + Location current = handler.GetCurrentLocation(); + Location currentCenter = new Location(Math.Floor(current.X) + 0.5, current.Y, Math.Floor(current.Z) + 0.5); + handler.MoveTo(currentCenter, allowDirectTeleport: true); + if (handler.MoveTo(goal, allowUnsafe: takeRisk)) - return Translations.Get("cmd.move.walk", goal); + return Translations.Get("cmd.move.walk", goal, current); else return takeRisk ? Translations.Get("cmd.move.fail", goal) : Translations.Get("cmd.move.suggestforce", goal); } catch (FormatException) { return GetCmdDescTranslated(); } @@ -86,5 +105,19 @@ namespace MinecraftClient.Commands } else return Translations.Get("extra.terrainandmovement_required"); } + + private string getChunkLoadingStatus(World world) + { + double chunkLoadedRatio; + if (world.chunkCnt == 0) + chunkLoadedRatio = 0; + else + chunkLoadedRatio = (world.chunkCnt - world.chunkLoadNotCompleted) / (double)world.chunkCnt; + + string status = Translations.Get("cmd.move.chunk_loading_status", + chunkLoadedRatio, world.chunkCnt - world.chunkLoadNotCompleted, world.chunkCnt); + + return status; + } } } diff --git a/MinecraftClient/Inventory/Container.cs b/MinecraftClient/Inventory/Container.cs index 85f3e9a8..b39892b6 100644 --- a/MinecraftClient/Inventory/Container.cs +++ b/MinecraftClient/Inventory/Container.cs @@ -25,6 +25,11 @@ namespace MinecraftClient.Inventory /// public string Title; + /// + /// state of container + /// + public int StateID; + /// /// Container Items /// diff --git a/MinecraftClient/Inventory/ItemPalettes/ItemPalette117.cs b/MinecraftClient/Inventory/ItemPalettes/ItemPalette117.cs new file mode 100644 index 00000000..e11312dd --- /dev/null +++ b/MinecraftClient/Inventory/ItemPalettes/ItemPalette117.cs @@ -0,0 +1,1119 @@ +using System; +using System.Collections.Generic; + +namespace MinecraftClient.Inventory.ItemPalettes +{ + public class ItemPalette117 : ItemPalette + { + private static Dictionary mappings = new Dictionary(); + + static ItemPalette117() + { + 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.DripstoneBlock; + mappings[14] = ItemType.GrassBlock; + mappings[15] = ItemType.Dirt; + mappings[16] = ItemType.CoarseDirt; + mappings[17] = ItemType.Podzol; + mappings[18] = ItemType.RootedDirt; + mappings[19] = ItemType.CrimsonNylium; + mappings[20] = ItemType.WarpedNylium; + mappings[21] = ItemType.Cobblestone; + mappings[22] = ItemType.OakPlanks; + mappings[23] = ItemType.SprucePlanks; + mappings[24] = ItemType.BirchPlanks; + mappings[25] = ItemType.JunglePlanks; + mappings[26] = ItemType.AcaciaPlanks; + mappings[27] = ItemType.DarkOakPlanks; + mappings[28] = ItemType.CrimsonPlanks; + mappings[29] = ItemType.WarpedPlanks; + mappings[30] = ItemType.OakSapling; + mappings[31] = ItemType.SpruceSapling; + mappings[32] = ItemType.BirchSapling; + mappings[33] = ItemType.JungleSapling; + mappings[34] = ItemType.AcaciaSapling; + mappings[35] = ItemType.DarkOakSapling; + mappings[36] = ItemType.Bedrock; + mappings[37] = ItemType.Sand; + mappings[38] = ItemType.RedSand; + mappings[39] = ItemType.Gravel; + mappings[40] = ItemType.CoalOre; + mappings[41] = ItemType.DeepslateCoalOre; + mappings[42] = ItemType.IronOre; + mappings[43] = ItemType.DeepslateIronOre; + mappings[44] = ItemType.CopperOre; + mappings[45] = ItemType.DeepslateCopperOre; + mappings[46] = ItemType.GoldOre; + mappings[47] = ItemType.DeepslateGoldOre; + mappings[48] = ItemType.RedstoneOre; + mappings[49] = ItemType.DeepslateRedstoneOre; + mappings[50] = ItemType.EmeraldOre; + mappings[51] = ItemType.DeepslateEmeraldOre; + mappings[52] = ItemType.LapisOre; + mappings[53] = ItemType.DeepslateLapisOre; + mappings[54] = ItemType.DiamondOre; + mappings[55] = ItemType.DeepslateDiamondOre; + mappings[56] = ItemType.NetherGoldOre; + mappings[57] = ItemType.NetherQuartzOre; + mappings[58] = ItemType.AncientDebris; + mappings[59] = ItemType.CoalBlock; + mappings[60] = ItemType.RawIronBlock; + mappings[61] = ItemType.RawCopperBlock; + mappings[62] = ItemType.RawGoldBlock; + mappings[63] = ItemType.AmethystBlock; + mappings[64] = ItemType.BuddingAmethyst; + mappings[65] = ItemType.IronBlock; + mappings[66] = ItemType.CopperBlock; + mappings[67] = ItemType.GoldBlock; + mappings[68] = ItemType.DiamondBlock; + mappings[69] = ItemType.NetheriteBlock; + mappings[70] = ItemType.ExposedCopper; + mappings[71] = ItemType.WeatheredCopper; + mappings[72] = ItemType.OxidizedCopper; + mappings[73] = ItemType.CutCopper; + mappings[74] = ItemType.ExposedCutCopper; + mappings[75] = ItemType.WeatheredCutCopper; + mappings[76] = ItemType.OxidizedCutCopper; + mappings[77] = ItemType.CutCopperStairs; + mappings[78] = ItemType.ExposedCutCopperStairs; + mappings[79] = ItemType.WeatheredCutCopperStairs; + mappings[80] = ItemType.OxidizedCutCopperStairs; + mappings[81] = ItemType.CutCopperSlab; + mappings[82] = ItemType.ExposedCutCopperSlab; + mappings[83] = ItemType.WeatheredCutCopperSlab; + mappings[84] = ItemType.OxidizedCutCopperSlab; + mappings[85] = ItemType.WaxedCopperBlock; + mappings[86] = ItemType.WaxedExposedCopper; + mappings[87] = ItemType.WaxedWeatheredCopper; + mappings[88] = ItemType.WaxedOxidizedCopper; + mappings[89] = ItemType.WaxedCutCopper; + mappings[90] = ItemType.WaxedExposedCutCopper; + mappings[91] = ItemType.WaxedWeatheredCutCopper; + mappings[92] = ItemType.WaxedOxidizedCutCopper; + mappings[93] = ItemType.WaxedCutCopperStairs; + mappings[94] = ItemType.WaxedExposedCutCopperStairs; + mappings[95] = ItemType.WaxedWeatheredCutCopperStairs; + mappings[96] = ItemType.WaxedOxidizedCutCopperStairs; + mappings[97] = ItemType.WaxedCutCopperSlab; + mappings[98] = ItemType.WaxedExposedCutCopperSlab; + mappings[99] = ItemType.WaxedWeatheredCutCopperSlab; + mappings[100] = ItemType.WaxedOxidizedCutCopperSlab; + mappings[101] = ItemType.OakLog; + mappings[102] = ItemType.SpruceLog; + mappings[103] = ItemType.BirchLog; + mappings[104] = ItemType.JungleLog; + mappings[105] = ItemType.AcaciaLog; + mappings[106] = ItemType.DarkOakLog; + mappings[107] = ItemType.CrimsonStem; + mappings[108] = ItemType.WarpedStem; + mappings[109] = ItemType.StrippedOakLog; + mappings[110] = ItemType.StrippedSpruceLog; + mappings[111] = ItemType.StrippedBirchLog; + mappings[112] = ItemType.StrippedJungleLog; + mappings[113] = ItemType.StrippedAcaciaLog; + mappings[114] = ItemType.StrippedDarkOakLog; + mappings[115] = ItemType.StrippedCrimsonStem; + mappings[116] = ItemType.StrippedWarpedStem; + mappings[117] = ItemType.StrippedOakWood; + mappings[118] = ItemType.StrippedSpruceWood; + mappings[119] = ItemType.StrippedBirchWood; + mappings[120] = ItemType.StrippedJungleWood; + mappings[121] = ItemType.StrippedAcaciaWood; + mappings[122] = ItemType.StrippedDarkOakWood; + mappings[123] = ItemType.StrippedCrimsonHyphae; + mappings[124] = ItemType.StrippedWarpedHyphae; + mappings[125] = ItemType.OakWood; + mappings[126] = ItemType.SpruceWood; + mappings[127] = ItemType.BirchWood; + mappings[128] = ItemType.JungleWood; + mappings[129] = ItemType.AcaciaWood; + mappings[130] = ItemType.DarkOakWood; + mappings[131] = ItemType.CrimsonHyphae; + mappings[132] = ItemType.WarpedHyphae; + mappings[133] = ItemType.OakLeaves; + mappings[134] = ItemType.SpruceLeaves; + mappings[135] = ItemType.BirchLeaves; + mappings[136] = ItemType.JungleLeaves; + mappings[137] = ItemType.AcaciaLeaves; + mappings[138] = ItemType.DarkOakLeaves; + mappings[139] = ItemType.AzaleaLeaves; + mappings[140] = ItemType.FloweringAzaleaLeaves; + mappings[141] = ItemType.Sponge; + mappings[142] = ItemType.WetSponge; + mappings[143] = ItemType.Glass; + mappings[144] = ItemType.TintedGlass; + mappings[145] = ItemType.LapisBlock; + mappings[146] = ItemType.Sandstone; + mappings[147] = ItemType.ChiseledSandstone; + mappings[148] = ItemType.CutSandstone; + mappings[149] = ItemType.Cobweb; + mappings[150] = ItemType.Grass; + mappings[151] = ItemType.Fern; + mappings[152] = ItemType.Azalea; + mappings[153] = ItemType.FloweringAzalea; + mappings[154] = ItemType.DeadBush; + mappings[155] = ItemType.Seagrass; + mappings[156] = ItemType.SeaPickle; + mappings[157] = ItemType.WhiteWool; + mappings[158] = ItemType.OrangeWool; + mappings[159] = ItemType.MagentaWool; + mappings[160] = ItemType.LightBlueWool; + mappings[161] = ItemType.YellowWool; + mappings[162] = ItemType.LimeWool; + mappings[163] = ItemType.PinkWool; + mappings[164] = ItemType.GrayWool; + mappings[165] = ItemType.LightGrayWool; + mappings[166] = ItemType.CyanWool; + mappings[167] = ItemType.PurpleWool; + mappings[168] = ItemType.BlueWool; + mappings[169] = ItemType.BrownWool; + mappings[170] = ItemType.GreenWool; + mappings[171] = ItemType.RedWool; + mappings[172] = ItemType.BlackWool; + mappings[173] = ItemType.Dandelion; + mappings[174] = ItemType.Poppy; + mappings[175] = ItemType.BlueOrchid; + mappings[176] = ItemType.Allium; + mappings[177] = ItemType.AzureBluet; + mappings[178] = ItemType.RedTulip; + mappings[179] = ItemType.OrangeTulip; + mappings[180] = ItemType.WhiteTulip; + mappings[181] = ItemType.PinkTulip; + mappings[182] = ItemType.OxeyeDaisy; + mappings[183] = ItemType.Cornflower; + mappings[184] = ItemType.LilyOfTheValley; + mappings[185] = ItemType.WitherRose; + mappings[186] = ItemType.SporeBlossom; + mappings[187] = ItemType.BrownMushroom; + mappings[188] = ItemType.RedMushroom; + mappings[189] = ItemType.CrimsonFungus; + mappings[190] = ItemType.WarpedFungus; + mappings[191] = ItemType.CrimsonRoots; + mappings[192] = ItemType.WarpedRoots; + mappings[193] = ItemType.NetherSprouts; + mappings[194] = ItemType.WeepingVines; + mappings[195] = ItemType.TwistingVines; + mappings[196] = ItemType.SugarCane; + mappings[197] = ItemType.Kelp; + mappings[198] = ItemType.MossCarpet; + mappings[199] = ItemType.MossBlock; + mappings[200] = ItemType.HangingRoots; + mappings[201] = ItemType.BigDripleaf; + mappings[202] = ItemType.SmallDripleaf; + mappings[203] = ItemType.Bamboo; + mappings[204] = ItemType.OakSlab; + mappings[205] = ItemType.SpruceSlab; + mappings[206] = ItemType.BirchSlab; + mappings[207] = ItemType.JungleSlab; + mappings[208] = ItemType.AcaciaSlab; + mappings[209] = ItemType.DarkOakSlab; + mappings[210] = ItemType.CrimsonSlab; + mappings[211] = ItemType.WarpedSlab; + mappings[212] = ItemType.StoneSlab; + mappings[213] = ItemType.SmoothStoneSlab; + mappings[214] = ItemType.SandstoneSlab; + mappings[215] = ItemType.CutSandstoneSlab; + mappings[216] = ItemType.PetrifiedOakSlab; + mappings[217] = ItemType.CobblestoneSlab; + mappings[218] = ItemType.BrickSlab; + mappings[219] = ItemType.StoneBrickSlab; + mappings[220] = ItemType.NetherBrickSlab; + mappings[221] = ItemType.QuartzSlab; + mappings[222] = ItemType.RedSandstoneSlab; + mappings[223] = ItemType.CutRedSandstoneSlab; + mappings[224] = ItemType.PurpurSlab; + mappings[225] = ItemType.PrismarineSlab; + mappings[226] = ItemType.PrismarineBrickSlab; + mappings[227] = ItemType.DarkPrismarineSlab; + mappings[228] = ItemType.SmoothQuartz; + mappings[229] = ItemType.SmoothRedSandstone; + mappings[230] = ItemType.SmoothSandstone; + mappings[231] = ItemType.SmoothStone; + mappings[232] = ItemType.Bricks; + mappings[233] = ItemType.Bookshelf; + mappings[234] = ItemType.MossyCobblestone; + mappings[235] = ItemType.Obsidian; + mappings[236] = ItemType.Torch; + mappings[237] = ItemType.EndRod; + mappings[238] = ItemType.ChorusPlant; + mappings[239] = ItemType.ChorusFlower; + mappings[240] = ItemType.PurpurBlock; + mappings[241] = ItemType.PurpurPillar; + mappings[242] = ItemType.PurpurStairs; + mappings[243] = ItemType.Spawner; + mappings[244] = ItemType.OakStairs; + mappings[245] = ItemType.Chest; + mappings[246] = ItemType.CraftingTable; + mappings[247] = ItemType.Farmland; + mappings[248] = ItemType.Furnace; + mappings[249] = ItemType.Ladder; + mappings[250] = ItemType.CobblestoneStairs; + mappings[251] = ItemType.Snow; + mappings[252] = ItemType.Ice; + mappings[253] = ItemType.SnowBlock; + mappings[254] = ItemType.Cactus; + mappings[255] = ItemType.Clay; + mappings[256] = ItemType.Jukebox; + mappings[257] = ItemType.OakFence; + mappings[258] = ItemType.SpruceFence; + mappings[259] = ItemType.BirchFence; + mappings[260] = ItemType.JungleFence; + mappings[261] = ItemType.AcaciaFence; + mappings[262] = ItemType.DarkOakFence; + mappings[263] = ItemType.CrimsonFence; + mappings[264] = ItemType.WarpedFence; + mappings[265] = ItemType.Pumpkin; + mappings[266] = ItemType.CarvedPumpkin; + mappings[267] = ItemType.JackOLantern; + mappings[268] = ItemType.Netherrack; + mappings[269] = ItemType.SoulSand; + mappings[270] = ItemType.SoulSoil; + mappings[271] = ItemType.Basalt; + mappings[272] = ItemType.PolishedBasalt; + mappings[273] = ItemType.SmoothBasalt; + mappings[274] = ItemType.SoulTorch; + mappings[275] = ItemType.Glowstone; + mappings[276] = ItemType.InfestedStone; + mappings[277] = ItemType.InfestedCobblestone; + mappings[278] = ItemType.InfestedStoneBricks; + mappings[279] = ItemType.InfestedMossyStoneBricks; + mappings[280] = ItemType.InfestedCrackedStoneBricks; + mappings[281] = ItemType.InfestedChiseledStoneBricks; + mappings[282] = ItemType.InfestedDeepslate; + mappings[283] = ItemType.StoneBricks; + mappings[284] = ItemType.MossyStoneBricks; + mappings[285] = ItemType.CrackedStoneBricks; + mappings[286] = ItemType.ChiseledStoneBricks; + mappings[287] = ItemType.DeepslateBricks; + mappings[288] = ItemType.CrackedDeepslateBricks; + mappings[289] = ItemType.DeepslateTiles; + mappings[290] = ItemType.CrackedDeepslateTiles; + mappings[291] = ItemType.ChiseledDeepslate; + mappings[292] = ItemType.BrownMushroomBlock; + mappings[293] = ItemType.RedMushroomBlock; + mappings[294] = ItemType.MushroomStem; + mappings[295] = ItemType.IronBars; + mappings[296] = ItemType.Chain; + mappings[297] = ItemType.GlassPane; + mappings[298] = ItemType.Melon; + mappings[299] = ItemType.Vine; + mappings[300] = ItemType.GlowLichen; + mappings[301] = ItemType.BrickStairs; + mappings[302] = ItemType.StoneBrickStairs; + mappings[303] = ItemType.Mycelium; + mappings[304] = ItemType.LilyPad; + mappings[305] = ItemType.NetherBricks; + mappings[306] = ItemType.CrackedNetherBricks; + mappings[307] = ItemType.ChiseledNetherBricks; + mappings[308] = ItemType.NetherBrickFence; + mappings[309] = ItemType.NetherBrickStairs; + mappings[310] = ItemType.EnchantingTable; + mappings[311] = ItemType.EndPortalFrame; + mappings[312] = ItemType.EndStone; + mappings[313] = ItemType.EndStoneBricks; + mappings[314] = ItemType.DragonEgg; + mappings[315] = ItemType.SandstoneStairs; + mappings[316] = ItemType.EnderChest; + mappings[317] = ItemType.EmeraldBlock; + mappings[318] = ItemType.SpruceStairs; + mappings[319] = ItemType.BirchStairs; + mappings[320] = ItemType.JungleStairs; + mappings[321] = ItemType.CrimsonStairs; + mappings[322] = ItemType.WarpedStairs; + mappings[323] = ItemType.CommandBlock; + mappings[324] = ItemType.Beacon; + mappings[325] = ItemType.CobblestoneWall; + mappings[326] = ItemType.MossyCobblestoneWall; + mappings[327] = ItemType.BrickWall; + mappings[328] = ItemType.PrismarineWall; + mappings[329] = ItemType.RedSandstoneWall; + mappings[330] = ItemType.MossyStoneBrickWall; + mappings[331] = ItemType.GraniteWall; + mappings[332] = ItemType.StoneBrickWall; + mappings[333] = ItemType.NetherBrickWall; + mappings[334] = ItemType.AndesiteWall; + mappings[335] = ItemType.RedNetherBrickWall; + mappings[336] = ItemType.SandstoneWall; + mappings[337] = ItemType.EndStoneBrickWall; + mappings[338] = ItemType.DioriteWall; + mappings[339] = ItemType.BlackstoneWall; + mappings[340] = ItemType.PolishedBlackstoneWall; + mappings[341] = ItemType.PolishedBlackstoneBrickWall; + mappings[342] = ItemType.CobbledDeepslateWall; + mappings[343] = ItemType.PolishedDeepslateWall; + mappings[344] = ItemType.DeepslateBrickWall; + mappings[345] = ItemType.DeepslateTileWall; + mappings[346] = ItemType.Anvil; + mappings[347] = ItemType.ChippedAnvil; + mappings[348] = ItemType.DamagedAnvil; + mappings[349] = ItemType.ChiseledQuartzBlock; + mappings[350] = ItemType.QuartzBlock; + mappings[351] = ItemType.QuartzBricks; + mappings[352] = ItemType.QuartzPillar; + mappings[353] = ItemType.QuartzStairs; + mappings[354] = ItemType.WhiteTerracotta; + mappings[355] = ItemType.OrangeTerracotta; + mappings[356] = ItemType.MagentaTerracotta; + mappings[357] = ItemType.LightBlueTerracotta; + mappings[358] = ItemType.YellowTerracotta; + mappings[359] = ItemType.LimeTerracotta; + mappings[360] = ItemType.PinkTerracotta; + mappings[361] = ItemType.GrayTerracotta; + mappings[362] = ItemType.LightGrayTerracotta; + mappings[363] = ItemType.CyanTerracotta; + mappings[364] = ItemType.PurpleTerracotta; + mappings[365] = ItemType.BlueTerracotta; + mappings[366] = ItemType.BrownTerracotta; + mappings[367] = ItemType.GreenTerracotta; + mappings[368] = ItemType.RedTerracotta; + mappings[369] = ItemType.BlackTerracotta; + mappings[370] = ItemType.Barrier; + mappings[371] = ItemType.Light; + mappings[372] = ItemType.HayBlock; + mappings[373] = ItemType.WhiteCarpet; + mappings[374] = ItemType.OrangeCarpet; + mappings[375] = ItemType.MagentaCarpet; + mappings[376] = ItemType.LightBlueCarpet; + mappings[377] = ItemType.YellowCarpet; + mappings[378] = ItemType.LimeCarpet; + mappings[379] = ItemType.PinkCarpet; + mappings[380] = ItemType.GrayCarpet; + mappings[381] = ItemType.LightGrayCarpet; + mappings[382] = ItemType.CyanCarpet; + mappings[383] = ItemType.PurpleCarpet; + mappings[384] = ItemType.BlueCarpet; + mappings[385] = ItemType.BrownCarpet; + mappings[386] = ItemType.GreenCarpet; + mappings[387] = ItemType.RedCarpet; + mappings[388] = ItemType.BlackCarpet; + mappings[389] = ItemType.Terracotta; + mappings[390] = ItemType.PackedIce; + mappings[391] = ItemType.AcaciaStairs; + mappings[392] = ItemType.DarkOakStairs; + mappings[393] = ItemType.GrassPath; + mappings[394] = ItemType.Sunflower; + mappings[395] = ItemType.Lilac; + mappings[396] = ItemType.RoseBush; + mappings[397] = ItemType.Peony; + mappings[398] = ItemType.TallGrass; + mappings[399] = ItemType.LargeFern; + mappings[400] = ItemType.WhiteStainedGlass; + mappings[401] = ItemType.OrangeStainedGlass; + mappings[402] = ItemType.MagentaStainedGlass; + mappings[403] = ItemType.LightBlueStainedGlass; + mappings[404] = ItemType.YellowStainedGlass; + mappings[405] = ItemType.LimeStainedGlass; + mappings[406] = ItemType.PinkStainedGlass; + mappings[407] = ItemType.GrayStainedGlass; + mappings[408] = ItemType.LightGrayStainedGlass; + mappings[409] = ItemType.CyanStainedGlass; + mappings[410] = ItemType.PurpleStainedGlass; + mappings[411] = ItemType.BlueStainedGlass; + mappings[412] = ItemType.BrownStainedGlass; + mappings[413] = ItemType.GreenStainedGlass; + mappings[414] = ItemType.RedStainedGlass; + mappings[415] = ItemType.BlackStainedGlass; + mappings[416] = ItemType.WhiteStainedGlassPane; + mappings[417] = ItemType.OrangeStainedGlassPane; + mappings[418] = ItemType.MagentaStainedGlassPane; + mappings[419] = ItemType.LightBlueStainedGlassPane; + mappings[420] = ItemType.YellowStainedGlassPane; + mappings[421] = ItemType.LimeStainedGlassPane; + mappings[422] = ItemType.PinkStainedGlassPane; + mappings[423] = ItemType.GrayStainedGlassPane; + mappings[424] = ItemType.LightGrayStainedGlassPane; + mappings[425] = ItemType.CyanStainedGlassPane; + mappings[426] = ItemType.PurpleStainedGlassPane; + mappings[427] = ItemType.BlueStainedGlassPane; + mappings[428] = ItemType.BrownStainedGlassPane; + mappings[429] = ItemType.GreenStainedGlassPane; + mappings[430] = ItemType.RedStainedGlassPane; + mappings[431] = ItemType.BlackStainedGlassPane; + mappings[432] = ItemType.Prismarine; + mappings[433] = ItemType.PrismarineBricks; + mappings[434] = ItemType.DarkPrismarine; + mappings[435] = ItemType.PrismarineStairs; + mappings[436] = ItemType.PrismarineBrickStairs; + mappings[437] = ItemType.DarkPrismarineStairs; + mappings[438] = ItemType.SeaLantern; + mappings[439] = ItemType.RedSandstone; + mappings[440] = ItemType.ChiseledRedSandstone; + mappings[441] = ItemType.CutRedSandstone; + mappings[442] = ItemType.RedSandstoneStairs; + mappings[443] = ItemType.RepeatingCommandBlock; + mappings[444] = ItemType.ChainCommandBlock; + mappings[445] = ItemType.MagmaBlock; + mappings[446] = ItemType.NetherWartBlock; + mappings[447] = ItemType.WarpedWartBlock; + mappings[448] = ItemType.RedNetherBricks; + mappings[449] = ItemType.BoneBlock; + mappings[450] = ItemType.StructureVoid; + mappings[451] = ItemType.ShulkerBox; + mappings[452] = ItemType.WhiteShulkerBox; + mappings[453] = ItemType.OrangeShulkerBox; + mappings[454] = ItemType.MagentaShulkerBox; + mappings[455] = ItemType.LightBlueShulkerBox; + mappings[456] = ItemType.YellowShulkerBox; + mappings[457] = ItemType.LimeShulkerBox; + mappings[458] = ItemType.PinkShulkerBox; + mappings[459] = ItemType.GrayShulkerBox; + mappings[460] = ItemType.LightGrayShulkerBox; + mappings[461] = ItemType.CyanShulkerBox; + mappings[462] = ItemType.PurpleShulkerBox; + mappings[463] = ItemType.BlueShulkerBox; + mappings[464] = ItemType.BrownShulkerBox; + mappings[465] = ItemType.GreenShulkerBox; + mappings[466] = ItemType.RedShulkerBox; + mappings[467] = ItemType.BlackShulkerBox; + mappings[468] = ItemType.WhiteGlazedTerracotta; + mappings[469] = ItemType.OrangeGlazedTerracotta; + mappings[470] = ItemType.MagentaGlazedTerracotta; + mappings[471] = ItemType.LightBlueGlazedTerracotta; + mappings[472] = ItemType.YellowGlazedTerracotta; + mappings[473] = ItemType.LimeGlazedTerracotta; + mappings[474] = ItemType.PinkGlazedTerracotta; + mappings[475] = ItemType.GrayGlazedTerracotta; + mappings[476] = ItemType.LightGrayGlazedTerracotta; + mappings[477] = ItemType.CyanGlazedTerracotta; + mappings[478] = ItemType.PurpleGlazedTerracotta; + mappings[479] = ItemType.BlueGlazedTerracotta; + mappings[480] = ItemType.BrownGlazedTerracotta; + mappings[481] = ItemType.GreenGlazedTerracotta; + mappings[482] = ItemType.RedGlazedTerracotta; + mappings[483] = ItemType.BlackGlazedTerracotta; + mappings[484] = ItemType.WhiteConcrete; + mappings[485] = ItemType.OrangeConcrete; + mappings[486] = ItemType.MagentaConcrete; + mappings[487] = ItemType.LightBlueConcrete; + mappings[488] = ItemType.YellowConcrete; + mappings[489] = ItemType.LimeConcrete; + mappings[490] = ItemType.PinkConcrete; + mappings[491] = ItemType.GrayConcrete; + mappings[492] = ItemType.LightGrayConcrete; + mappings[493] = ItemType.CyanConcrete; + mappings[494] = ItemType.PurpleConcrete; + mappings[495] = ItemType.BlueConcrete; + mappings[496] = ItemType.BrownConcrete; + mappings[497] = ItemType.GreenConcrete; + mappings[498] = ItemType.RedConcrete; + mappings[499] = ItemType.BlackConcrete; + mappings[500] = ItemType.WhiteConcretePowder; + mappings[501] = ItemType.OrangeConcretePowder; + mappings[502] = ItemType.MagentaConcretePowder; + mappings[503] = ItemType.LightBlueConcretePowder; + mappings[504] = ItemType.YellowConcretePowder; + mappings[505] = ItemType.LimeConcretePowder; + mappings[506] = ItemType.PinkConcretePowder; + mappings[507] = ItemType.GrayConcretePowder; + mappings[508] = ItemType.LightGrayConcretePowder; + mappings[509] = ItemType.CyanConcretePowder; + mappings[510] = ItemType.PurpleConcretePowder; + mappings[511] = ItemType.BlueConcretePowder; + mappings[512] = ItemType.BrownConcretePowder; + mappings[513] = ItemType.GreenConcretePowder; + mappings[514] = ItemType.RedConcretePowder; + mappings[515] = ItemType.BlackConcretePowder; + mappings[516] = ItemType.TurtleEgg; + mappings[517] = ItemType.DeadTubeCoralBlock; + mappings[518] = ItemType.DeadBrainCoralBlock; + mappings[519] = ItemType.DeadBubbleCoralBlock; + mappings[520] = ItemType.DeadFireCoralBlock; + mappings[521] = ItemType.DeadHornCoralBlock; + mappings[522] = ItemType.TubeCoralBlock; + mappings[523] = ItemType.BrainCoralBlock; + mappings[524] = ItemType.BubbleCoralBlock; + mappings[525] = ItemType.FireCoralBlock; + mappings[526] = ItemType.HornCoralBlock; + mappings[527] = ItemType.TubeCoral; + mappings[528] = ItemType.BrainCoral; + mappings[529] = ItemType.BubbleCoral; + mappings[530] = ItemType.FireCoral; + mappings[531] = ItemType.HornCoral; + mappings[532] = ItemType.DeadBrainCoral; + mappings[533] = ItemType.DeadBubbleCoral; + mappings[534] = ItemType.DeadFireCoral; + mappings[535] = ItemType.DeadHornCoral; + mappings[536] = ItemType.DeadTubeCoral; + mappings[537] = ItemType.TubeCoralFan; + mappings[538] = ItemType.BrainCoralFan; + mappings[539] = ItemType.BubbleCoralFan; + mappings[540] = ItemType.FireCoralFan; + mappings[541] = ItemType.HornCoralFan; + mappings[542] = ItemType.DeadTubeCoralFan; + mappings[543] = ItemType.DeadBrainCoralFan; + mappings[544] = ItemType.DeadBubbleCoralFan; + mappings[545] = ItemType.DeadFireCoralFan; + mappings[546] = ItemType.DeadHornCoralFan; + mappings[547] = ItemType.BlueIce; + mappings[548] = ItemType.Conduit; + mappings[549] = ItemType.PolishedGraniteStairs; + mappings[550] = ItemType.SmoothRedSandstoneStairs; + mappings[551] = ItemType.MossyStoneBrickStairs; + mappings[552] = ItemType.PolishedDioriteStairs; + mappings[553] = ItemType.MossyCobblestoneStairs; + mappings[554] = ItemType.EndStoneBrickStairs; + mappings[555] = ItemType.StoneStairs; + mappings[556] = ItemType.SmoothSandstoneStairs; + mappings[557] = ItemType.SmoothQuartzStairs; + mappings[558] = ItemType.GraniteStairs; + mappings[559] = ItemType.AndesiteStairs; + mappings[560] = ItemType.RedNetherBrickStairs; + mappings[561] = ItemType.PolishedAndesiteStairs; + mappings[562] = ItemType.DioriteStairs; + mappings[563] = ItemType.CobbledDeepslateStairs; + mappings[564] = ItemType.PolishedDeepslateStairs; + mappings[565] = ItemType.DeepslateBrickStairs; + mappings[566] = ItemType.DeepslateTileStairs; + mappings[567] = ItemType.PolishedGraniteSlab; + mappings[568] = ItemType.SmoothRedSandstoneSlab; + mappings[569] = ItemType.MossyStoneBrickSlab; + mappings[570] = ItemType.PolishedDioriteSlab; + mappings[571] = ItemType.MossyCobblestoneSlab; + mappings[572] = ItemType.EndStoneBrickSlab; + mappings[573] = ItemType.SmoothSandstoneSlab; + mappings[574] = ItemType.SmoothQuartzSlab; + mappings[575] = ItemType.GraniteSlab; + mappings[576] = ItemType.AndesiteSlab; + mappings[577] = ItemType.RedNetherBrickSlab; + mappings[578] = ItemType.PolishedAndesiteSlab; + mappings[579] = ItemType.DioriteSlab; + mappings[580] = ItemType.CobbledDeepslateSlab; + mappings[581] = ItemType.PolishedDeepslateSlab; + mappings[582] = ItemType.DeepslateBrickSlab; + mappings[583] = ItemType.DeepslateTileSlab; + mappings[584] = ItemType.Scaffolding; + mappings[585] = ItemType.Redstone; + mappings[586] = ItemType.RedstoneTorch; + mappings[587] = ItemType.RedstoneBlock; + mappings[588] = ItemType.Repeater; + mappings[589] = ItemType.Comparator; + mappings[590] = ItemType.Piston; + mappings[591] = ItemType.StickyPiston; + mappings[592] = ItemType.SlimeBlock; + mappings[593] = ItemType.HoneyBlock; + mappings[594] = ItemType.Observer; + mappings[595] = ItemType.Hopper; + mappings[596] = ItemType.Dispenser; + mappings[597] = ItemType.Dropper; + mappings[598] = ItemType.Lectern; + mappings[599] = ItemType.Target; + mappings[600] = ItemType.Lever; + mappings[601] = ItemType.LightningRod; + mappings[602] = ItemType.DaylightDetector; + mappings[603] = ItemType.SculkSensor; + mappings[604] = ItemType.TripwireHook; + mappings[605] = ItemType.TrappedChest; + mappings[606] = ItemType.Tnt; + mappings[607] = ItemType.RedstoneLamp; + mappings[608] = ItemType.NoteBlock; + mappings[609] = ItemType.StoneButton; + mappings[610] = ItemType.PolishedBlackstoneButton; + mappings[611] = ItemType.OakButton; + mappings[612] = ItemType.SpruceButton; + mappings[613] = ItemType.BirchButton; + mappings[614] = ItemType.JungleButton; + mappings[615] = ItemType.AcaciaButton; + mappings[616] = ItemType.DarkOakButton; + mappings[617] = ItemType.CrimsonButton; + mappings[618] = ItemType.WarpedButton; + mappings[619] = ItemType.StonePressurePlate; + mappings[620] = ItemType.PolishedBlackstonePressurePlate; + mappings[621] = ItemType.LightWeightedPressurePlate; + mappings[622] = ItemType.HeavyWeightedPressurePlate; + mappings[623] = ItemType.OakPressurePlate; + mappings[624] = ItemType.SprucePressurePlate; + mappings[625] = ItemType.BirchPressurePlate; + mappings[626] = ItemType.JunglePressurePlate; + mappings[627] = ItemType.AcaciaPressurePlate; + mappings[628] = ItemType.DarkOakPressurePlate; + mappings[629] = ItemType.CrimsonPressurePlate; + mappings[630] = ItemType.WarpedPressurePlate; + mappings[631] = ItemType.IronDoor; + mappings[632] = ItemType.OakDoor; + mappings[633] = ItemType.SpruceDoor; + mappings[634] = ItemType.BirchDoor; + mappings[635] = ItemType.JungleDoor; + mappings[636] = ItemType.AcaciaDoor; + mappings[637] = ItemType.DarkOakDoor; + mappings[638] = ItemType.CrimsonDoor; + mappings[639] = ItemType.WarpedDoor; + mappings[640] = ItemType.IronTrapdoor; + mappings[641] = ItemType.OakTrapdoor; + mappings[642] = ItemType.SpruceTrapdoor; + mappings[643] = ItemType.BirchTrapdoor; + mappings[644] = ItemType.JungleTrapdoor; + mappings[645] = ItemType.AcaciaTrapdoor; + mappings[646] = ItemType.DarkOakTrapdoor; + mappings[647] = ItemType.CrimsonTrapdoor; + mappings[648] = ItemType.WarpedTrapdoor; + mappings[649] = ItemType.OakFenceGate; + mappings[650] = ItemType.SpruceFenceGate; + mappings[651] = ItemType.BirchFenceGate; + mappings[652] = ItemType.JungleFenceGate; + mappings[653] = ItemType.AcaciaFenceGate; + mappings[654] = ItemType.DarkOakFenceGate; + mappings[655] = ItemType.CrimsonFenceGate; + mappings[656] = ItemType.WarpedFenceGate; + mappings[657] = ItemType.PoweredRail; + mappings[658] = ItemType.DetectorRail; + mappings[659] = ItemType.Rail; + mappings[660] = ItemType.ActivatorRail; + mappings[661] = ItemType.Saddle; + mappings[662] = ItemType.Minecart; + mappings[663] = ItemType.ChestMinecart; + mappings[664] = ItemType.FurnaceMinecart; + mappings[665] = ItemType.TntMinecart; + mappings[666] = ItemType.HopperMinecart; + mappings[667] = ItemType.CarrotOnAStick; + mappings[668] = ItemType.WarpedFungusOnAStick; + mappings[669] = ItemType.Elytra; + mappings[670] = ItemType.OakBoat; + mappings[671] = ItemType.SpruceBoat; + mappings[672] = ItemType.BirchBoat; + mappings[673] = ItemType.JungleBoat; + mappings[674] = ItemType.AcaciaBoat; + mappings[675] = ItemType.DarkOakBoat; + mappings[676] = ItemType.StructureBlock; + mappings[677] = ItemType.Jigsaw; + mappings[678] = ItemType.TurtleHelmet; + mappings[679] = ItemType.Scute; + mappings[680] = ItemType.FlintAndSteel; + mappings[681] = ItemType.Apple; + mappings[682] = ItemType.Bow; + mappings[683] = ItemType.Arrow; + mappings[684] = ItemType.Coal; + mappings[685] = ItemType.Charcoal; + mappings[686] = ItemType.Diamond; + mappings[687] = ItemType.Emerald; + mappings[688] = ItemType.LapisLazuli; + mappings[689] = ItemType.Quartz; + mappings[690] = ItemType.AmethystShard; + mappings[691] = ItemType.RawIron; + mappings[692] = ItemType.IronIngot; + mappings[693] = ItemType.RawCopper; + mappings[694] = ItemType.CopperIngot; + mappings[695] = ItemType.RawGold; + mappings[696] = ItemType.GoldIngot; + mappings[697] = ItemType.NetheriteIngot; + mappings[698] = ItemType.NetheriteScrap; + mappings[699] = ItemType.WoodenSword; + mappings[700] = ItemType.WoodenShovel; + mappings[701] = ItemType.WoodenPickaxe; + mappings[702] = ItemType.WoodenAxe; + mappings[703] = ItemType.WoodenHoe; + mappings[704] = ItemType.StoneSword; + mappings[705] = ItemType.StoneShovel; + mappings[706] = ItemType.StonePickaxe; + mappings[707] = ItemType.StoneAxe; + mappings[708] = ItemType.StoneHoe; + mappings[709] = ItemType.GoldenSword; + mappings[710] = ItemType.GoldenShovel; + mappings[711] = ItemType.GoldenPickaxe; + mappings[712] = ItemType.GoldenAxe; + mappings[713] = ItemType.GoldenHoe; + mappings[714] = ItemType.IronSword; + mappings[715] = ItemType.IronShovel; + mappings[716] = ItemType.IronPickaxe; + mappings[717] = ItemType.IronAxe; + mappings[718] = ItemType.IronHoe; + mappings[719] = ItemType.DiamondSword; + mappings[720] = ItemType.DiamondShovel; + mappings[721] = ItemType.DiamondPickaxe; + mappings[722] = ItemType.DiamondAxe; + mappings[723] = ItemType.DiamondHoe; + mappings[724] = ItemType.NetheriteSword; + mappings[725] = ItemType.NetheriteShovel; + mappings[726] = ItemType.NetheritePickaxe; + mappings[727] = ItemType.NetheriteAxe; + mappings[728] = ItemType.NetheriteHoe; + mappings[729] = ItemType.Stick; + mappings[730] = ItemType.Bowl; + mappings[731] = ItemType.MushroomStew; + mappings[732] = ItemType.String; + mappings[733] = ItemType.Feather; + mappings[734] = ItemType.Gunpowder; + mappings[735] = ItemType.WheatSeeds; + mappings[736] = ItemType.Wheat; + mappings[737] = ItemType.Bread; + mappings[738] = ItemType.LeatherHelmet; + mappings[739] = ItemType.LeatherChestplate; + mappings[740] = ItemType.LeatherLeggings; + mappings[741] = ItemType.LeatherBoots; + mappings[742] = ItemType.ChainmailHelmet; + mappings[743] = ItemType.ChainmailChestplate; + mappings[744] = ItemType.ChainmailLeggings; + mappings[745] = ItemType.ChainmailBoots; + mappings[746] = ItemType.IronHelmet; + mappings[747] = ItemType.IronChestplate; + mappings[748] = ItemType.IronLeggings; + mappings[749] = ItemType.IronBoots; + mappings[750] = ItemType.DiamondHelmet; + mappings[751] = ItemType.DiamondChestplate; + mappings[752] = ItemType.DiamondLeggings; + mappings[753] = ItemType.DiamondBoots; + mappings[754] = ItemType.GoldenHelmet; + mappings[755] = ItemType.GoldenChestplate; + mappings[756] = ItemType.GoldenLeggings; + mappings[757] = ItemType.GoldenBoots; + mappings[758] = ItemType.NetheriteHelmet; + mappings[759] = ItemType.NetheriteChestplate; + mappings[760] = ItemType.NetheriteLeggings; + mappings[761] = ItemType.NetheriteBoots; + mappings[762] = ItemType.Flint; + mappings[763] = ItemType.Porkchop; + mappings[764] = ItemType.CookedPorkchop; + mappings[765] = ItemType.Painting; + mappings[766] = ItemType.GoldenApple; + mappings[767] = ItemType.EnchantedGoldenApple; + mappings[768] = ItemType.OakSign; + mappings[769] = ItemType.SpruceSign; + mappings[770] = ItemType.BirchSign; + mappings[771] = ItemType.JungleSign; + mappings[772] = ItemType.AcaciaSign; + mappings[773] = ItemType.DarkOakSign; + mappings[774] = ItemType.CrimsonSign; + mappings[775] = ItemType.WarpedSign; + mappings[776] = ItemType.Bucket; + mappings[777] = ItemType.WaterBucket; + mappings[778] = ItemType.LavaBucket; + mappings[779] = ItemType.PowderSnowBucket; + mappings[780] = ItemType.Snowball; + mappings[781] = ItemType.Leather; + mappings[782] = ItemType.MilkBucket; + mappings[783] = ItemType.PufferfishBucket; + mappings[784] = ItemType.SalmonBucket; + mappings[785] = ItemType.CodBucket; + mappings[786] = ItemType.TropicalFishBucket; + mappings[787] = ItemType.AxolotlBucket; + mappings[788] = ItemType.Brick; + mappings[789] = ItemType.ClayBall; + mappings[790] = ItemType.DriedKelpBlock; + mappings[791] = ItemType.Paper; + mappings[792] = ItemType.Book; + mappings[793] = ItemType.SlimeBall; + mappings[794] = ItemType.Egg; + mappings[795] = ItemType.Compass; + mappings[796] = ItemType.Bundle; + mappings[797] = ItemType.FishingRod; + mappings[798] = ItemType.Clock; + mappings[799] = ItemType.Spyglass; + mappings[800] = ItemType.GlowstoneDust; + mappings[801] = ItemType.Cod; + mappings[802] = ItemType.Salmon; + mappings[803] = ItemType.TropicalFish; + mappings[804] = ItemType.Pufferfish; + mappings[805] = ItemType.CookedCod; + mappings[806] = ItemType.CookedSalmon; + mappings[807] = ItemType.InkSac; + mappings[808] = ItemType.GlowInkSac; + mappings[809] = ItemType.CocoaBeans; + mappings[810] = ItemType.WhiteDye; + mappings[811] = ItemType.OrangeDye; + mappings[812] = ItemType.MagentaDye; + mappings[813] = ItemType.LightBlueDye; + mappings[814] = ItemType.YellowDye; + mappings[815] = ItemType.LimeDye; + mappings[816] = ItemType.PinkDye; + mappings[817] = ItemType.GrayDye; + mappings[818] = ItemType.LightGrayDye; + mappings[819] = ItemType.CyanDye; + mappings[820] = ItemType.PurpleDye; + mappings[821] = ItemType.BlueDye; + mappings[822] = ItemType.BrownDye; + mappings[823] = ItemType.GreenDye; + mappings[824] = ItemType.RedDye; + mappings[825] = ItemType.BlackDye; + mappings[826] = ItemType.BoneMeal; + mappings[827] = ItemType.Bone; + mappings[828] = ItemType.Sugar; + mappings[829] = ItemType.Cake; + mappings[830] = ItemType.WhiteBed; + mappings[831] = ItemType.OrangeBed; + mappings[832] = ItemType.MagentaBed; + mappings[833] = ItemType.LightBlueBed; + mappings[834] = ItemType.YellowBed; + mappings[835] = ItemType.LimeBed; + mappings[836] = ItemType.PinkBed; + mappings[837] = ItemType.GrayBed; + mappings[838] = ItemType.LightGrayBed; + mappings[839] = ItemType.CyanBed; + mappings[840] = ItemType.PurpleBed; + mappings[841] = ItemType.BlueBed; + mappings[842] = ItemType.BrownBed; + mappings[843] = ItemType.GreenBed; + mappings[844] = ItemType.RedBed; + mappings[845] = ItemType.BlackBed; + mappings[846] = ItemType.Cookie; + mappings[847] = ItemType.FilledMap; + mappings[848] = ItemType.Shears; + mappings[849] = ItemType.MelonSlice; + mappings[850] = ItemType.DriedKelp; + mappings[851] = ItemType.PumpkinSeeds; + mappings[852] = ItemType.MelonSeeds; + mappings[853] = ItemType.Beef; + mappings[854] = ItemType.CookedBeef; + mappings[855] = ItemType.Chicken; + mappings[856] = ItemType.CookedChicken; + mappings[857] = ItemType.RottenFlesh; + mappings[858] = ItemType.EnderPearl; + mappings[859] = ItemType.BlazeRod; + mappings[860] = ItemType.GhastTear; + mappings[861] = ItemType.GoldNugget; + mappings[862] = ItemType.NetherWart; + mappings[863] = ItemType.Potion; + mappings[864] = ItemType.GlassBottle; + mappings[865] = ItemType.SpiderEye; + mappings[866] = ItemType.FermentedSpiderEye; + mappings[867] = ItemType.BlazePowder; + mappings[868] = ItemType.MagmaCream; + mappings[869] = ItemType.BrewingStand; + mappings[870] = ItemType.Cauldron; + mappings[871] = ItemType.EnderEye; + mappings[872] = ItemType.GlisteringMelonSlice; + mappings[873] = ItemType.AxolotlSpawnEgg; + mappings[874] = ItemType.BatSpawnEgg; + mappings[875] = ItemType.BeeSpawnEgg; + mappings[876] = ItemType.BlazeSpawnEgg; + mappings[877] = ItemType.CatSpawnEgg; + mappings[878] = ItemType.CaveSpiderSpawnEgg; + mappings[879] = ItemType.ChickenSpawnEgg; + mappings[880] = ItemType.CodSpawnEgg; + mappings[881] = ItemType.CowSpawnEgg; + mappings[882] = ItemType.CreeperSpawnEgg; + mappings[883] = ItemType.DolphinSpawnEgg; + mappings[884] = ItemType.DonkeySpawnEgg; + mappings[885] = ItemType.DrownedSpawnEgg; + mappings[886] = ItemType.ElderGuardianSpawnEgg; + mappings[887] = ItemType.EndermanSpawnEgg; + mappings[888] = ItemType.EndermiteSpawnEgg; + mappings[889] = ItemType.EvokerSpawnEgg; + mappings[890] = ItemType.FoxSpawnEgg; + mappings[891] = ItemType.GhastSpawnEgg; + mappings[892] = ItemType.GlowSquidSpawnEgg; + mappings[893] = ItemType.GoatSpawnEgg; + mappings[894] = ItemType.GuardianSpawnEgg; + mappings[895] = ItemType.HoglinSpawnEgg; + mappings[896] = ItemType.HorseSpawnEgg; + mappings[897] = ItemType.HuskSpawnEgg; + mappings[898] = ItemType.LlamaSpawnEgg; + mappings[899] = ItemType.MagmaCubeSpawnEgg; + mappings[900] = ItemType.MooshroomSpawnEgg; + mappings[901] = ItemType.MuleSpawnEgg; + mappings[902] = ItemType.OcelotSpawnEgg; + mappings[903] = ItemType.PandaSpawnEgg; + mappings[904] = ItemType.ParrotSpawnEgg; + mappings[905] = ItemType.PhantomSpawnEgg; + mappings[906] = ItemType.PigSpawnEgg; + mappings[907] = ItemType.PiglinSpawnEgg; + mappings[908] = ItemType.PiglinBruteSpawnEgg; + mappings[909] = ItemType.PillagerSpawnEgg; + mappings[910] = ItemType.PolarBearSpawnEgg; + mappings[911] = ItemType.PufferfishSpawnEgg; + mappings[912] = ItemType.RabbitSpawnEgg; + mappings[913] = ItemType.RavagerSpawnEgg; + mappings[914] = ItemType.SalmonSpawnEgg; + mappings[915] = ItemType.SheepSpawnEgg; + mappings[916] = ItemType.ShulkerSpawnEgg; + mappings[917] = ItemType.SilverfishSpawnEgg; + mappings[918] = ItemType.SkeletonSpawnEgg; + mappings[919] = ItemType.SkeletonHorseSpawnEgg; + mappings[920] = ItemType.SlimeSpawnEgg; + mappings[921] = ItemType.SpiderSpawnEgg; + mappings[922] = ItemType.SquidSpawnEgg; + mappings[923] = ItemType.StraySpawnEgg; + mappings[924] = ItemType.StriderSpawnEgg; + mappings[925] = ItemType.TraderLlamaSpawnEgg; + mappings[926] = ItemType.TropicalFishSpawnEgg; + mappings[927] = ItemType.TurtleSpawnEgg; + mappings[928] = ItemType.VexSpawnEgg; + mappings[929] = ItemType.VillagerSpawnEgg; + mappings[930] = ItemType.VindicatorSpawnEgg; + mappings[931] = ItemType.WanderingTraderSpawnEgg; + mappings[932] = ItemType.WitchSpawnEgg; + mappings[933] = ItemType.WitherSkeletonSpawnEgg; + mappings[934] = ItemType.WolfSpawnEgg; + mappings[935] = ItemType.ZoglinSpawnEgg; + mappings[936] = ItemType.ZombieSpawnEgg; + mappings[937] = ItemType.ZombieHorseSpawnEgg; + mappings[938] = ItemType.ZombieVillagerSpawnEgg; + mappings[939] = ItemType.ZombifiedPiglinSpawnEgg; + mappings[940] = ItemType.ExperienceBottle; + mappings[941] = ItemType.FireCharge; + mappings[942] = ItemType.WritableBook; + mappings[943] = ItemType.WrittenBook; + mappings[944] = ItemType.ItemFrame; + mappings[945] = ItemType.GlowItemFrame; + mappings[946] = ItemType.FlowerPot; + mappings[947] = ItemType.Carrot; + mappings[948] = ItemType.Potato; + mappings[949] = ItemType.BakedPotato; + mappings[950] = ItemType.PoisonousPotato; + mappings[951] = ItemType.Map; + mappings[952] = ItemType.GoldenCarrot; + mappings[953] = ItemType.SkeletonSkull; + mappings[954] = ItemType.WitherSkeletonSkull; + mappings[955] = ItemType.PlayerHead; + mappings[956] = ItemType.ZombieHead; + mappings[957] = ItemType.CreeperHead; + mappings[958] = ItemType.DragonHead; + mappings[959] = ItemType.NetherStar; + mappings[960] = ItemType.PumpkinPie; + mappings[961] = ItemType.FireworkRocket; + mappings[962] = ItemType.FireworkStar; + mappings[963] = ItemType.EnchantedBook; + mappings[964] = ItemType.NetherBrick; + mappings[965] = ItemType.PrismarineShard; + mappings[966] = ItemType.PrismarineCrystals; + mappings[967] = ItemType.Rabbit; + mappings[968] = ItemType.CookedRabbit; + mappings[969] = ItemType.RabbitStew; + mappings[970] = ItemType.RabbitFoot; + mappings[971] = ItemType.RabbitHide; + mappings[972] = ItemType.ArmorStand; + mappings[973] = ItemType.IronHorseArmor; + mappings[974] = ItemType.GoldenHorseArmor; + mappings[975] = ItemType.DiamondHorseArmor; + mappings[976] = ItemType.LeatherHorseArmor; + mappings[977] = ItemType.Lead; + mappings[978] = ItemType.NameTag; + mappings[979] = ItemType.CommandBlockMinecart; + mappings[980] = ItemType.Mutton; + mappings[981] = ItemType.CookedMutton; + mappings[982] = ItemType.WhiteBanner; + mappings[983] = ItemType.OrangeBanner; + mappings[984] = ItemType.MagentaBanner; + mappings[985] = ItemType.LightBlueBanner; + mappings[986] = ItemType.YellowBanner; + mappings[987] = ItemType.LimeBanner; + mappings[988] = ItemType.PinkBanner; + mappings[989] = ItemType.GrayBanner; + mappings[990] = ItemType.LightGrayBanner; + mappings[991] = ItemType.CyanBanner; + mappings[992] = ItemType.PurpleBanner; + mappings[993] = ItemType.BlueBanner; + mappings[994] = ItemType.BrownBanner; + mappings[995] = ItemType.GreenBanner; + mappings[996] = ItemType.RedBanner; + mappings[997] = ItemType.BlackBanner; + mappings[998] = ItemType.EndCrystal; + mappings[999] = ItemType.ChorusFruit; + mappings[1000] = ItemType.PoppedChorusFruit; + mappings[1001] = ItemType.Beetroot; + mappings[1002] = ItemType.BeetrootSeeds; + mappings[1003] = ItemType.BeetrootSoup; + mappings[1004] = ItemType.DragonBreath; + mappings[1005] = ItemType.SplashPotion; + mappings[1006] = ItemType.SpectralArrow; + mappings[1007] = ItemType.TippedArrow; + mappings[1008] = ItemType.LingeringPotion; + mappings[1009] = ItemType.Shield; + mappings[1010] = ItemType.TotemOfUndying; + mappings[1011] = ItemType.ShulkerShell; + mappings[1012] = ItemType.IronNugget; + mappings[1013] = ItemType.KnowledgeBook; + mappings[1014] = ItemType.DebugStick; + mappings[1015] = ItemType.MusicDisc13; + mappings[1016] = ItemType.MusicDiscCat; + mappings[1017] = ItemType.MusicDiscBlocks; + mappings[1018] = ItemType.MusicDiscChirp; + mappings[1019] = ItemType.MusicDiscFar; + mappings[1020] = ItemType.MusicDiscMall; + mappings[1021] = ItemType.MusicDiscMellohi; + mappings[1022] = ItemType.MusicDiscStal; + mappings[1023] = ItemType.MusicDiscStrad; + mappings[1024] = ItemType.MusicDiscWard; + mappings[1025] = ItemType.MusicDisc11; + mappings[1026] = ItemType.MusicDiscWait; + mappings[1027] = ItemType.MusicDiscPigstep; + mappings[1028] = ItemType.Trident; + mappings[1029] = ItemType.PhantomMembrane; + mappings[1030] = ItemType.NautilusShell; + mappings[1031] = ItemType.HeartOfTheSea; + mappings[1032] = ItemType.Crossbow; + mappings[1033] = ItemType.SuspiciousStew; + mappings[1034] = ItemType.Loom; + mappings[1035] = ItemType.FlowerBannerPattern; + mappings[1036] = ItemType.CreeperBannerPattern; + mappings[1037] = ItemType.SkullBannerPattern; + mappings[1038] = ItemType.MojangBannerPattern; + mappings[1039] = ItemType.GlobeBannerPattern; + mappings[1040] = ItemType.PiglinBannerPattern; + mappings[1041] = ItemType.Composter; + mappings[1042] = ItemType.Barrel; + mappings[1043] = ItemType.Smoker; + mappings[1044] = ItemType.BlastFurnace; + mappings[1045] = ItemType.CartographyTable; + mappings[1046] = ItemType.FletchingTable; + mappings[1047] = ItemType.Grindstone; + mappings[1048] = ItemType.SmithingTable; + mappings[1049] = ItemType.Stonecutter; + mappings[1050] = ItemType.Bell; + mappings[1051] = ItemType.Lantern; + mappings[1052] = ItemType.SoulLantern; + mappings[1053] = ItemType.SweetBerries; + mappings[1054] = ItemType.GlowBerries; + mappings[1055] = ItemType.Campfire; + mappings[1056] = ItemType.SoulCampfire; + mappings[1057] = ItemType.Shroomlight; + mappings[1058] = ItemType.Honeycomb; + mappings[1059] = ItemType.BeeNest; + mappings[1060] = ItemType.Beehive; + mappings[1061] = ItemType.HoneyBottle; + mappings[1062] = ItemType.HoneycombBlock; + mappings[1063] = ItemType.Lodestone; + mappings[1064] = ItemType.CryingObsidian; + mappings[1065] = ItemType.Blackstone; + mappings[1066] = ItemType.BlackstoneSlab; + mappings[1067] = ItemType.BlackstoneStairs; + mappings[1068] = ItemType.GildedBlackstone; + mappings[1069] = ItemType.PolishedBlackstone; + mappings[1070] = ItemType.PolishedBlackstoneSlab; + mappings[1071] = ItemType.PolishedBlackstoneStairs; + mappings[1072] = ItemType.ChiseledPolishedBlackstone; + mappings[1073] = ItemType.PolishedBlackstoneBricks; + mappings[1074] = ItemType.PolishedBlackstoneBrickSlab; + mappings[1075] = ItemType.PolishedBlackstoneBrickStairs; + mappings[1076] = ItemType.CrackedPolishedBlackstoneBricks; + mappings[1077] = ItemType.RespawnAnchor; + mappings[1078] = ItemType.Candle; + mappings[1079] = ItemType.WhiteCandle; + mappings[1080] = ItemType.OrangeCandle; + mappings[1081] = ItemType.MagentaCandle; + mappings[1082] = ItemType.LightBlueCandle; + mappings[1083] = ItemType.YellowCandle; + mappings[1084] = ItemType.LimeCandle; + mappings[1085] = ItemType.PinkCandle; + mappings[1086] = ItemType.GrayCandle; + mappings[1087] = ItemType.LightGrayCandle; + mappings[1088] = ItemType.CyanCandle; + mappings[1089] = ItemType.PurpleCandle; + mappings[1090] = ItemType.BlueCandle; + mappings[1091] = ItemType.BrownCandle; + mappings[1092] = ItemType.GreenCandle; + mappings[1093] = ItemType.RedCandle; + mappings[1094] = ItemType.BlackCandle; + mappings[1095] = ItemType.SmallAmethystBud; + mappings[1096] = ItemType.MediumAmethystBud; + mappings[1097] = ItemType.LargeAmethystBud; + mappings[1098] = ItemType.AmethystCluster; + mappings[1099] = ItemType.PointedDripstone; + } + + protected override Dictionary GetDict() + { + return mappings; + } + } +} diff --git a/MinecraftClient/Inventory/ItemPalettes/ItemPalette118.cs b/MinecraftClient/Inventory/ItemPalettes/ItemPalette118.cs new file mode 100644 index 00000000..0e4577eb --- /dev/null +++ b/MinecraftClient/Inventory/ItemPalettes/ItemPalette118.cs @@ -0,0 +1,1120 @@ +using System; +using System.Collections.Generic; + +namespace MinecraftClient.Inventory.ItemPalettes +{ + public class ItemPalette118 : ItemPalette + { + private static Dictionary mappings = new Dictionary(); + + static ItemPalette118() + { + 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.DripstoneBlock; + mappings[14] = ItemType.GrassBlock; + mappings[15] = ItemType.Dirt; + mappings[16] = ItemType.CoarseDirt; + mappings[17] = ItemType.Podzol; + mappings[18] = ItemType.RootedDirt; + mappings[19] = ItemType.CrimsonNylium; + mappings[20] = ItemType.WarpedNylium; + mappings[21] = ItemType.Cobblestone; + mappings[22] = ItemType.OakPlanks; + mappings[23] = ItemType.SprucePlanks; + mappings[24] = ItemType.BirchPlanks; + mappings[25] = ItemType.JunglePlanks; + mappings[26] = ItemType.AcaciaPlanks; + mappings[27] = ItemType.DarkOakPlanks; + mappings[28] = ItemType.CrimsonPlanks; + mappings[29] = ItemType.WarpedPlanks; + mappings[30] = ItemType.OakSapling; + mappings[31] = ItemType.SpruceSapling; + mappings[32] = ItemType.BirchSapling; + mappings[33] = ItemType.JungleSapling; + mappings[34] = ItemType.AcaciaSapling; + mappings[35] = ItemType.DarkOakSapling; + mappings[36] = ItemType.Bedrock; + mappings[37] = ItemType.Sand; + mappings[38] = ItemType.RedSand; + mappings[39] = ItemType.Gravel; + mappings[40] = ItemType.CoalOre; + mappings[41] = ItemType.DeepslateCoalOre; + mappings[42] = ItemType.IronOre; + mappings[43] = ItemType.DeepslateIronOre; + mappings[44] = ItemType.CopperOre; + mappings[45] = ItemType.DeepslateCopperOre; + mappings[46] = ItemType.GoldOre; + mappings[47] = ItemType.DeepslateGoldOre; + mappings[48] = ItemType.RedstoneOre; + mappings[49] = ItemType.DeepslateRedstoneOre; + mappings[50] = ItemType.EmeraldOre; + mappings[51] = ItemType.DeepslateEmeraldOre; + mappings[52] = ItemType.LapisOre; + mappings[53] = ItemType.DeepslateLapisOre; + mappings[54] = ItemType.DiamondOre; + mappings[55] = ItemType.DeepslateDiamondOre; + mappings[56] = ItemType.NetherGoldOre; + mappings[57] = ItemType.NetherQuartzOre; + mappings[58] = ItemType.AncientDebris; + mappings[59] = ItemType.CoalBlock; + mappings[60] = ItemType.RawIronBlock; + mappings[61] = ItemType.RawCopperBlock; + mappings[62] = ItemType.RawGoldBlock; + mappings[63] = ItemType.AmethystBlock; + mappings[64] = ItemType.BuddingAmethyst; + mappings[65] = ItemType.IronBlock; + mappings[66] = ItemType.CopperBlock; + mappings[67] = ItemType.GoldBlock; + mappings[68] = ItemType.DiamondBlock; + mappings[69] = ItemType.NetheriteBlock; + mappings[70] = ItemType.ExposedCopper; + mappings[71] = ItemType.WeatheredCopper; + mappings[72] = ItemType.OxidizedCopper; + mappings[73] = ItemType.CutCopper; + mappings[74] = ItemType.ExposedCutCopper; + mappings[75] = ItemType.WeatheredCutCopper; + mappings[76] = ItemType.OxidizedCutCopper; + mappings[77] = ItemType.CutCopperStairs; + mappings[78] = ItemType.ExposedCutCopperStairs; + mappings[79] = ItemType.WeatheredCutCopperStairs; + mappings[80] = ItemType.OxidizedCutCopperStairs; + mappings[81] = ItemType.CutCopperSlab; + mappings[82] = ItemType.ExposedCutCopperSlab; + mappings[83] = ItemType.WeatheredCutCopperSlab; + mappings[84] = ItemType.OxidizedCutCopperSlab; + mappings[85] = ItemType.WaxedCopperBlock; + mappings[86] = ItemType.WaxedExposedCopper; + mappings[87] = ItemType.WaxedWeatheredCopper; + mappings[88] = ItemType.WaxedOxidizedCopper; + mappings[89] = ItemType.WaxedCutCopper; + mappings[90] = ItemType.WaxedExposedCutCopper; + mappings[91] = ItemType.WaxedWeatheredCutCopper; + mappings[92] = ItemType.WaxedOxidizedCutCopper; + mappings[93] = ItemType.WaxedCutCopperStairs; + mappings[94] = ItemType.WaxedExposedCutCopperStairs; + mappings[95] = ItemType.WaxedWeatheredCutCopperStairs; + mappings[96] = ItemType.WaxedOxidizedCutCopperStairs; + mappings[97] = ItemType.WaxedCutCopperSlab; + mappings[98] = ItemType.WaxedExposedCutCopperSlab; + mappings[99] = ItemType.WaxedWeatheredCutCopperSlab; + mappings[100] = ItemType.WaxedOxidizedCutCopperSlab; + mappings[101] = ItemType.OakLog; + mappings[102] = ItemType.SpruceLog; + mappings[103] = ItemType.BirchLog; + mappings[104] = ItemType.JungleLog; + mappings[105] = ItemType.AcaciaLog; + mappings[106] = ItemType.DarkOakLog; + mappings[107] = ItemType.CrimsonStem; + mappings[108] = ItemType.WarpedStem; + mappings[109] = ItemType.StrippedOakLog; + mappings[110] = ItemType.StrippedSpruceLog; + mappings[111] = ItemType.StrippedBirchLog; + mappings[112] = ItemType.StrippedJungleLog; + mappings[113] = ItemType.StrippedAcaciaLog; + mappings[114] = ItemType.StrippedDarkOakLog; + mappings[115] = ItemType.StrippedCrimsonStem; + mappings[116] = ItemType.StrippedWarpedStem; + mappings[117] = ItemType.StrippedOakWood; + mappings[118] = ItemType.StrippedSpruceWood; + mappings[119] = ItemType.StrippedBirchWood; + mappings[120] = ItemType.StrippedJungleWood; + mappings[121] = ItemType.StrippedAcaciaWood; + mappings[122] = ItemType.StrippedDarkOakWood; + mappings[123] = ItemType.StrippedCrimsonHyphae; + mappings[124] = ItemType.StrippedWarpedHyphae; + mappings[125] = ItemType.OakWood; + mappings[126] = ItemType.SpruceWood; + mappings[127] = ItemType.BirchWood; + mappings[128] = ItemType.JungleWood; + mappings[129] = ItemType.AcaciaWood; + mappings[130] = ItemType.DarkOakWood; + mappings[131] = ItemType.CrimsonHyphae; + mappings[132] = ItemType.WarpedHyphae; + mappings[133] = ItemType.OakLeaves; + mappings[134] = ItemType.SpruceLeaves; + mappings[135] = ItemType.BirchLeaves; + mappings[136] = ItemType.JungleLeaves; + mappings[137] = ItemType.AcaciaLeaves; + mappings[138] = ItemType.DarkOakLeaves; + mappings[139] = ItemType.AzaleaLeaves; + mappings[140] = ItemType.FloweringAzaleaLeaves; + mappings[141] = ItemType.Sponge; + mappings[142] = ItemType.WetSponge; + mappings[143] = ItemType.Glass; + mappings[144] = ItemType.TintedGlass; + mappings[145] = ItemType.LapisBlock; + mappings[146] = ItemType.Sandstone; + mappings[147] = ItemType.ChiseledSandstone; + mappings[148] = ItemType.CutSandstone; + mappings[149] = ItemType.Cobweb; + mappings[150] = ItemType.Grass; + mappings[151] = ItemType.Fern; + mappings[152] = ItemType.Azalea; + mappings[153] = ItemType.FloweringAzalea; + mappings[154] = ItemType.DeadBush; + mappings[155] = ItemType.Seagrass; + mappings[156] = ItemType.SeaPickle; + mappings[157] = ItemType.WhiteWool; + mappings[158] = ItemType.OrangeWool; + mappings[159] = ItemType.MagentaWool; + mappings[160] = ItemType.LightBlueWool; + mappings[161] = ItemType.YellowWool; + mappings[162] = ItemType.LimeWool; + mappings[163] = ItemType.PinkWool; + mappings[164] = ItemType.GrayWool; + mappings[165] = ItemType.LightGrayWool; + mappings[166] = ItemType.CyanWool; + mappings[167] = ItemType.PurpleWool; + mappings[168] = ItemType.BlueWool; + mappings[169] = ItemType.BrownWool; + mappings[170] = ItemType.GreenWool; + mappings[171] = ItemType.RedWool; + mappings[172] = ItemType.BlackWool; + mappings[173] = ItemType.Dandelion; + mappings[174] = ItemType.Poppy; + mappings[175] = ItemType.BlueOrchid; + mappings[176] = ItemType.Allium; + mappings[177] = ItemType.AzureBluet; + mappings[178] = ItemType.RedTulip; + mappings[179] = ItemType.OrangeTulip; + mappings[180] = ItemType.WhiteTulip; + mappings[181] = ItemType.PinkTulip; + mappings[182] = ItemType.OxeyeDaisy; + mappings[183] = ItemType.Cornflower; + mappings[184] = ItemType.LilyOfTheValley; + mappings[185] = ItemType.WitherRose; + mappings[186] = ItemType.SporeBlossom; + mappings[187] = ItemType.BrownMushroom; + mappings[188] = ItemType.RedMushroom; + mappings[189] = ItemType.CrimsonFungus; + mappings[190] = ItemType.WarpedFungus; + mappings[191] = ItemType.CrimsonRoots; + mappings[192] = ItemType.WarpedRoots; + mappings[193] = ItemType.NetherSprouts; + mappings[194] = ItemType.WeepingVines; + mappings[195] = ItemType.TwistingVines; + mappings[196] = ItemType.SugarCane; + mappings[197] = ItemType.Kelp; + mappings[198] = ItemType.MossCarpet; + mappings[199] = ItemType.MossBlock; + mappings[200] = ItemType.HangingRoots; + mappings[201] = ItemType.BigDripleaf; + mappings[202] = ItemType.SmallDripleaf; + mappings[203] = ItemType.Bamboo; + mappings[204] = ItemType.OakSlab; + mappings[205] = ItemType.SpruceSlab; + mappings[206] = ItemType.BirchSlab; + mappings[207] = ItemType.JungleSlab; + mappings[208] = ItemType.AcaciaSlab; + mappings[209] = ItemType.DarkOakSlab; + mappings[210] = ItemType.CrimsonSlab; + mappings[211] = ItemType.WarpedSlab; + mappings[212] = ItemType.StoneSlab; + mappings[213] = ItemType.SmoothStoneSlab; + mappings[214] = ItemType.SandstoneSlab; + mappings[215] = ItemType.CutSandstoneSlab; + mappings[216] = ItemType.PetrifiedOakSlab; + mappings[217] = ItemType.CobblestoneSlab; + mappings[218] = ItemType.BrickSlab; + mappings[219] = ItemType.StoneBrickSlab; + mappings[220] = ItemType.NetherBrickSlab; + mappings[221] = ItemType.QuartzSlab; + mappings[222] = ItemType.RedSandstoneSlab; + mappings[223] = ItemType.CutRedSandstoneSlab; + mappings[224] = ItemType.PurpurSlab; + mappings[225] = ItemType.PrismarineSlab; + mappings[226] = ItemType.PrismarineBrickSlab; + mappings[227] = ItemType.DarkPrismarineSlab; + mappings[228] = ItemType.SmoothQuartz; + mappings[229] = ItemType.SmoothRedSandstone; + mappings[230] = ItemType.SmoothSandstone; + mappings[231] = ItemType.SmoothStone; + mappings[232] = ItemType.Bricks; + mappings[233] = ItemType.Bookshelf; + mappings[234] = ItemType.MossyCobblestone; + mappings[235] = ItemType.Obsidian; + mappings[236] = ItemType.Torch; + mappings[237] = ItemType.EndRod; + mappings[238] = ItemType.ChorusPlant; + mappings[239] = ItemType.ChorusFlower; + mappings[240] = ItemType.PurpurBlock; + mappings[241] = ItemType.PurpurPillar; + mappings[242] = ItemType.PurpurStairs; + mappings[243] = ItemType.Spawner; + mappings[244] = ItemType.OakStairs; + mappings[245] = ItemType.Chest; + mappings[246] = ItemType.CraftingTable; + mappings[247] = ItemType.Farmland; + mappings[248] = ItemType.Furnace; + mappings[249] = ItemType.Ladder; + mappings[250] = ItemType.CobblestoneStairs; + mappings[251] = ItemType.Snow; + mappings[252] = ItemType.Ice; + mappings[253] = ItemType.SnowBlock; + mappings[254] = ItemType.Cactus; + mappings[255] = ItemType.Clay; + mappings[256] = ItemType.Jukebox; + mappings[257] = ItemType.OakFence; + mappings[258] = ItemType.SpruceFence; + mappings[259] = ItemType.BirchFence; + mappings[260] = ItemType.JungleFence; + mappings[261] = ItemType.AcaciaFence; + mappings[262] = ItemType.DarkOakFence; + mappings[263] = ItemType.CrimsonFence; + mappings[264] = ItemType.WarpedFence; + mappings[265] = ItemType.Pumpkin; + mappings[266] = ItemType.CarvedPumpkin; + mappings[267] = ItemType.JackOLantern; + mappings[268] = ItemType.Netherrack; + mappings[269] = ItemType.SoulSand; + mappings[270] = ItemType.SoulSoil; + mappings[271] = ItemType.Basalt; + mappings[272] = ItemType.PolishedBasalt; + mappings[273] = ItemType.SmoothBasalt; + mappings[274] = ItemType.SoulTorch; + mappings[275] = ItemType.Glowstone; + mappings[276] = ItemType.InfestedStone; + mappings[277] = ItemType.InfestedCobblestone; + mappings[278] = ItemType.InfestedStoneBricks; + mappings[279] = ItemType.InfestedMossyStoneBricks; + mappings[280] = ItemType.InfestedCrackedStoneBricks; + mappings[281] = ItemType.InfestedChiseledStoneBricks; + mappings[282] = ItemType.InfestedDeepslate; + mappings[283] = ItemType.StoneBricks; + mappings[284] = ItemType.MossyStoneBricks; + mappings[285] = ItemType.CrackedStoneBricks; + mappings[286] = ItemType.ChiseledStoneBricks; + mappings[287] = ItemType.DeepslateBricks; + mappings[288] = ItemType.CrackedDeepslateBricks; + mappings[289] = ItemType.DeepslateTiles; + mappings[290] = ItemType.CrackedDeepslateTiles; + mappings[291] = ItemType.ChiseledDeepslate; + mappings[292] = ItemType.BrownMushroomBlock; + mappings[293] = ItemType.RedMushroomBlock; + mappings[294] = ItemType.MushroomStem; + mappings[295] = ItemType.IronBars; + mappings[296] = ItemType.Chain; + mappings[297] = ItemType.GlassPane; + mappings[298] = ItemType.Melon; + mappings[299] = ItemType.Vine; + mappings[300] = ItemType.GlowLichen; + mappings[301] = ItemType.BrickStairs; + mappings[302] = ItemType.StoneBrickStairs; + mappings[303] = ItemType.Mycelium; + mappings[304] = ItemType.LilyPad; + mappings[305] = ItemType.NetherBricks; + mappings[306] = ItemType.CrackedNetherBricks; + mappings[307] = ItemType.ChiseledNetherBricks; + mappings[308] = ItemType.NetherBrickFence; + mappings[309] = ItemType.NetherBrickStairs; + mappings[310] = ItemType.EnchantingTable; + mappings[311] = ItemType.EndPortalFrame; + mappings[312] = ItemType.EndStone; + mappings[313] = ItemType.EndStoneBricks; + mappings[314] = ItemType.DragonEgg; + mappings[315] = ItemType.SandstoneStairs; + mappings[316] = ItemType.EnderChest; + mappings[317] = ItemType.EmeraldBlock; + mappings[318] = ItemType.SpruceStairs; + mappings[319] = ItemType.BirchStairs; + mappings[320] = ItemType.JungleStairs; + mappings[321] = ItemType.CrimsonStairs; + mappings[322] = ItemType.WarpedStairs; + mappings[323] = ItemType.CommandBlock; + mappings[324] = ItemType.Beacon; + mappings[325] = ItemType.CobblestoneWall; + mappings[326] = ItemType.MossyCobblestoneWall; + mappings[327] = ItemType.BrickWall; + mappings[328] = ItemType.PrismarineWall; + mappings[329] = ItemType.RedSandstoneWall; + mappings[330] = ItemType.MossyStoneBrickWall; + mappings[331] = ItemType.GraniteWall; + mappings[332] = ItemType.StoneBrickWall; + mappings[333] = ItemType.NetherBrickWall; + mappings[334] = ItemType.AndesiteWall; + mappings[335] = ItemType.RedNetherBrickWall; + mappings[336] = ItemType.SandstoneWall; + mappings[337] = ItemType.EndStoneBrickWall; + mappings[338] = ItemType.DioriteWall; + mappings[339] = ItemType.BlackstoneWall; + mappings[340] = ItemType.PolishedBlackstoneWall; + mappings[341] = ItemType.PolishedBlackstoneBrickWall; + mappings[342] = ItemType.CobbledDeepslateWall; + mappings[343] = ItemType.PolishedDeepslateWall; + mappings[344] = ItemType.DeepslateBrickWall; + mappings[345] = ItemType.DeepslateTileWall; + mappings[346] = ItemType.Anvil; + mappings[347] = ItemType.ChippedAnvil; + mappings[348] = ItemType.DamagedAnvil; + mappings[349] = ItemType.ChiseledQuartzBlock; + mappings[350] = ItemType.QuartzBlock; + mappings[351] = ItemType.QuartzBricks; + mappings[352] = ItemType.QuartzPillar; + mappings[353] = ItemType.QuartzStairs; + mappings[354] = ItemType.WhiteTerracotta; + mappings[355] = ItemType.OrangeTerracotta; + mappings[356] = ItemType.MagentaTerracotta; + mappings[357] = ItemType.LightBlueTerracotta; + mappings[358] = ItemType.YellowTerracotta; + mappings[359] = ItemType.LimeTerracotta; + mappings[360] = ItemType.PinkTerracotta; + mappings[361] = ItemType.GrayTerracotta; + mappings[362] = ItemType.LightGrayTerracotta; + mappings[363] = ItemType.CyanTerracotta; + mappings[364] = ItemType.PurpleTerracotta; + mappings[365] = ItemType.BlueTerracotta; + mappings[366] = ItemType.BrownTerracotta; + mappings[367] = ItemType.GreenTerracotta; + mappings[368] = ItemType.RedTerracotta; + mappings[369] = ItemType.BlackTerracotta; + mappings[370] = ItemType.Barrier; + mappings[371] = ItemType.Light; + mappings[372] = ItemType.HayBlock; + mappings[373] = ItemType.WhiteCarpet; + mappings[374] = ItemType.OrangeCarpet; + mappings[375] = ItemType.MagentaCarpet; + mappings[376] = ItemType.LightBlueCarpet; + mappings[377] = ItemType.YellowCarpet; + mappings[378] = ItemType.LimeCarpet; + mappings[379] = ItemType.PinkCarpet; + mappings[380] = ItemType.GrayCarpet; + mappings[381] = ItemType.LightGrayCarpet; + mappings[382] = ItemType.CyanCarpet; + mappings[383] = ItemType.PurpleCarpet; + mappings[384] = ItemType.BlueCarpet; + mappings[385] = ItemType.BrownCarpet; + mappings[386] = ItemType.GreenCarpet; + mappings[387] = ItemType.RedCarpet; + mappings[388] = ItemType.BlackCarpet; + mappings[389] = ItemType.Terracotta; + mappings[390] = ItemType.PackedIce; + mappings[391] = ItemType.AcaciaStairs; + mappings[392] = ItemType.DarkOakStairs; + mappings[393] = ItemType.GrassPath; + mappings[394] = ItemType.Sunflower; + mappings[395] = ItemType.Lilac; + mappings[396] = ItemType.RoseBush; + mappings[397] = ItemType.Peony; + mappings[398] = ItemType.TallGrass; + mappings[399] = ItemType.LargeFern; + mappings[400] = ItemType.WhiteStainedGlass; + mappings[401] = ItemType.OrangeStainedGlass; + mappings[402] = ItemType.MagentaStainedGlass; + mappings[403] = ItemType.LightBlueStainedGlass; + mappings[404] = ItemType.YellowStainedGlass; + mappings[405] = ItemType.LimeStainedGlass; + mappings[406] = ItemType.PinkStainedGlass; + mappings[407] = ItemType.GrayStainedGlass; + mappings[408] = ItemType.LightGrayStainedGlass; + mappings[409] = ItemType.CyanStainedGlass; + mappings[410] = ItemType.PurpleStainedGlass; + mappings[411] = ItemType.BlueStainedGlass; + mappings[412] = ItemType.BrownStainedGlass; + mappings[413] = ItemType.GreenStainedGlass; + mappings[414] = ItemType.RedStainedGlass; + mappings[415] = ItemType.BlackStainedGlass; + mappings[416] = ItemType.WhiteStainedGlassPane; + mappings[417] = ItemType.OrangeStainedGlassPane; + mappings[418] = ItemType.MagentaStainedGlassPane; + mappings[419] = ItemType.LightBlueStainedGlassPane; + mappings[420] = ItemType.YellowStainedGlassPane; + mappings[421] = ItemType.LimeStainedGlassPane; + mappings[422] = ItemType.PinkStainedGlassPane; + mappings[423] = ItemType.GrayStainedGlassPane; + mappings[424] = ItemType.LightGrayStainedGlassPane; + mappings[425] = ItemType.CyanStainedGlassPane; + mappings[426] = ItemType.PurpleStainedGlassPane; + mappings[427] = ItemType.BlueStainedGlassPane; + mappings[428] = ItemType.BrownStainedGlassPane; + mappings[429] = ItemType.GreenStainedGlassPane; + mappings[430] = ItemType.RedStainedGlassPane; + mappings[431] = ItemType.BlackStainedGlassPane; + mappings[432] = ItemType.Prismarine; + mappings[433] = ItemType.PrismarineBricks; + mappings[434] = ItemType.DarkPrismarine; + mappings[435] = ItemType.PrismarineStairs; + mappings[436] = ItemType.PrismarineBrickStairs; + mappings[437] = ItemType.DarkPrismarineStairs; + mappings[438] = ItemType.SeaLantern; + mappings[439] = ItemType.RedSandstone; + mappings[440] = ItemType.ChiseledRedSandstone; + mappings[441] = ItemType.CutRedSandstone; + mappings[442] = ItemType.RedSandstoneStairs; + mappings[443] = ItemType.RepeatingCommandBlock; + mappings[444] = ItemType.ChainCommandBlock; + mappings[445] = ItemType.MagmaBlock; + mappings[446] = ItemType.NetherWartBlock; + mappings[447] = ItemType.WarpedWartBlock; + mappings[448] = ItemType.RedNetherBricks; + mappings[449] = ItemType.BoneBlock; + mappings[450] = ItemType.StructureVoid; + mappings[451] = ItemType.ShulkerBox; + mappings[452] = ItemType.WhiteShulkerBox; + mappings[453] = ItemType.OrangeShulkerBox; + mappings[454] = ItemType.MagentaShulkerBox; + mappings[455] = ItemType.LightBlueShulkerBox; + mappings[456] = ItemType.YellowShulkerBox; + mappings[457] = ItemType.LimeShulkerBox; + mappings[458] = ItemType.PinkShulkerBox; + mappings[459] = ItemType.GrayShulkerBox; + mappings[460] = ItemType.LightGrayShulkerBox; + mappings[461] = ItemType.CyanShulkerBox; + mappings[462] = ItemType.PurpleShulkerBox; + mappings[463] = ItemType.BlueShulkerBox; + mappings[464] = ItemType.BrownShulkerBox; + mappings[465] = ItemType.GreenShulkerBox; + mappings[466] = ItemType.RedShulkerBox; + mappings[467] = ItemType.BlackShulkerBox; + mappings[468] = ItemType.WhiteGlazedTerracotta; + mappings[469] = ItemType.OrangeGlazedTerracotta; + mappings[470] = ItemType.MagentaGlazedTerracotta; + mappings[471] = ItemType.LightBlueGlazedTerracotta; + mappings[472] = ItemType.YellowGlazedTerracotta; + mappings[473] = ItemType.LimeGlazedTerracotta; + mappings[474] = ItemType.PinkGlazedTerracotta; + mappings[475] = ItemType.GrayGlazedTerracotta; + mappings[476] = ItemType.LightGrayGlazedTerracotta; + mappings[477] = ItemType.CyanGlazedTerracotta; + mappings[478] = ItemType.PurpleGlazedTerracotta; + mappings[479] = ItemType.BlueGlazedTerracotta; + mappings[480] = ItemType.BrownGlazedTerracotta; + mappings[481] = ItemType.GreenGlazedTerracotta; + mappings[482] = ItemType.RedGlazedTerracotta; + mappings[483] = ItemType.BlackGlazedTerracotta; + mappings[484] = ItemType.WhiteConcrete; + mappings[485] = ItemType.OrangeConcrete; + mappings[486] = ItemType.MagentaConcrete; + mappings[487] = ItemType.LightBlueConcrete; + mappings[488] = ItemType.YellowConcrete; + mappings[489] = ItemType.LimeConcrete; + mappings[490] = ItemType.PinkConcrete; + mappings[491] = ItemType.GrayConcrete; + mappings[492] = ItemType.LightGrayConcrete; + mappings[493] = ItemType.CyanConcrete; + mappings[494] = ItemType.PurpleConcrete; + mappings[495] = ItemType.BlueConcrete; + mappings[496] = ItemType.BrownConcrete; + mappings[497] = ItemType.GreenConcrete; + mappings[498] = ItemType.RedConcrete; + mappings[499] = ItemType.BlackConcrete; + mappings[500] = ItemType.WhiteConcretePowder; + mappings[501] = ItemType.OrangeConcretePowder; + mappings[502] = ItemType.MagentaConcretePowder; + mappings[503] = ItemType.LightBlueConcretePowder; + mappings[504] = ItemType.YellowConcretePowder; + mappings[505] = ItemType.LimeConcretePowder; + mappings[506] = ItemType.PinkConcretePowder; + mappings[507] = ItemType.GrayConcretePowder; + mappings[508] = ItemType.LightGrayConcretePowder; + mappings[509] = ItemType.CyanConcretePowder; + mappings[510] = ItemType.PurpleConcretePowder; + mappings[511] = ItemType.BlueConcretePowder; + mappings[512] = ItemType.BrownConcretePowder; + mappings[513] = ItemType.GreenConcretePowder; + mappings[514] = ItemType.RedConcretePowder; + mappings[515] = ItemType.BlackConcretePowder; + mappings[516] = ItemType.TurtleEgg; + mappings[517] = ItemType.DeadTubeCoralBlock; + mappings[518] = ItemType.DeadBrainCoralBlock; + mappings[519] = ItemType.DeadBubbleCoralBlock; + mappings[520] = ItemType.DeadFireCoralBlock; + mappings[521] = ItemType.DeadHornCoralBlock; + mappings[522] = ItemType.TubeCoralBlock; + mappings[523] = ItemType.BrainCoralBlock; + mappings[524] = ItemType.BubbleCoralBlock; + mappings[525] = ItemType.FireCoralBlock; + mappings[526] = ItemType.HornCoralBlock; + mappings[527] = ItemType.TubeCoral; + mappings[528] = ItemType.BrainCoral; + mappings[529] = ItemType.BubbleCoral; + mappings[530] = ItemType.FireCoral; + mappings[531] = ItemType.HornCoral; + mappings[532] = ItemType.DeadBrainCoral; + mappings[533] = ItemType.DeadBubbleCoral; + mappings[534] = ItemType.DeadFireCoral; + mappings[535] = ItemType.DeadHornCoral; + mappings[536] = ItemType.DeadTubeCoral; + mappings[537] = ItemType.TubeCoralFan; + mappings[538] = ItemType.BrainCoralFan; + mappings[539] = ItemType.BubbleCoralFan; + mappings[540] = ItemType.FireCoralFan; + mappings[541] = ItemType.HornCoralFan; + mappings[542] = ItemType.DeadTubeCoralFan; + mappings[543] = ItemType.DeadBrainCoralFan; + mappings[544] = ItemType.DeadBubbleCoralFan; + mappings[545] = ItemType.DeadFireCoralFan; + mappings[546] = ItemType.DeadHornCoralFan; + mappings[547] = ItemType.BlueIce; + mappings[548] = ItemType.Conduit; + mappings[549] = ItemType.PolishedGraniteStairs; + mappings[550] = ItemType.SmoothRedSandstoneStairs; + mappings[551] = ItemType.MossyStoneBrickStairs; + mappings[552] = ItemType.PolishedDioriteStairs; + mappings[553] = ItemType.MossyCobblestoneStairs; + mappings[554] = ItemType.EndStoneBrickStairs; + mappings[555] = ItemType.StoneStairs; + mappings[556] = ItemType.SmoothSandstoneStairs; + mappings[557] = ItemType.SmoothQuartzStairs; + mappings[558] = ItemType.GraniteStairs; + mappings[559] = ItemType.AndesiteStairs; + mappings[560] = ItemType.RedNetherBrickStairs; + mappings[561] = ItemType.PolishedAndesiteStairs; + mappings[562] = ItemType.DioriteStairs; + mappings[563] = ItemType.CobbledDeepslateStairs; + mappings[564] = ItemType.PolishedDeepslateStairs; + mappings[565] = ItemType.DeepslateBrickStairs; + mappings[566] = ItemType.DeepslateTileStairs; + mappings[567] = ItemType.PolishedGraniteSlab; + mappings[568] = ItemType.SmoothRedSandstoneSlab; + mappings[569] = ItemType.MossyStoneBrickSlab; + mappings[570] = ItemType.PolishedDioriteSlab; + mappings[571] = ItemType.MossyCobblestoneSlab; + mappings[572] = ItemType.EndStoneBrickSlab; + mappings[573] = ItemType.SmoothSandstoneSlab; + mappings[574] = ItemType.SmoothQuartzSlab; + mappings[575] = ItemType.GraniteSlab; + mappings[576] = ItemType.AndesiteSlab; + mappings[577] = ItemType.RedNetherBrickSlab; + mappings[578] = ItemType.PolishedAndesiteSlab; + mappings[579] = ItemType.DioriteSlab; + mappings[580] = ItemType.CobbledDeepslateSlab; + mappings[581] = ItemType.PolishedDeepslateSlab; + mappings[582] = ItemType.DeepslateBrickSlab; + mappings[583] = ItemType.DeepslateTileSlab; + mappings[584] = ItemType.Scaffolding; + mappings[585] = ItemType.Redstone; + mappings[586] = ItemType.RedstoneTorch; + mappings[587] = ItemType.RedstoneBlock; + mappings[588] = ItemType.Repeater; + mappings[589] = ItemType.Comparator; + mappings[590] = ItemType.Piston; + mappings[591] = ItemType.StickyPiston; + mappings[592] = ItemType.SlimeBlock; + mappings[593] = ItemType.HoneyBlock; + mappings[594] = ItemType.Observer; + mappings[595] = ItemType.Hopper; + mappings[596] = ItemType.Dispenser; + mappings[597] = ItemType.Dropper; + mappings[598] = ItemType.Lectern; + mappings[599] = ItemType.Target; + mappings[600] = ItemType.Lever; + mappings[601] = ItemType.LightningRod; + mappings[602] = ItemType.DaylightDetector; + mappings[603] = ItemType.SculkSensor; + mappings[604] = ItemType.TripwireHook; + mappings[605] = ItemType.TrappedChest; + mappings[606] = ItemType.Tnt; + mappings[607] = ItemType.RedstoneLamp; + mappings[608] = ItemType.NoteBlock; + mappings[609] = ItemType.StoneButton; + mappings[610] = ItemType.PolishedBlackstoneButton; + mappings[611] = ItemType.OakButton; + mappings[612] = ItemType.SpruceButton; + mappings[613] = ItemType.BirchButton; + mappings[614] = ItemType.JungleButton; + mappings[615] = ItemType.AcaciaButton; + mappings[616] = ItemType.DarkOakButton; + mappings[617] = ItemType.CrimsonButton; + mappings[618] = ItemType.WarpedButton; + mappings[619] = ItemType.StonePressurePlate; + mappings[620] = ItemType.PolishedBlackstonePressurePlate; + mappings[621] = ItemType.LightWeightedPressurePlate; + mappings[622] = ItemType.HeavyWeightedPressurePlate; + mappings[623] = ItemType.OakPressurePlate; + mappings[624] = ItemType.SprucePressurePlate; + mappings[625] = ItemType.BirchPressurePlate; + mappings[626] = ItemType.JunglePressurePlate; + mappings[627] = ItemType.AcaciaPressurePlate; + mappings[628] = ItemType.DarkOakPressurePlate; + mappings[629] = ItemType.CrimsonPressurePlate; + mappings[630] = ItemType.WarpedPressurePlate; + mappings[631] = ItemType.IronDoor; + mappings[632] = ItemType.OakDoor; + mappings[633] = ItemType.SpruceDoor; + mappings[634] = ItemType.BirchDoor; + mappings[635] = ItemType.JungleDoor; + mappings[636] = ItemType.AcaciaDoor; + mappings[637] = ItemType.DarkOakDoor; + mappings[638] = ItemType.CrimsonDoor; + mappings[639] = ItemType.WarpedDoor; + mappings[640] = ItemType.IronTrapdoor; + mappings[641] = ItemType.OakTrapdoor; + mappings[642] = ItemType.SpruceTrapdoor; + mappings[643] = ItemType.BirchTrapdoor; + mappings[644] = ItemType.JungleTrapdoor; + mappings[645] = ItemType.AcaciaTrapdoor; + mappings[646] = ItemType.DarkOakTrapdoor; + mappings[647] = ItemType.CrimsonTrapdoor; + mappings[648] = ItemType.WarpedTrapdoor; + mappings[649] = ItemType.OakFenceGate; + mappings[650] = ItemType.SpruceFenceGate; + mappings[651] = ItemType.BirchFenceGate; + mappings[652] = ItemType.JungleFenceGate; + mappings[653] = ItemType.AcaciaFenceGate; + mappings[654] = ItemType.DarkOakFenceGate; + mappings[655] = ItemType.CrimsonFenceGate; + mappings[656] = ItemType.WarpedFenceGate; + mappings[657] = ItemType.PoweredRail; + mappings[658] = ItemType.DetectorRail; + mappings[659] = ItemType.Rail; + mappings[660] = ItemType.ActivatorRail; + mappings[661] = ItemType.Saddle; + mappings[662] = ItemType.Minecart; + mappings[663] = ItemType.ChestMinecart; + mappings[664] = ItemType.FurnaceMinecart; + mappings[665] = ItemType.TntMinecart; + mappings[666] = ItemType.HopperMinecart; + mappings[667] = ItemType.CarrotOnAStick; + mappings[668] = ItemType.WarpedFungusOnAStick; + mappings[669] = ItemType.Elytra; + mappings[670] = ItemType.OakBoat; + mappings[671] = ItemType.SpruceBoat; + mappings[672] = ItemType.BirchBoat; + mappings[673] = ItemType.JungleBoat; + mappings[674] = ItemType.AcaciaBoat; + mappings[675] = ItemType.DarkOakBoat; + mappings[676] = ItemType.StructureBlock; + mappings[677] = ItemType.Jigsaw; + mappings[678] = ItemType.TurtleHelmet; + mappings[679] = ItemType.Scute; + mappings[680] = ItemType.FlintAndSteel; + mappings[681] = ItemType.Apple; + mappings[682] = ItemType.Bow; + mappings[683] = ItemType.Arrow; + mappings[684] = ItemType.Coal; + mappings[685] = ItemType.Charcoal; + mappings[686] = ItemType.Diamond; + mappings[687] = ItemType.Emerald; + mappings[688] = ItemType.LapisLazuli; + mappings[689] = ItemType.Quartz; + mappings[690] = ItemType.AmethystShard; + mappings[691] = ItemType.RawIron; + mappings[692] = ItemType.IronIngot; + mappings[693] = ItemType.RawCopper; + mappings[694] = ItemType.CopperIngot; + mappings[695] = ItemType.RawGold; + mappings[696] = ItemType.GoldIngot; + mappings[697] = ItemType.NetheriteIngot; + mappings[698] = ItemType.NetheriteScrap; + mappings[699] = ItemType.WoodenSword; + mappings[700] = ItemType.WoodenShovel; + mappings[701] = ItemType.WoodenPickaxe; + mappings[702] = ItemType.WoodenAxe; + mappings[703] = ItemType.WoodenHoe; + mappings[704] = ItemType.StoneSword; + mappings[705] = ItemType.StoneShovel; + mappings[706] = ItemType.StonePickaxe; + mappings[707] = ItemType.StoneAxe; + mappings[708] = ItemType.StoneHoe; + mappings[709] = ItemType.GoldenSword; + mappings[710] = ItemType.GoldenShovel; + mappings[711] = ItemType.GoldenPickaxe; + mappings[712] = ItemType.GoldenAxe; + mappings[713] = ItemType.GoldenHoe; + mappings[714] = ItemType.IronSword; + mappings[715] = ItemType.IronShovel; + mappings[716] = ItemType.IronPickaxe; + mappings[717] = ItemType.IronAxe; + mappings[718] = ItemType.IronHoe; + mappings[719] = ItemType.DiamondSword; + mappings[720] = ItemType.DiamondShovel; + mappings[721] = ItemType.DiamondPickaxe; + mappings[722] = ItemType.DiamondAxe; + mappings[723] = ItemType.DiamondHoe; + mappings[724] = ItemType.NetheriteSword; + mappings[725] = ItemType.NetheriteShovel; + mappings[726] = ItemType.NetheritePickaxe; + mappings[727] = ItemType.NetheriteAxe; + mappings[728] = ItemType.NetheriteHoe; + mappings[729] = ItemType.Stick; + mappings[730] = ItemType.Bowl; + mappings[731] = ItemType.MushroomStew; + mappings[732] = ItemType.String; + mappings[733] = ItemType.Feather; + mappings[734] = ItemType.Gunpowder; + mappings[735] = ItemType.WheatSeeds; + mappings[736] = ItemType.Wheat; + mappings[737] = ItemType.Bread; + mappings[738] = ItemType.LeatherHelmet; + mappings[739] = ItemType.LeatherChestplate; + mappings[740] = ItemType.LeatherLeggings; + mappings[741] = ItemType.LeatherBoots; + mappings[742] = ItemType.ChainmailHelmet; + mappings[743] = ItemType.ChainmailChestplate; + mappings[744] = ItemType.ChainmailLeggings; + mappings[745] = ItemType.ChainmailBoots; + mappings[746] = ItemType.IronHelmet; + mappings[747] = ItemType.IronChestplate; + mappings[748] = ItemType.IronLeggings; + mappings[749] = ItemType.IronBoots; + mappings[750] = ItemType.DiamondHelmet; + mappings[751] = ItemType.DiamondChestplate; + mappings[752] = ItemType.DiamondLeggings; + mappings[753] = ItemType.DiamondBoots; + mappings[754] = ItemType.GoldenHelmet; + mappings[755] = ItemType.GoldenChestplate; + mappings[756] = ItemType.GoldenLeggings; + mappings[757] = ItemType.GoldenBoots; + mappings[758] = ItemType.NetheriteHelmet; + mappings[759] = ItemType.NetheriteChestplate; + mappings[760] = ItemType.NetheriteLeggings; + mappings[761] = ItemType.NetheriteBoots; + mappings[762] = ItemType.Flint; + mappings[763] = ItemType.Porkchop; + mappings[764] = ItemType.CookedPorkchop; + mappings[765] = ItemType.Painting; + mappings[766] = ItemType.GoldenApple; + mappings[767] = ItemType.EnchantedGoldenApple; + mappings[768] = ItemType.OakSign; + mappings[769] = ItemType.SpruceSign; + mappings[770] = ItemType.BirchSign; + mappings[771] = ItemType.JungleSign; + mappings[772] = ItemType.AcaciaSign; + mappings[773] = ItemType.DarkOakSign; + mappings[774] = ItemType.CrimsonSign; + mappings[775] = ItemType.WarpedSign; + mappings[776] = ItemType.Bucket; + mappings[777] = ItemType.WaterBucket; + mappings[778] = ItemType.LavaBucket; + mappings[779] = ItemType.PowderSnowBucket; + mappings[780] = ItemType.Snowball; + mappings[781] = ItemType.Leather; + mappings[782] = ItemType.MilkBucket; + mappings[783] = ItemType.PufferfishBucket; + mappings[784] = ItemType.SalmonBucket; + mappings[785] = ItemType.CodBucket; + mappings[786] = ItemType.TropicalFishBucket; + mappings[787] = ItemType.AxolotlBucket; + mappings[788] = ItemType.Brick; + mappings[789] = ItemType.ClayBall; + mappings[790] = ItemType.DriedKelpBlock; + mappings[791] = ItemType.Paper; + mappings[792] = ItemType.Book; + mappings[793] = ItemType.SlimeBall; + mappings[794] = ItemType.Egg; + mappings[795] = ItemType.Compass; + mappings[796] = ItemType.Bundle; + mappings[797] = ItemType.FishingRod; + mappings[798] = ItemType.Clock; + mappings[799] = ItemType.Spyglass; + mappings[800] = ItemType.GlowstoneDust; + mappings[801] = ItemType.Cod; + mappings[802] = ItemType.Salmon; + mappings[803] = ItemType.TropicalFish; + mappings[804] = ItemType.Pufferfish; + mappings[805] = ItemType.CookedCod; + mappings[806] = ItemType.CookedSalmon; + mappings[807] = ItemType.InkSac; + mappings[808] = ItemType.GlowInkSac; + mappings[809] = ItemType.CocoaBeans; + mappings[810] = ItemType.WhiteDye; + mappings[811] = ItemType.OrangeDye; + mappings[812] = ItemType.MagentaDye; + mappings[813] = ItemType.LightBlueDye; + mappings[814] = ItemType.YellowDye; + mappings[815] = ItemType.LimeDye; + mappings[816] = ItemType.PinkDye; + mappings[817] = ItemType.GrayDye; + mappings[818] = ItemType.LightGrayDye; + mappings[819] = ItemType.CyanDye; + mappings[820] = ItemType.PurpleDye; + mappings[821] = ItemType.BlueDye; + mappings[822] = ItemType.BrownDye; + mappings[823] = ItemType.GreenDye; + mappings[824] = ItemType.RedDye; + mappings[825] = ItemType.BlackDye; + mappings[826] = ItemType.BoneMeal; + mappings[827] = ItemType.Bone; + mappings[828] = ItemType.Sugar; + mappings[829] = ItemType.Cake; + mappings[830] = ItemType.WhiteBed; + mappings[831] = ItemType.OrangeBed; + mappings[832] = ItemType.MagentaBed; + mappings[833] = ItemType.LightBlueBed; + mappings[834] = ItemType.YellowBed; + mappings[835] = ItemType.LimeBed; + mappings[836] = ItemType.PinkBed; + mappings[837] = ItemType.GrayBed; + mappings[838] = ItemType.LightGrayBed; + mappings[839] = ItemType.CyanBed; + mappings[840] = ItemType.PurpleBed; + mappings[841] = ItemType.BlueBed; + mappings[842] = ItemType.BrownBed; + mappings[843] = ItemType.GreenBed; + mappings[844] = ItemType.RedBed; + mappings[845] = ItemType.BlackBed; + mappings[846] = ItemType.Cookie; + mappings[847] = ItemType.FilledMap; + mappings[848] = ItemType.Shears; + mappings[849] = ItemType.MelonSlice; + mappings[850] = ItemType.DriedKelp; + mappings[851] = ItemType.PumpkinSeeds; + mappings[852] = ItemType.MelonSeeds; + mappings[853] = ItemType.Beef; + mappings[854] = ItemType.CookedBeef; + mappings[855] = ItemType.Chicken; + mappings[856] = ItemType.CookedChicken; + mappings[857] = ItemType.RottenFlesh; + mappings[858] = ItemType.EnderPearl; + mappings[859] = ItemType.BlazeRod; + mappings[860] = ItemType.GhastTear; + mappings[861] = ItemType.GoldNugget; + mappings[862] = ItemType.NetherWart; + mappings[863] = ItemType.Potion; + mappings[864] = ItemType.GlassBottle; + mappings[865] = ItemType.SpiderEye; + mappings[866] = ItemType.FermentedSpiderEye; + mappings[867] = ItemType.BlazePowder; + mappings[868] = ItemType.MagmaCream; + mappings[869] = ItemType.BrewingStand; + mappings[870] = ItemType.Cauldron; + mappings[871] = ItemType.EnderEye; + mappings[872] = ItemType.GlisteringMelonSlice; + mappings[873] = ItemType.AxolotlSpawnEgg; + mappings[874] = ItemType.BatSpawnEgg; + mappings[875] = ItemType.BeeSpawnEgg; + mappings[876] = ItemType.BlazeSpawnEgg; + mappings[877] = ItemType.CatSpawnEgg; + mappings[878] = ItemType.CaveSpiderSpawnEgg; + mappings[879] = ItemType.ChickenSpawnEgg; + mappings[880] = ItemType.CodSpawnEgg; + mappings[881] = ItemType.CowSpawnEgg; + mappings[882] = ItemType.CreeperSpawnEgg; + mappings[883] = ItemType.DolphinSpawnEgg; + mappings[884] = ItemType.DonkeySpawnEgg; + mappings[885] = ItemType.DrownedSpawnEgg; + mappings[886] = ItemType.ElderGuardianSpawnEgg; + mappings[887] = ItemType.EndermanSpawnEgg; + mappings[888] = ItemType.EndermiteSpawnEgg; + mappings[889] = ItemType.EvokerSpawnEgg; + mappings[890] = ItemType.FoxSpawnEgg; + mappings[891] = ItemType.GhastSpawnEgg; + mappings[892] = ItemType.GlowSquidSpawnEgg; + mappings[893] = ItemType.GoatSpawnEgg; + mappings[894] = ItemType.GuardianSpawnEgg; + mappings[895] = ItemType.HoglinSpawnEgg; + mappings[896] = ItemType.HorseSpawnEgg; + mappings[897] = ItemType.HuskSpawnEgg; + mappings[898] = ItemType.LlamaSpawnEgg; + mappings[899] = ItemType.MagmaCubeSpawnEgg; + mappings[900] = ItemType.MooshroomSpawnEgg; + mappings[901] = ItemType.MuleSpawnEgg; + mappings[902] = ItemType.OcelotSpawnEgg; + mappings[903] = ItemType.PandaSpawnEgg; + mappings[904] = ItemType.ParrotSpawnEgg; + mappings[905] = ItemType.PhantomSpawnEgg; + mappings[906] = ItemType.PigSpawnEgg; + mappings[907] = ItemType.PiglinSpawnEgg; + mappings[908] = ItemType.PiglinBruteSpawnEgg; + mappings[909] = ItemType.PillagerSpawnEgg; + mappings[910] = ItemType.PolarBearSpawnEgg; + mappings[911] = ItemType.PufferfishSpawnEgg; + mappings[912] = ItemType.RabbitSpawnEgg; + mappings[913] = ItemType.RavagerSpawnEgg; + mappings[914] = ItemType.SalmonSpawnEgg; + mappings[915] = ItemType.SheepSpawnEgg; + mappings[916] = ItemType.ShulkerSpawnEgg; + mappings[917] = ItemType.SilverfishSpawnEgg; + mappings[918] = ItemType.SkeletonSpawnEgg; + mappings[919] = ItemType.SkeletonHorseSpawnEgg; + mappings[920] = ItemType.SlimeSpawnEgg; + mappings[921] = ItemType.SpiderSpawnEgg; + mappings[922] = ItemType.SquidSpawnEgg; + mappings[923] = ItemType.StraySpawnEgg; + mappings[924] = ItemType.StriderSpawnEgg; + mappings[925] = ItemType.TraderLlamaSpawnEgg; + mappings[926] = ItemType.TropicalFishSpawnEgg; + mappings[927] = ItemType.TurtleSpawnEgg; + mappings[928] = ItemType.VexSpawnEgg; + mappings[929] = ItemType.VillagerSpawnEgg; + mappings[930] = ItemType.VindicatorSpawnEgg; + mappings[931] = ItemType.WanderingTraderSpawnEgg; + mappings[932] = ItemType.WitchSpawnEgg; + mappings[933] = ItemType.WitherSkeletonSpawnEgg; + mappings[934] = ItemType.WolfSpawnEgg; + mappings[935] = ItemType.ZoglinSpawnEgg; + mappings[936] = ItemType.ZombieSpawnEgg; + mappings[937] = ItemType.ZombieHorseSpawnEgg; + mappings[938] = ItemType.ZombieVillagerSpawnEgg; + mappings[939] = ItemType.ZombifiedPiglinSpawnEgg; + mappings[940] = ItemType.ExperienceBottle; + mappings[941] = ItemType.FireCharge; + mappings[942] = ItemType.WritableBook; + mappings[943] = ItemType.WrittenBook; + mappings[944] = ItemType.ItemFrame; + mappings[945] = ItemType.GlowItemFrame; + mappings[946] = ItemType.FlowerPot; + mappings[947] = ItemType.Carrot; + mappings[948] = ItemType.Potato; + mappings[949] = ItemType.BakedPotato; + mappings[950] = ItemType.PoisonousPotato; + mappings[951] = ItemType.Map; + mappings[952] = ItemType.GoldenCarrot; + mappings[953] = ItemType.SkeletonSkull; + mappings[954] = ItemType.WitherSkeletonSkull; + mappings[955] = ItemType.PlayerHead; + mappings[956] = ItemType.ZombieHead; + mappings[957] = ItemType.CreeperHead; + mappings[958] = ItemType.DragonHead; + mappings[959] = ItemType.NetherStar; + mappings[960] = ItemType.PumpkinPie; + mappings[961] = ItemType.FireworkRocket; + mappings[962] = ItemType.FireworkStar; + mappings[963] = ItemType.EnchantedBook; + mappings[964] = ItemType.NetherBrick; + mappings[965] = ItemType.PrismarineShard; + mappings[966] = ItemType.PrismarineCrystals; + mappings[967] = ItemType.Rabbit; + mappings[968] = ItemType.CookedRabbit; + mappings[969] = ItemType.RabbitStew; + mappings[970] = ItemType.RabbitFoot; + mappings[971] = ItemType.RabbitHide; + mappings[972] = ItemType.ArmorStand; + mappings[973] = ItemType.IronHorseArmor; + mappings[974] = ItemType.GoldenHorseArmor; + mappings[975] = ItemType.DiamondHorseArmor; + mappings[976] = ItemType.LeatherHorseArmor; + mappings[977] = ItemType.Lead; + mappings[978] = ItemType.NameTag; + mappings[979] = ItemType.CommandBlockMinecart; + mappings[980] = ItemType.Mutton; + mappings[981] = ItemType.CookedMutton; + mappings[982] = ItemType.WhiteBanner; + mappings[983] = ItemType.OrangeBanner; + mappings[984] = ItemType.MagentaBanner; + mappings[985] = ItemType.LightBlueBanner; + mappings[986] = ItemType.YellowBanner; + mappings[987] = ItemType.LimeBanner; + mappings[988] = ItemType.PinkBanner; + mappings[989] = ItemType.GrayBanner; + mappings[990] = ItemType.LightGrayBanner; + mappings[991] = ItemType.CyanBanner; + mappings[992] = ItemType.PurpleBanner; + mappings[993] = ItemType.BlueBanner; + mappings[994] = ItemType.BrownBanner; + mappings[995] = ItemType.GreenBanner; + mappings[996] = ItemType.RedBanner; + mappings[997] = ItemType.BlackBanner; + mappings[998] = ItemType.EndCrystal; + mappings[999] = ItemType.ChorusFruit; + mappings[1000] = ItemType.PoppedChorusFruit; + mappings[1001] = ItemType.Beetroot; + mappings[1002] = ItemType.BeetrootSeeds; + mappings[1003] = ItemType.BeetrootSoup; + mappings[1004] = ItemType.DragonBreath; + mappings[1005] = ItemType.SplashPotion; + mappings[1006] = ItemType.SpectralArrow; + mappings[1007] = ItemType.TippedArrow; + mappings[1008] = ItemType.LingeringPotion; + mappings[1009] = ItemType.Shield; + mappings[1010] = ItemType.TotemOfUndying; + mappings[1011] = ItemType.ShulkerShell; + mappings[1012] = ItemType.IronNugget; + mappings[1013] = ItemType.KnowledgeBook; + mappings[1014] = ItemType.DebugStick; + mappings[1015] = ItemType.MusicDisc13; + mappings[1016] = ItemType.MusicDiscCat; + mappings[1017] = ItemType.MusicDiscBlocks; + mappings[1018] = ItemType.MusicDiscChirp; + mappings[1019] = ItemType.MusicDiscFar; + mappings[1020] = ItemType.MusicDiscMall; + mappings[1021] = ItemType.MusicDiscMellohi; + mappings[1022] = ItemType.MusicDiscStal; + mappings[1023] = ItemType.MusicDiscStrad; + mappings[1024] = ItemType.MusicDiscWard; + mappings[1025] = ItemType.MusicDisc11; + mappings[1026] = ItemType.MusicDiscWait; + mappings[1027] = ItemType.MusicDiscOtherside; + mappings[1028] = ItemType.MusicDiscPigstep; + mappings[1029] = ItemType.Trident; + mappings[1030] = ItemType.PhantomMembrane; + mappings[1031] = ItemType.NautilusShell; + mappings[1032] = ItemType.HeartOfTheSea; + mappings[1033] = ItemType.Crossbow; + mappings[1034] = ItemType.SuspiciousStew; + mappings[1035] = ItemType.Loom; + mappings[1036] = ItemType.FlowerBannerPattern; + mappings[1037] = ItemType.CreeperBannerPattern; + mappings[1038] = ItemType.SkullBannerPattern; + mappings[1039] = ItemType.MojangBannerPattern; + mappings[1040] = ItemType.GlobeBannerPattern; + mappings[1041] = ItemType.PiglinBannerPattern; + mappings[1042] = ItemType.Composter; + mappings[1043] = ItemType.Barrel; + mappings[1044] = ItemType.Smoker; + mappings[1045] = ItemType.BlastFurnace; + mappings[1046] = ItemType.CartographyTable; + mappings[1047] = ItemType.FletchingTable; + mappings[1048] = ItemType.Grindstone; + mappings[1049] = ItemType.SmithingTable; + mappings[1050] = ItemType.Stonecutter; + mappings[1051] = ItemType.Bell; + mappings[1052] = ItemType.Lantern; + mappings[1053] = ItemType.SoulLantern; + mappings[1054] = ItemType.SweetBerries; + mappings[1055] = ItemType.GlowBerries; + mappings[1056] = ItemType.Campfire; + mappings[1057] = ItemType.SoulCampfire; + mappings[1058] = ItemType.Shroomlight; + mappings[1059] = ItemType.Honeycomb; + mappings[1060] = ItemType.BeeNest; + mappings[1061] = ItemType.Beehive; + mappings[1062] = ItemType.HoneyBottle; + mappings[1063] = ItemType.HoneycombBlock; + mappings[1064] = ItemType.Lodestone; + mappings[1065] = ItemType.CryingObsidian; + mappings[1066] = ItemType.Blackstone; + mappings[1067] = ItemType.BlackstoneSlab; + mappings[1068] = ItemType.BlackstoneStairs; + mappings[1069] = ItemType.GildedBlackstone; + mappings[1070] = ItemType.PolishedBlackstone; + mappings[1071] = ItemType.PolishedBlackstoneSlab; + mappings[1072] = ItemType.PolishedBlackstoneStairs; + mappings[1073] = ItemType.ChiseledPolishedBlackstone; + mappings[1074] = ItemType.PolishedBlackstoneBricks; + mappings[1075] = ItemType.PolishedBlackstoneBrickSlab; + mappings[1076] = ItemType.PolishedBlackstoneBrickStairs; + mappings[1077] = ItemType.CrackedPolishedBlackstoneBricks; + mappings[1078] = ItemType.RespawnAnchor; + mappings[1079] = ItemType.Candle; + mappings[1080] = ItemType.WhiteCandle; + mappings[1081] = ItemType.OrangeCandle; + mappings[1082] = ItemType.MagentaCandle; + mappings[1083] = ItemType.LightBlueCandle; + mappings[1084] = ItemType.YellowCandle; + mappings[1085] = ItemType.LimeCandle; + mappings[1086] = ItemType.PinkCandle; + mappings[1087] = ItemType.GrayCandle; + mappings[1088] = ItemType.LightGrayCandle; + mappings[1089] = ItemType.CyanCandle; + mappings[1090] = ItemType.PurpleCandle; + mappings[1091] = ItemType.BlueCandle; + mappings[1092] = ItemType.BrownCandle; + mappings[1093] = ItemType.GreenCandle; + mappings[1094] = ItemType.RedCandle; + mappings[1095] = ItemType.BlackCandle; + mappings[1096] = ItemType.SmallAmethystBud; + mappings[1097] = ItemType.MediumAmethystBud; + mappings[1098] = ItemType.LargeAmethystBud; + mappings[1099] = ItemType.AmethystCluster; + mappings[1100] = ItemType.PointedDripstone; + } + + protected override Dictionary GetDict() + { + return mappings; + } + } +} diff --git a/MinecraftClient/Inventory/ItemType.cs b/MinecraftClient/Inventory/ItemType.cs index ed37efff..062e93e3 100644 --- a/MinecraftClient/Inventory/ItemType.cs +++ b/MinecraftClient/Inventory/ItemType.cs @@ -14,7 +14,7 @@ namespace MinecraftClient.Inventory { Unknown = -2, // Unsupported item type (Forge mod custom item...) Null = -1, // Unspecified item type (Used in the network protocol) - + AcaciaBoat, AcaciaButton, AcaciaDoor, @@ -33,6 +33,9 @@ namespace MinecraftClient.Inventory ActivatorRail, Air, Allium, + AmethystBlock, + AmethystCluster, + AmethystShard, AncientDebris, Andesite, AndesiteSlab, @@ -42,6 +45,10 @@ namespace MinecraftClient.Inventory Apple, ArmorStand, Arrow, + AxolotlBucket, + AxolotlSpawnEgg, + Azalea, + AzaleaLeaves, AzureBluet, BakedPotato, Bamboo, @@ -51,14 +58,15 @@ namespace MinecraftClient.Inventory BatSpawnEgg, Beacon, Bedrock, - Beef, - Beehive, BeeNest, BeeSpawnEgg, + Beef, + Beehive, Beetroot, BeetrootSeeds, BeetrootSoup, Bell, + BigDripleaf, BirchBoat, BirchButton, BirchDoor, @@ -76,6 +84,7 @@ namespace MinecraftClient.Inventory BirchWood, BlackBanner, BlackBed, + BlackCandle, BlackCarpet, BlackConcrete, BlackConcretePowder, @@ -84,18 +93,19 @@ namespace MinecraftClient.Inventory BlackShulkerBox, BlackStainedGlass, BlackStainedGlassPane, + BlackTerracotta, + BlackWool, Blackstone, BlackstoneSlab, BlackstoneStairs, BlackstoneWall, - BlackTerracotta, - BlackWool, BlastFurnace, BlazePowder, BlazeRod, BlazeSpawnEgg, BlueBanner, BlueBed, + BlueCandle, BlueCarpet, BlueConcrete, BlueConcretePowder, @@ -121,12 +131,13 @@ namespace MinecraftClient.Inventory Bread, BrewingStand, Brick, - Bricks, BrickSlab, BrickStairs, BrickWall, + Bricks, BrownBanner, BrownBed, + BrownCandle, BrownCarpet, BrownConcrete, BrownConcretePowder, @@ -143,9 +154,13 @@ namespace MinecraftClient.Inventory BubbleCoralBlock, BubbleCoralFan, Bucket, + BuddingAmethyst, + Bundle, Cactus, Cake, + Calcite, Campfire, + Candle, Carrot, CarrotOnAStick, CartographyTable, @@ -165,6 +180,7 @@ namespace MinecraftClient.Inventory Chicken, ChickenSpawnEgg, ChippedAnvil, + ChiseledDeepslate, ChiseledNetherBricks, ChiseledPolishedBlackstone, ChiseledQuartzBlock, @@ -181,6 +197,10 @@ namespace MinecraftClient.Inventory CoalBlock, CoalOre, CoarseDirt, + CobbledDeepslate, + CobbledDeepslateSlab, + CobbledDeepslateStairs, + CobbledDeepslateWall, Cobblestone, CobblestoneSlab, CobblestoneStairs, @@ -204,8 +224,13 @@ namespace MinecraftClient.Inventory CookedRabbit, CookedSalmon, Cookie, + CopperBlock, + CopperIngot, + CopperOre, Cornflower, CowSpawnEgg, + CrackedDeepslateBricks, + CrackedDeepslateTiles, CrackedNetherBricks, CrackedPolishedBlackstoneBricks, CrackedStoneBricks, @@ -230,12 +255,16 @@ namespace MinecraftClient.Inventory CrimsonTrapdoor, Crossbow, CryingObsidian, + CutCopper, + CutCopperSlab, + CutCopperStairs, CutRedSandstone, CutRedSandstoneSlab, CutSandstone, CutSandstoneSlab, CyanBanner, CyanBed, + CyanCandle, CyanCarpet, CyanConcrete, CyanConcretePowder, @@ -284,6 +313,23 @@ namespace MinecraftClient.Inventory DeadTubeCoralBlock, DeadTubeCoralFan, DebugStick, + Deepslate, + DeepslateBrickSlab, + DeepslateBrickStairs, + DeepslateBrickWall, + DeepslateBricks, + DeepslateCoalOre, + DeepslateCopperOre, + DeepslateDiamondOre, + DeepslateEmeraldOre, + DeepslateGoldOre, + DeepslateIronOre, + DeepslateLapisOre, + DeepslateRedstoneOre, + DeepslateTileSlab, + DeepslateTileStairs, + DeepslateTileWall, + DeepslateTiles, DetectorRail, Diamond, DiamondAxe, @@ -311,6 +357,7 @@ namespace MinecraftClient.Inventory DragonHead, DriedKelp, DriedKelpBlock, + DripstoneBlock, Dropper, DrownedSpawnEgg, Egg, @@ -323,20 +370,24 @@ namespace MinecraftClient.Inventory EnchantedGoldenApple, EnchantingTable, EndCrystal, - EnderChest, - EnderEye, - EndermanSpawnEgg, - EndermiteSpawnEgg, - EnderPearl, EndPortalFrame, EndRod, EndStone, - EndStoneBricks, EndStoneBrickSlab, EndStoneBrickStairs, EndStoneBrickWall, + EndStoneBricks, + EnderChest, + EnderEye, + EnderPearl, + EndermanSpawnEgg, + EndermiteSpawnEgg, EvokerSpawnEgg, ExperienceBottle, + ExposedCopper, + ExposedCutCopper, + ExposedCutCopperSlab, + ExposedCutCopperStairs, Farmland, Feather, FermentedSpiderEye, @@ -354,6 +405,8 @@ namespace MinecraftClient.Inventory FlintAndSteel, FlowerBannerPattern, FlowerPot, + FloweringAzalea, + FloweringAzaleaLeaves, FoxSpawnEgg, Furnace, FurnaceMinecart, @@ -365,9 +418,18 @@ namespace MinecraftClient.Inventory GlassPane, GlisteringMelonSlice, GlobeBannerPattern, + GlowBerries, + GlowInkSac, + GlowItemFrame, + GlowLichen, + GlowSquidSpawnEgg, Glowstone, GlowstoneDust, + GoatSpawnEgg, GoldBlock, + GoldIngot, + GoldNugget, + GoldOre, GoldenApple, GoldenAxe, GoldenBoots, @@ -380,9 +442,6 @@ namespace MinecraftClient.Inventory GoldenPickaxe, GoldenShovel, GoldenSword, - GoldIngot, - GoldNugget, - GoldOre, Granite, GraniteSlab, GraniteStairs, @@ -393,6 +452,7 @@ namespace MinecraftClient.Inventory Gravel, GrayBanner, GrayBed, + GrayCandle, GrayCarpet, GrayConcrete, GrayConcretePowder, @@ -405,6 +465,7 @@ namespace MinecraftClient.Inventory GrayWool, GreenBanner, GreenBed, + GreenCandle, GreenCarpet, GreenConcrete, GreenConcretePowder, @@ -418,6 +479,7 @@ namespace MinecraftClient.Inventory Grindstone, GuardianSpawnEgg, Gunpowder, + HangingRoots, HayBlock, HeartOfTheSea, HeavyWeightedPressurePlate, @@ -437,6 +499,7 @@ namespace MinecraftClient.Inventory InfestedChiseledStoneBricks, InfestedCobblestone, InfestedCrackedStoneBricks, + InfestedDeepslate, InfestedMossyStoneBricks, InfestedStone, InfestedStoneBricks, @@ -484,6 +547,7 @@ namespace MinecraftClient.Inventory LapisBlock, LapisLazuli, LapisOre, + LargeAmethystBud, LargeFern, LavaBucket, Lead, @@ -495,8 +559,10 @@ namespace MinecraftClient.Inventory LeatherLeggings, Lectern, Lever, + Light, LightBlueBanner, LightBlueBed, + LightBlueCandle, LightBlueCarpet, LightBlueConcrete, LightBlueConcretePowder, @@ -509,6 +575,7 @@ namespace MinecraftClient.Inventory LightBlueWool, LightGrayBanner, LightGrayBed, + LightGrayCandle, LightGrayCarpet, LightGrayConcrete, LightGrayConcretePowder, @@ -520,11 +587,13 @@ namespace MinecraftClient.Inventory LightGrayTerracotta, LightGrayWool, LightWeightedPressurePlate, + LightningRod, Lilac, LilyOfTheValley, LilyPad, LimeBanner, LimeBed, + LimeCandle, LimeCarpet, LimeConcrete, LimeConcretePowder, @@ -541,6 +610,7 @@ namespace MinecraftClient.Inventory Loom, MagentaBanner, MagentaBed, + MagentaCandle, MagentaCarpet, MagentaConcrete, MagentaConcretePowder, @@ -555,6 +625,7 @@ namespace MinecraftClient.Inventory MagmaCream, MagmaCubeSpawnEgg, Map, + MediumAmethystBud, Melon, MelonSeeds, MelonSlice, @@ -562,14 +633,16 @@ namespace MinecraftClient.Inventory Minecart, MojangBannerPattern, MooshroomSpawnEgg, + MossBlock, + MossCarpet, MossyCobblestone, MossyCobblestoneSlab, MossyCobblestoneStairs, MossyCobblestoneWall, - MossyStoneBricks, MossyStoneBrickSlab, MossyStoneBrickStairs, MossyStoneBrickWall, + MossyStoneBricks, MuleSpawnEgg, MushroomStem, MushroomStew, @@ -581,6 +654,7 @@ namespace MinecraftClient.Inventory MusicDiscFar, MusicDiscMall, MusicDiscMellohi, + MusicDiscOtherside, MusicDiscPigstep, MusicDiscStal, MusicDiscStrad, @@ -592,11 +666,16 @@ namespace MinecraftClient.Inventory NautilusShell, NetherBrick, NetherBrickFence, - NetherBricks, NetherBrickSlab, NetherBrickStairs, NetherBrickWall, + NetherBricks, NetherGoldOre, + NetherQuartzOre, + NetherSprouts, + NetherStar, + NetherWart, + NetherWartBlock, NetheriteAxe, NetheriteBlock, NetheriteBoots, @@ -609,12 +688,7 @@ namespace MinecraftClient.Inventory NetheriteScrap, NetheriteShovel, NetheriteSword, - NetherQuartzOre, Netherrack, - NetherSprouts, - NetherStar, - NetherWart, - NetherWartBlock, NoteBlock, OakBoat, OakButton, @@ -636,6 +710,7 @@ namespace MinecraftClient.Inventory OcelotSpawnEgg, OrangeBanner, OrangeBed, + OrangeCandle, OrangeCarpet, OrangeConcrete, OrangeConcretePowder, @@ -648,6 +723,10 @@ namespace MinecraftClient.Inventory OrangeTulip, OrangeWool, OxeyeDaisy, + OxidizedCopper, + OxidizedCutCopper, + OxidizedCutCopperSlab, + OxidizedCutCopperStairs, PackedIce, Painting, PandaSpawnEgg, @@ -657,13 +736,14 @@ namespace MinecraftClient.Inventory PetrifiedOakSlab, PhantomMembrane, PhantomSpawnEgg, + PigSpawnEgg, PiglinBannerPattern, PiglinBruteSpawnEgg, PiglinSpawnEgg, - PigSpawnEgg, PillagerSpawnEgg, PinkBanner, PinkBed, + PinkCandle, PinkCarpet, PinkConcrete, PinkConcretePowder, @@ -678,6 +758,7 @@ namespace MinecraftClient.Inventory Piston, PlayerHead, Podzol, + PointedDripstone, PoisonousPotato, PolarBearSpawnEgg, PolishedAndesite, @@ -685,15 +766,19 @@ namespace MinecraftClient.Inventory PolishedAndesiteStairs, PolishedBasalt, PolishedBlackstone, - PolishedBlackstoneBricks, PolishedBlackstoneBrickSlab, PolishedBlackstoneBrickStairs, PolishedBlackstoneBrickWall, + PolishedBlackstoneBricks, PolishedBlackstoneButton, PolishedBlackstonePressurePlate, PolishedBlackstoneSlab, PolishedBlackstoneStairs, PolishedBlackstoneWall, + PolishedDeepslate, + PolishedDeepslateSlab, + PolishedDeepslateStairs, + PolishedDeepslateWall, PolishedDiorite, PolishedDioriteSlab, PolishedDioriteStairs, @@ -705,11 +790,12 @@ namespace MinecraftClient.Inventory Porkchop, Potato, Potion, + PowderSnowBucket, PoweredRail, Prismarine, - PrismarineBricks, PrismarineBrickSlab, PrismarineBrickStairs, + PrismarineBricks, PrismarineCrystals, PrismarineShard, PrismarineSlab, @@ -723,6 +809,7 @@ namespace MinecraftClient.Inventory PumpkinSeeds, PurpleBanner, PurpleBed, + PurpleCandle, PurpleCarpet, PurpleConcrete, PurpleConcretePowder, @@ -750,8 +837,15 @@ namespace MinecraftClient.Inventory RabbitStew, Rail, RavagerSpawnEgg, + RawCopper, + RawCopperBlock, + RawGold, + RawGoldBlock, + RawIron, + RawIronBlock, RedBanner, RedBed, + RedCandle, RedCarpet, RedConcrete, RedConcretePowder, @@ -759,10 +853,10 @@ namespace MinecraftClient.Inventory RedGlazedTerracotta, RedMushroom, RedMushroomBlock, - RedNetherBricks, RedNetherBrickSlab, RedNetherBrickStairs, RedNetherBrickWall, + RedNetherBricks, RedSand, RedSandstone, RedSandstoneSlab, @@ -771,17 +865,18 @@ namespace MinecraftClient.Inventory RedShulkerBox, RedStainedGlass, RedStainedGlassPane, + RedTerracotta, + RedTulip, + RedWool, Redstone, RedstoneBlock, RedstoneLamp, RedstoneOre, RedstoneTorch, - RedTerracotta, - RedTulip, - RedWool, Repeater, RepeatingCommandBlock, RespawnAnchor, + RootedDirt, RoseBush, RottenFlesh, Saddle, @@ -794,10 +889,11 @@ namespace MinecraftClient.Inventory SandstoneStairs, SandstoneWall, Scaffolding, + SculkSensor, Scute, - Seagrass, SeaLantern, SeaPickle, + Seagrass, Shears, SheepSpawnEgg, Shield, @@ -813,8 +909,11 @@ namespace MinecraftClient.Inventory SlimeBall, SlimeBlock, SlimeSpawnEgg, + SmallAmethystBud, + SmallDripleaf, SmithingTable, Smoker, + SmoothBasalt, SmoothQuartz, SmoothQuartzSlab, SmoothQuartzStairs, @@ -827,8 +926,8 @@ namespace MinecraftClient.Inventory SmoothStone, SmoothStoneSlab, Snow, - Snowball, SnowBlock, + Snowball, SoulCampfire, SoulLantern, SoulSand, @@ -840,6 +939,7 @@ namespace MinecraftClient.Inventory SpiderSpawnEgg, SplashPotion, Sponge, + SporeBlossom, SpruceBoat, SpruceButton, SpruceDoor, @@ -855,17 +955,17 @@ namespace MinecraftClient.Inventory SpruceStairs, SpruceTrapdoor, SpruceWood, + Spyglass, SquidSpawnEgg, Stick, StickyPiston, Stone, StoneAxe, - StoneBricks, StoneBrickSlab, StoneBrickStairs, StoneBrickWall, + StoneBricks, StoneButton, - Stonecutter, StoneHoe, StonePickaxe, StonePressurePlate, @@ -873,6 +973,7 @@ namespace MinecraftClient.Inventory StoneSlab, StoneStairs, StoneSword, + Stonecutter, StraySpawnEgg, StriderSpawnEgg, String, @@ -902,6 +1003,7 @@ namespace MinecraftClient.Inventory TallGrass, Target, Terracotta, + TintedGlass, TippedArrow, Tnt, TntMinecart, @@ -917,6 +1019,7 @@ namespace MinecraftClient.Inventory TubeCoral, TubeCoralBlock, TubeCoralFan, + Tuff, TurtleEgg, TurtleHelmet, TurtleSpawnEgg, @@ -944,12 +1047,33 @@ namespace MinecraftClient.Inventory WarpedTrapdoor, WarpedWartBlock, WaterBucket, + WaxedCopperBlock, + WaxedCutCopper, + WaxedCutCopperSlab, + WaxedCutCopperStairs, + WaxedExposedCopper, + WaxedExposedCutCopper, + WaxedExposedCutCopperSlab, + WaxedExposedCutCopperStairs, + WaxedOxidizedCopper, + WaxedOxidizedCutCopper, + WaxedOxidizedCutCopperSlab, + WaxedOxidizedCutCopperStairs, + WaxedWeatheredCopper, + WaxedWeatheredCutCopper, + WaxedWeatheredCutCopperSlab, + WaxedWeatheredCutCopperStairs, + WeatheredCopper, + WeatheredCutCopper, + WeatheredCutCopperSlab, + WeatheredCutCopperStairs, WeepingVines, WetSponge, Wheat, WheatSeeds, WhiteBanner, WhiteBed, + WhiteCandle, WhiteCarpet, WhiteConcrete, WhiteConcretePowder, @@ -975,6 +1099,7 @@ namespace MinecraftClient.Inventory WrittenBook, YellowBanner, YellowBed, + YellowCandle, YellowCarpet, YellowConcrete, YellowConcretePowder, diff --git a/MinecraftClient/Inventory/ItemTypeExtensions.cs b/MinecraftClient/Inventory/ItemTypeExtensions.cs index 09d9b8e4..5c1c8ac4 100644 --- a/MinecraftClient/Inventory/ItemTypeExtensions.cs +++ b/MinecraftClient/Inventory/ItemTypeExtensions.cs @@ -50,11 +50,13 @@ namespace MinecraftClient.Inventory ItemType[] t = { ItemType.AcaciaBoat, + ItemType.AxolotlBucket, ItemType.BirchBoat, ItemType.BlackBed, ItemType.BlackShulkerBox, ItemType.BlueBed, ItemType.BlueShulkerBox, + ItemType.Bundle, ItemType.Bow, ItemType.BrownBed, ItemType.BrownShulkerBox, @@ -142,6 +144,7 @@ namespace MinecraftClient.Inventory ItemType.MusicDiscFar, ItemType.MusicDiscMall, ItemType.MusicDiscMellohi, + ItemType.MusicDiscOtherside, ItemType.MusicDiscStal, ItemType.MusicDiscStrad, ItemType.MusicDiscWait, @@ -152,6 +155,7 @@ namespace MinecraftClient.Inventory ItemType.PinkBed, ItemType.PinkShulkerBox, ItemType.Potion, + ItemType.PowderSnowBucket, ItemType.PufferfishBucket, ItemType.PurpleBed, ItemType.PurpleShulkerBox, @@ -166,6 +170,7 @@ namespace MinecraftClient.Inventory ItemType.SkullBannerPattern, ItemType.SplashPotion, ItemType.SpruceBoat, + ItemType.Spyglass, ItemType.StoneAxe, ItemType.StoneHoe, ItemType.StonePickaxe, diff --git a/MinecraftClient/Mapping/BlockPalettes/BlockPaletteGenerator.cs b/MinecraftClient/Mapping/BlockPalettes/BlockPaletteGenerator.cs index 5dca47a3..831b3abe 100644 --- a/MinecraftClient/Mapping/BlockPalettes/BlockPaletteGenerator.cs +++ b/MinecraftClient/Mapping/BlockPalettes/BlockPaletteGenerator.cs @@ -23,6 +23,17 @@ namespace MinecraftClient.Mapping.BlockPalettes /// public static class BlockPaletteGenerator { + /// + /// Generate mapping from Minecraft blocks.json + /// + /// path to blocks.json + /// java -cp minecraft_server.jar net.minecraft.data.Main --reports + /// state => block name mappings + public static void GenerateBlockPalette(string blocksJsonFile) + { + BlockPaletteGenerator.JsonToClass(blocksJsonFile, "Palette", "Material"); + } + /// /// Generate mapping from Minecraft blocks.json /// @@ -33,6 +44,9 @@ namespace MinecraftClient.Mapping.BlockPalettes /// state => block name mappings public static void JsonToClass(string blocksJsonFile, string outputClass, string outputEnum = null) { + string outputPalettePath = Path.Combine(Path.GetDirectoryName(blocksJsonFile), outputClass + "XXX.cs"); + string outputEnumPath = Path.Combine(Path.GetDirectoryName(blocksJsonFile), outputEnum + "XXX.cs"); + HashSet knownStates = new HashSet(); Dictionary> blocks = new Dictionary>(); @@ -70,7 +84,7 @@ namespace MinecraftClient.Mapping.BlockPalettes "", "namespace MinecraftClient.Mapping.BlockPalettes", "{", - " public class PaletteXXX : PaletteMapping", + " public class PaletteXXX : BlockPalette", " {", " private static Dictionary materials = new Dictionary();", "", @@ -121,7 +135,7 @@ namespace MinecraftClient.Mapping.BlockPalettes "}" }); - File.WriteAllLines(outputClass, outFile); + File.WriteAllLines(outputPalettePath, outFile); if (outputEnum != null) { @@ -138,7 +152,7 @@ namespace MinecraftClient.Mapping.BlockPalettes " }", "}" }); - File.WriteAllLines(outputEnum, outFile); + File.WriteAllLines(outputEnumPath, outFile); } } } diff --git a/MinecraftClient/Mapping/BlockPalettes/Palette117.cs b/MinecraftClient/Mapping/BlockPalettes/Palette117.cs new file mode 100644 index 00000000..6a8f78c6 --- /dev/null +++ b/MinecraftClient/Mapping/BlockPalettes/Palette117.cs @@ -0,0 +1,1468 @@ +using System; +using System.Collections.Generic; + +namespace MinecraftClient.Mapping.BlockPalettes +{ + public class Palette117 : BlockPalette + { + private static Dictionary materials = new Dictionary(); + + static Palette117() + { + materials[0] = Material.Air; + materials[1] = Material.Stone; + materials[2] = Material.Granite; + materials[3] = Material.PolishedGranite; + materials[4] = Material.Diorite; + materials[5] = Material.PolishedDiorite; + materials[6] = Material.Andesite; + materials[7] = Material.PolishedAndesite; + for (int i = 8; i <= 9; i++) + materials[i] = Material.GrassBlock; + materials[10] = Material.Dirt; + materials[11] = Material.CoarseDirt; + for (int i = 12; i <= 13; i++) + materials[i] = Material.Podzol; + materials[14] = Material.Cobblestone; + materials[15] = Material.OakPlanks; + materials[16] = Material.SprucePlanks; + materials[17] = Material.BirchPlanks; + materials[18] = Material.JunglePlanks; + materials[19] = Material.AcaciaPlanks; + materials[20] = Material.DarkOakPlanks; + for (int i = 21; i <= 22; i++) + materials[i] = Material.OakSapling; + for (int i = 23; i <= 24; i++) + materials[i] = Material.SpruceSapling; + for (int i = 25; i <= 26; i++) + materials[i] = Material.BirchSapling; + for (int i = 27; i <= 28; i++) + materials[i] = Material.JungleSapling; + for (int i = 29; i <= 30; i++) + materials[i] = Material.AcaciaSapling; + for (int i = 31; i <= 32; i++) + materials[i] = Material.DarkOakSapling; + materials[33] = Material.Bedrock; + for (int i = 34; i <= 49; i++) + materials[i] = Material.Water; + for (int i = 50; i <= 65; i++) + materials[i] = Material.Lava; + materials[66] = Material.Sand; + materials[67] = Material.RedSand; + materials[68] = Material.Gravel; + materials[69] = Material.GoldOre; + materials[70] = Material.DeepslateGoldOre; + materials[71] = Material.IronOre; + materials[72] = Material.DeepslateIronOre; + materials[73] = Material.CoalOre; + materials[74] = Material.DeepslateCoalOre; + materials[75] = Material.NetherGoldOre; + for (int i = 76; i <= 78; i++) + materials[i] = Material.OakLog; + for (int i = 79; i <= 81; i++) + materials[i] = Material.SpruceLog; + for (int i = 82; i <= 84; i++) + materials[i] = Material.BirchLog; + for (int i = 85; i <= 87; i++) + materials[i] = Material.JungleLog; + for (int i = 88; i <= 90; i++) + materials[i] = Material.AcaciaLog; + for (int i = 91; i <= 93; i++) + materials[i] = Material.DarkOakLog; + for (int i = 94; i <= 96; i++) + materials[i] = Material.StrippedSpruceLog; + for (int i = 97; i <= 99; i++) + materials[i] = Material.StrippedBirchLog; + for (int i = 100; i <= 102; i++) + materials[i] = Material.StrippedJungleLog; + for (int i = 103; i <= 105; i++) + materials[i] = Material.StrippedAcaciaLog; + for (int i = 106; i <= 108; i++) + materials[i] = Material.StrippedDarkOakLog; + for (int i = 109; i <= 111; i++) + materials[i] = Material.StrippedOakLog; + for (int i = 112; i <= 114; i++) + materials[i] = Material.OakWood; + for (int i = 115; i <= 117; i++) + materials[i] = Material.SpruceWood; + for (int i = 118; i <= 120; i++) + materials[i] = Material.BirchWood; + for (int i = 121; i <= 123; i++) + materials[i] = Material.JungleWood; + for (int i = 124; i <= 126; i++) + materials[i] = Material.AcaciaWood; + for (int i = 127; i <= 129; i++) + materials[i] = Material.DarkOakWood; + for (int i = 130; i <= 132; i++) + materials[i] = Material.StrippedOakWood; + for (int i = 133; i <= 135; i++) + materials[i] = Material.StrippedSpruceWood; + for (int i = 136; i <= 138; i++) + materials[i] = Material.StrippedBirchWood; + for (int i = 139; i <= 141; i++) + materials[i] = Material.StrippedJungleWood; + for (int i = 142; i <= 144; i++) + materials[i] = Material.StrippedAcaciaWood; + for (int i = 145; i <= 147; i++) + materials[i] = Material.StrippedDarkOakWood; + for (int i = 148; i <= 161; i++) + materials[i] = Material.OakLeaves; + for (int i = 162; i <= 175; i++) + materials[i] = Material.SpruceLeaves; + for (int i = 176; i <= 189; i++) + materials[i] = Material.BirchLeaves; + for (int i = 190; i <= 203; i++) + materials[i] = Material.JungleLeaves; + for (int i = 204; i <= 217; i++) + materials[i] = Material.AcaciaLeaves; + for (int i = 218; i <= 231; i++) + materials[i] = Material.DarkOakLeaves; + for (int i = 232; i <= 245; i++) + materials[i] = Material.AzaleaLeaves; + for (int i = 246; i <= 259; i++) + materials[i] = Material.FloweringAzaleaLeaves; + materials[260] = Material.Sponge; + materials[261] = Material.WetSponge; + materials[262] = Material.Glass; + materials[263] = Material.LapisOre; + materials[264] = Material.DeepslateLapisOre; + materials[265] = Material.LapisBlock; + for (int i = 266; i <= 277; i++) + materials[i] = Material.Dispenser; + materials[278] = Material.Sandstone; + materials[279] = Material.ChiseledSandstone; + materials[280] = Material.CutSandstone; + for (int i = 281; i <= 1080; i++) + materials[i] = Material.NoteBlock; + for (int i = 1081; i <= 1096; i++) + materials[i] = Material.WhiteBed; + for (int i = 1097; i <= 1112; i++) + materials[i] = Material.OrangeBed; + for (int i = 1113; i <= 1128; i++) + materials[i] = Material.MagentaBed; + for (int i = 1129; i <= 1144; i++) + materials[i] = Material.LightBlueBed; + for (int i = 1145; i <= 1160; i++) + materials[i] = Material.YellowBed; + for (int i = 1161; i <= 1176; i++) + materials[i] = Material.LimeBed; + for (int i = 1177; i <= 1192; i++) + materials[i] = Material.PinkBed; + for (int i = 1193; i <= 1208; i++) + materials[i] = Material.GrayBed; + for (int i = 1209; i <= 1224; i++) + materials[i] = Material.LightGrayBed; + for (int i = 1225; i <= 1240; i++) + materials[i] = Material.CyanBed; + for (int i = 1241; i <= 1256; i++) + materials[i] = Material.PurpleBed; + for (int i = 1257; i <= 1272; i++) + materials[i] = Material.BlueBed; + for (int i = 1273; i <= 1288; i++) + materials[i] = Material.BrownBed; + for (int i = 1289; i <= 1304; i++) + materials[i] = Material.GreenBed; + for (int i = 1305; i <= 1320; i++) + materials[i] = Material.RedBed; + for (int i = 1321; i <= 1336; i++) + materials[i] = Material.BlackBed; + for (int i = 1337; i <= 1360; i++) + materials[i] = Material.PoweredRail; + for (int i = 1361; i <= 1384; i++) + materials[i] = Material.DetectorRail; + for (int i = 1385; i <= 1396; i++) + materials[i] = Material.StickyPiston; + materials[1397] = Material.Cobweb; + materials[1398] = Material.Grass; + materials[1399] = Material.Fern; + materials[1400] = Material.DeadBush; + materials[1401] = Material.Seagrass; + for (int i = 1402; i <= 1403; i++) + materials[i] = Material.TallSeagrass; + for (int i = 1404; i <= 1415; i++) + materials[i] = Material.Piston; + for (int i = 1416; i <= 1439; i++) + materials[i] = Material.PistonHead; + materials[1440] = Material.WhiteWool; + materials[1441] = Material.OrangeWool; + materials[1442] = Material.MagentaWool; + materials[1443] = Material.LightBlueWool; + materials[1444] = Material.YellowWool; + materials[1445] = Material.LimeWool; + materials[1446] = Material.PinkWool; + materials[1447] = Material.GrayWool; + materials[1448] = Material.LightGrayWool; + materials[1449] = Material.CyanWool; + materials[1450] = Material.PurpleWool; + materials[1451] = Material.BlueWool; + materials[1452] = Material.BrownWool; + materials[1453] = Material.GreenWool; + materials[1454] = Material.RedWool; + materials[1455] = Material.BlackWool; + for (int i = 1456; i <= 1467; i++) + materials[i] = Material.MovingPiston; + materials[1468] = Material.Dandelion; + materials[1469] = Material.Poppy; + materials[1470] = Material.BlueOrchid; + materials[1471] = Material.Allium; + materials[1472] = Material.AzureBluet; + materials[1473] = Material.RedTulip; + materials[1474] = Material.OrangeTulip; + materials[1475] = Material.WhiteTulip; + materials[1476] = Material.PinkTulip; + materials[1477] = Material.OxeyeDaisy; + materials[1478] = Material.Cornflower; + materials[1479] = Material.WitherRose; + materials[1480] = Material.LilyOfTheValley; + materials[1481] = Material.BrownMushroom; + materials[1482] = Material.RedMushroom; + materials[1483] = Material.GoldBlock; + materials[1484] = Material.IronBlock; + materials[1485] = Material.Bricks; + for (int i = 1486; i <= 1487; i++) + materials[i] = Material.Tnt; + materials[1488] = Material.Bookshelf; + materials[1489] = Material.MossyCobblestone; + materials[1490] = Material.Obsidian; + materials[1491] = Material.Torch; + for (int i = 1492; i <= 1495; i++) + materials[i] = Material.WallTorch; + for (int i = 1496; i <= 2007; i++) + materials[i] = Material.Fire; + materials[2008] = Material.SoulFire; + materials[2009] = Material.Spawner; + for (int i = 2010; i <= 2089; i++) + materials[i] = Material.OakStairs; + for (int i = 2090; i <= 2113; i++) + materials[i] = Material.Chest; + for (int i = 2114; i <= 3409; i++) + materials[i] = Material.RedstoneWire; + materials[3410] = Material.DiamondOre; + materials[3411] = Material.DeepslateDiamondOre; + materials[3412] = Material.DiamondBlock; + materials[3413] = Material.CraftingTable; + for (int i = 3414; i <= 3421; i++) + materials[i] = Material.Wheat; + for (int i = 3422; i <= 3429; i++) + materials[i] = Material.Farmland; + for (int i = 3430; i <= 3437; i++) + materials[i] = Material.Furnace; + for (int i = 3438; i <= 3469; i++) + materials[i] = Material.OakSign; + for (int i = 3470; i <= 3501; i++) + materials[i] = Material.SpruceSign; + for (int i = 3502; i <= 3533; i++) + materials[i] = Material.BirchSign; + for (int i = 3534; i <= 3565; i++) + materials[i] = Material.AcaciaSign; + for (int i = 3566; i <= 3597; i++) + materials[i] = Material.JungleSign; + for (int i = 3598; i <= 3629; i++) + materials[i] = Material.DarkOakSign; + for (int i = 3630; i <= 3693; i++) + materials[i] = Material.OakDoor; + for (int i = 3694; i <= 3701; i++) + materials[i] = Material.Ladder; + for (int i = 3702; i <= 3721; i++) + materials[i] = Material.Rail; + for (int i = 3722; i <= 3801; i++) + materials[i] = Material.CobblestoneStairs; + for (int i = 3802; i <= 3809; i++) + materials[i] = Material.OakWallSign; + for (int i = 3810; i <= 3817; i++) + materials[i] = Material.SpruceWallSign; + for (int i = 3818; i <= 3825; i++) + materials[i] = Material.BirchWallSign; + for (int i = 3826; i <= 3833; i++) + materials[i] = Material.AcaciaWallSign; + for (int i = 3834; i <= 3841; i++) + materials[i] = Material.JungleWallSign; + for (int i = 3842; i <= 3849; i++) + materials[i] = Material.DarkOakWallSign; + for (int i = 3850; i <= 3873; i++) + materials[i] = Material.Lever; + for (int i = 3874; i <= 3875; i++) + materials[i] = Material.StonePressurePlate; + for (int i = 3876; i <= 3939; i++) + materials[i] = Material.IronDoor; + for (int i = 3940; i <= 3941; i++) + materials[i] = Material.OakPressurePlate; + for (int i = 3942; i <= 3943; i++) + materials[i] = Material.SprucePressurePlate; + for (int i = 3944; i <= 3945; i++) + materials[i] = Material.BirchPressurePlate; + for (int i = 3946; i <= 3947; i++) + materials[i] = Material.JunglePressurePlate; + for (int i = 3948; i <= 3949; i++) + materials[i] = Material.AcaciaPressurePlate; + for (int i = 3950; i <= 3951; i++) + materials[i] = Material.DarkOakPressurePlate; + for (int i = 3952; i <= 3953; i++) + materials[i] = Material.RedstoneOre; + for (int i = 3954; i <= 3955; i++) + materials[i] = Material.DeepslateRedstoneOre; + for (int i = 3956; i <= 3957; i++) + materials[i] = Material.RedstoneTorch; + for (int i = 3958; i <= 3965; i++) + materials[i] = Material.RedstoneWallTorch; + for (int i = 3966; i <= 3989; i++) + materials[i] = Material.StoneButton; + for (int i = 3990; i <= 3997; i++) + materials[i] = Material.Snow; + materials[3998] = Material.Ice; + materials[3999] = Material.SnowBlock; + for (int i = 4000; i <= 4015; i++) + materials[i] = Material.Cactus; + materials[4016] = Material.Clay; + for (int i = 4017; i <= 4032; i++) + materials[i] = Material.SugarCane; + for (int i = 4033; i <= 4034; i++) + materials[i] = Material.Jukebox; + for (int i = 4035; i <= 4066; i++) + materials[i] = Material.OakFence; + materials[4067] = Material.Pumpkin; + materials[4068] = Material.Netherrack; + materials[4069] = Material.SoulSand; + materials[4070] = Material.SoulSoil; + for (int i = 4071; i <= 4073; i++) + materials[i] = Material.Basalt; + for (int i = 4074; i <= 4076; i++) + materials[i] = Material.PolishedBasalt; + materials[4077] = Material.SoulTorch; + for (int i = 4078; i <= 4081; i++) + materials[i] = Material.SoulWallTorch; + materials[4082] = Material.Glowstone; + for (int i = 4083; i <= 4084; i++) + materials[i] = Material.NetherPortal; + for (int i = 4085; i <= 4088; i++) + materials[i] = Material.CarvedPumpkin; + for (int i = 4089; i <= 4092; i++) + materials[i] = Material.JackOLantern; + for (int i = 4093; i <= 4099; i++) + materials[i] = Material.Cake; + for (int i = 4100; i <= 4163; i++) + materials[i] = Material.Repeater; + materials[4164] = Material.WhiteStainedGlass; + materials[4165] = Material.OrangeStainedGlass; + materials[4166] = Material.MagentaStainedGlass; + materials[4167] = Material.LightBlueStainedGlass; + materials[4168] = Material.YellowStainedGlass; + materials[4169] = Material.LimeStainedGlass; + materials[4170] = Material.PinkStainedGlass; + materials[4171] = Material.GrayStainedGlass; + materials[4172] = Material.LightGrayStainedGlass; + materials[4173] = Material.CyanStainedGlass; + materials[4174] = Material.PurpleStainedGlass; + materials[4175] = Material.BlueStainedGlass; + materials[4176] = Material.BrownStainedGlass; + materials[4177] = Material.GreenStainedGlass; + materials[4178] = Material.RedStainedGlass; + materials[4179] = Material.BlackStainedGlass; + for (int i = 4180; i <= 4243; i++) + materials[i] = Material.OakTrapdoor; + for (int i = 4244; i <= 4307; i++) + materials[i] = Material.SpruceTrapdoor; + for (int i = 4308; i <= 4371; i++) + materials[i] = Material.BirchTrapdoor; + for (int i = 4372; i <= 4435; i++) + materials[i] = Material.JungleTrapdoor; + for (int i = 4436; i <= 4499; i++) + materials[i] = Material.AcaciaTrapdoor; + for (int i = 4500; i <= 4563; i++) + materials[i] = Material.DarkOakTrapdoor; + materials[4564] = Material.StoneBricks; + materials[4565] = Material.MossyStoneBricks; + materials[4566] = Material.CrackedStoneBricks; + materials[4567] = Material.ChiseledStoneBricks; + materials[4568] = Material.InfestedStone; + materials[4569] = Material.InfestedCobblestone; + materials[4570] = Material.InfestedStoneBricks; + materials[4571] = Material.InfestedMossyStoneBricks; + materials[4572] = Material.InfestedCrackedStoneBricks; + materials[4573] = Material.InfestedChiseledStoneBricks; + for (int i = 4574; i <= 4637; i++) + materials[i] = Material.BrownMushroomBlock; + for (int i = 4638; i <= 4701; i++) + materials[i] = Material.RedMushroomBlock; + for (int i = 4702; i <= 4765; i++) + materials[i] = Material.MushroomStem; + for (int i = 4766; i <= 4797; i++) + materials[i] = Material.IronBars; + for (int i = 4798; i <= 4803; i++) + materials[i] = Material.Chain; + for (int i = 4804; i <= 4835; i++) + materials[i] = Material.GlassPane; + materials[4836] = Material.Melon; + for (int i = 4837; i <= 4840; i++) + materials[i] = Material.AttachedPumpkinStem; + for (int i = 4841; i <= 4844; i++) + materials[i] = Material.AttachedMelonStem; + for (int i = 4845; i <= 4852; i++) + materials[i] = Material.PumpkinStem; + for (int i = 4853; i <= 4860; i++) + materials[i] = Material.MelonStem; + for (int i = 4861; i <= 4892; i++) + materials[i] = Material.Vine; + for (int i = 4893; i <= 5020; i++) + materials[i] = Material.GlowLichen; + for (int i = 5021; i <= 5052; i++) + materials[i] = Material.OakFenceGate; + for (int i = 5053; i <= 5132; i++) + materials[i] = Material.BrickStairs; + for (int i = 5133; i <= 5212; i++) + materials[i] = Material.StoneBrickStairs; + for (int i = 5213; i <= 5214; i++) + materials[i] = Material.Mycelium; + materials[5215] = Material.LilyPad; + materials[5216] = Material.NetherBricks; + for (int i = 5217; i <= 5248; i++) + materials[i] = Material.NetherBrickFence; + for (int i = 5249; i <= 5328; i++) + materials[i] = Material.NetherBrickStairs; + for (int i = 5329; i <= 5332; i++) + materials[i] = Material.NetherWart; + materials[5333] = Material.EnchantingTable; + for (int i = 5334; i <= 5341; i++) + materials[i] = Material.BrewingStand; + materials[5342] = Material.Cauldron; + for (int i = 5343; i <= 5345; i++) + materials[i] = Material.WaterCauldron; + materials[5346] = Material.LavaCauldron; + for (int i = 5347; i <= 5349; i++) + materials[i] = Material.PowderSnowCauldron; + materials[5350] = Material.EndPortal; + for (int i = 5351; i <= 5358; i++) + materials[i] = Material.EndPortalFrame; + materials[5359] = Material.EndStone; + materials[5360] = Material.DragonEgg; + for (int i = 5361; i <= 5362; i++) + materials[i] = Material.RedstoneLamp; + for (int i = 5363; i <= 5374; i++) + materials[i] = Material.Cocoa; + for (int i = 5375; i <= 5454; i++) + materials[i] = Material.SandstoneStairs; + materials[5455] = Material.EmeraldOre; + materials[5456] = Material.DeepslateEmeraldOre; + for (int i = 5457; i <= 5464; i++) + materials[i] = Material.EnderChest; + for (int i = 5465; i <= 5480; i++) + materials[i] = Material.TripwireHook; + for (int i = 5481; i <= 5608; i++) + materials[i] = Material.Tripwire; + materials[5609] = Material.EmeraldBlock; + for (int i = 5610; i <= 5689; i++) + materials[i] = Material.SpruceStairs; + for (int i = 5690; i <= 5769; i++) + materials[i] = Material.BirchStairs; + for (int i = 5770; i <= 5849; i++) + materials[i] = Material.JungleStairs; + for (int i = 5850; i <= 5861; i++) + materials[i] = Material.CommandBlock; + materials[5862] = Material.Beacon; + for (int i = 5863; i <= 6186; i++) + materials[i] = Material.CobblestoneWall; + for (int i = 6187; i <= 6510; i++) + materials[i] = Material.MossyCobblestoneWall; + materials[6511] = Material.FlowerPot; + materials[6512] = Material.PottedOakSapling; + materials[6513] = Material.PottedSpruceSapling; + materials[6514] = Material.PottedBirchSapling; + materials[6515] = Material.PottedJungleSapling; + materials[6516] = Material.PottedAcaciaSapling; + materials[6517] = Material.PottedDarkOakSapling; + materials[6518] = Material.PottedFern; + materials[6519] = Material.PottedDandelion; + materials[6520] = Material.PottedPoppy; + materials[6521] = Material.PottedBlueOrchid; + materials[6522] = Material.PottedAllium; + materials[6523] = Material.PottedAzureBluet; + materials[6524] = Material.PottedRedTulip; + materials[6525] = Material.PottedOrangeTulip; + materials[6526] = Material.PottedWhiteTulip; + materials[6527] = Material.PottedPinkTulip; + materials[6528] = Material.PottedOxeyeDaisy; + materials[6529] = Material.PottedCornflower; + materials[6530] = Material.PottedLilyOfTheValley; + materials[6531] = Material.PottedWitherRose; + materials[6532] = Material.PottedRedMushroom; + materials[6533] = Material.PottedBrownMushroom; + materials[6534] = Material.PottedDeadBush; + materials[6535] = Material.PottedCactus; + for (int i = 6536; i <= 6543; i++) + materials[i] = Material.Carrots; + for (int i = 6544; i <= 6551; i++) + materials[i] = Material.Potatoes; + for (int i = 6552; i <= 6575; i++) + materials[i] = Material.OakButton; + for (int i = 6576; i <= 6599; i++) + materials[i] = Material.SpruceButton; + for (int i = 6600; i <= 6623; i++) + materials[i] = Material.BirchButton; + for (int i = 6624; i <= 6647; i++) + materials[i] = Material.JungleButton; + for (int i = 6648; i <= 6671; i++) + materials[i] = Material.AcaciaButton; + for (int i = 6672; i <= 6695; i++) + materials[i] = Material.DarkOakButton; + for (int i = 6696; i <= 6711; i++) + materials[i] = Material.SkeletonSkull; + for (int i = 6712; i <= 6715; i++) + materials[i] = Material.SkeletonWallSkull; + for (int i = 6716; i <= 6731; i++) + materials[i] = Material.WitherSkeletonSkull; + for (int i = 6732; i <= 6735; i++) + materials[i] = Material.WitherSkeletonWallSkull; + for (int i = 6736; i <= 6751; i++) + materials[i] = Material.ZombieHead; + for (int i = 6752; i <= 6755; i++) + materials[i] = Material.ZombieWallHead; + for (int i = 6756; i <= 6771; i++) + materials[i] = Material.PlayerHead; + for (int i = 6772; i <= 6775; i++) + materials[i] = Material.PlayerWallHead; + for (int i = 6776; i <= 6791; i++) + materials[i] = Material.CreeperHead; + for (int i = 6792; i <= 6795; i++) + materials[i] = Material.CreeperWallHead; + for (int i = 6796; i <= 6811; i++) + materials[i] = Material.DragonHead; + for (int i = 6812; i <= 6815; i++) + materials[i] = Material.DragonWallHead; + for (int i = 6816; i <= 6819; i++) + materials[i] = Material.Anvil; + for (int i = 6820; i <= 6823; i++) + materials[i] = Material.ChippedAnvil; + for (int i = 6824; i <= 6827; i++) + materials[i] = Material.DamagedAnvil; + for (int i = 6828; i <= 6851; i++) + materials[i] = Material.TrappedChest; + for (int i = 6852; i <= 6867; i++) + materials[i] = Material.LightWeightedPressurePlate; + for (int i = 6868; i <= 6883; i++) + materials[i] = Material.HeavyWeightedPressurePlate; + for (int i = 6884; i <= 6899; i++) + materials[i] = Material.Comparator; + for (int i = 6900; i <= 6931; i++) + materials[i] = Material.DaylightDetector; + materials[6932] = Material.RedstoneBlock; + materials[6933] = Material.NetherQuartzOre; + for (int i = 6934; i <= 6943; i++) + materials[i] = Material.Hopper; + materials[6944] = Material.QuartzBlock; + materials[6945] = Material.ChiseledQuartzBlock; + for (int i = 6946; i <= 6948; i++) + materials[i] = Material.QuartzPillar; + for (int i = 6949; i <= 7028; i++) + materials[i] = Material.QuartzStairs; + for (int i = 7029; i <= 7052; i++) + materials[i] = Material.ActivatorRail; + for (int i = 7053; i <= 7064; i++) + materials[i] = Material.Dropper; + materials[7065] = Material.WhiteTerracotta; + materials[7066] = Material.OrangeTerracotta; + materials[7067] = Material.MagentaTerracotta; + materials[7068] = Material.LightBlueTerracotta; + materials[7069] = Material.YellowTerracotta; + materials[7070] = Material.LimeTerracotta; + materials[7071] = Material.PinkTerracotta; + materials[7072] = Material.GrayTerracotta; + materials[7073] = Material.LightGrayTerracotta; + materials[7074] = Material.CyanTerracotta; + materials[7075] = Material.PurpleTerracotta; + materials[7076] = Material.BlueTerracotta; + materials[7077] = Material.BrownTerracotta; + materials[7078] = Material.GreenTerracotta; + materials[7079] = Material.RedTerracotta; + materials[7080] = Material.BlackTerracotta; + for (int i = 7081; i <= 7112; i++) + materials[i] = Material.WhiteStainedGlassPane; + for (int i = 7113; i <= 7144; i++) + materials[i] = Material.OrangeStainedGlassPane; + for (int i = 7145; i <= 7176; i++) + materials[i] = Material.MagentaStainedGlassPane; + for (int i = 7177; i <= 7208; i++) + materials[i] = Material.LightBlueStainedGlassPane; + for (int i = 7209; i <= 7240; i++) + materials[i] = Material.YellowStainedGlassPane; + for (int i = 7241; i <= 7272; i++) + materials[i] = Material.LimeStainedGlassPane; + for (int i = 7273; i <= 7304; i++) + materials[i] = Material.PinkStainedGlassPane; + for (int i = 7305; i <= 7336; i++) + materials[i] = Material.GrayStainedGlassPane; + for (int i = 7337; i <= 7368; i++) + materials[i] = Material.LightGrayStainedGlassPane; + for (int i = 7369; i <= 7400; i++) + materials[i] = Material.CyanStainedGlassPane; + for (int i = 7401; i <= 7432; i++) + materials[i] = Material.PurpleStainedGlassPane; + for (int i = 7433; i <= 7464; i++) + materials[i] = Material.BlueStainedGlassPane; + for (int i = 7465; i <= 7496; i++) + materials[i] = Material.BrownStainedGlassPane; + for (int i = 7497; i <= 7528; i++) + materials[i] = Material.GreenStainedGlassPane; + for (int i = 7529; i <= 7560; i++) + materials[i] = Material.RedStainedGlassPane; + for (int i = 7561; i <= 7592; i++) + materials[i] = Material.BlackStainedGlassPane; + for (int i = 7593; i <= 7672; i++) + materials[i] = Material.AcaciaStairs; + for (int i = 7673; i <= 7752; i++) + materials[i] = Material.DarkOakStairs; + materials[7753] = Material.SlimeBlock; + materials[7754] = Material.Barrier; + for (int i = 7755; i <= 7786; i++) + materials[i] = Material.Light; + for (int i = 7787; i <= 7850; i++) + materials[i] = Material.IronTrapdoor; + materials[7851] = Material.Prismarine; + materials[7852] = Material.PrismarineBricks; + materials[7853] = Material.DarkPrismarine; + for (int i = 7854; i <= 7933; i++) + materials[i] = Material.PrismarineStairs; + for (int i = 7934; i <= 8013; i++) + materials[i] = Material.PrismarineBrickStairs; + for (int i = 8014; i <= 8093; i++) + materials[i] = Material.DarkPrismarineStairs; + for (int i = 8094; i <= 8099; i++) + materials[i] = Material.PrismarineSlab; + for (int i = 8100; i <= 8105; i++) + materials[i] = Material.PrismarineBrickSlab; + for (int i = 8106; i <= 8111; i++) + materials[i] = Material.DarkPrismarineSlab; + materials[8112] = Material.SeaLantern; + for (int i = 8113; i <= 8115; i++) + materials[i] = Material.HayBlock; + materials[8116] = Material.WhiteCarpet; + materials[8117] = Material.OrangeCarpet; + materials[8118] = Material.MagentaCarpet; + materials[8119] = Material.LightBlueCarpet; + materials[8120] = Material.YellowCarpet; + materials[8121] = Material.LimeCarpet; + materials[8122] = Material.PinkCarpet; + materials[8123] = Material.GrayCarpet; + materials[8124] = Material.LightGrayCarpet; + materials[8125] = Material.CyanCarpet; + materials[8126] = Material.PurpleCarpet; + materials[8127] = Material.BlueCarpet; + materials[8128] = Material.BrownCarpet; + materials[8129] = Material.GreenCarpet; + materials[8130] = Material.RedCarpet; + materials[8131] = Material.BlackCarpet; + materials[8132] = Material.Terracotta; + materials[8133] = Material.CoalBlock; + materials[8134] = Material.PackedIce; + for (int i = 8135; i <= 8136; i++) + materials[i] = Material.Sunflower; + for (int i = 8137; i <= 8138; i++) + materials[i] = Material.Lilac; + for (int i = 8139; i <= 8140; i++) + materials[i] = Material.RoseBush; + for (int i = 8141; i <= 8142; i++) + materials[i] = Material.Peony; + for (int i = 8143; i <= 8144; i++) + materials[i] = Material.TallGrass; + for (int i = 8145; i <= 8146; i++) + materials[i] = Material.LargeFern; + for (int i = 8147; i <= 8162; i++) + materials[i] = Material.WhiteBanner; + for (int i = 8163; i <= 8178; i++) + materials[i] = Material.OrangeBanner; + for (int i = 8179; i <= 8194; i++) + materials[i] = Material.MagentaBanner; + for (int i = 8195; i <= 8210; i++) + materials[i] = Material.LightBlueBanner; + for (int i = 8211; i <= 8226; i++) + materials[i] = Material.YellowBanner; + for (int i = 8227; i <= 8242; i++) + materials[i] = Material.LimeBanner; + for (int i = 8243; i <= 8258; i++) + materials[i] = Material.PinkBanner; + for (int i = 8259; i <= 8274; i++) + materials[i] = Material.GrayBanner; + for (int i = 8275; i <= 8290; i++) + materials[i] = Material.LightGrayBanner; + for (int i = 8291; i <= 8306; i++) + materials[i] = Material.CyanBanner; + for (int i = 8307; i <= 8322; i++) + materials[i] = Material.PurpleBanner; + for (int i = 8323; i <= 8338; i++) + materials[i] = Material.BlueBanner; + for (int i = 8339; i <= 8354; i++) + materials[i] = Material.BrownBanner; + for (int i = 8355; i <= 8370; i++) + materials[i] = Material.GreenBanner; + for (int i = 8371; i <= 8386; i++) + materials[i] = Material.RedBanner; + for (int i = 8387; i <= 8402; i++) + materials[i] = Material.BlackBanner; + for (int i = 8403; i <= 8406; i++) + materials[i] = Material.WhiteWallBanner; + for (int i = 8407; i <= 8410; i++) + materials[i] = Material.OrangeWallBanner; + for (int i = 8411; i <= 8414; i++) + materials[i] = Material.MagentaWallBanner; + for (int i = 8415; i <= 8418; i++) + materials[i] = Material.LightBlueWallBanner; + for (int i = 8419; i <= 8422; i++) + materials[i] = Material.YellowWallBanner; + for (int i = 8423; i <= 8426; i++) + materials[i] = Material.LimeWallBanner; + for (int i = 8427; i <= 8430; i++) + materials[i] = Material.PinkWallBanner; + for (int i = 8431; i <= 8434; i++) + materials[i] = Material.GrayWallBanner; + for (int i = 8435; i <= 8438; i++) + materials[i] = Material.LightGrayWallBanner; + for (int i = 8439; i <= 8442; i++) + materials[i] = Material.CyanWallBanner; + for (int i = 8443; i <= 8446; i++) + materials[i] = Material.PurpleWallBanner; + for (int i = 8447; i <= 8450; i++) + materials[i] = Material.BlueWallBanner; + for (int i = 8451; i <= 8454; i++) + materials[i] = Material.BrownWallBanner; + for (int i = 8455; i <= 8458; i++) + materials[i] = Material.GreenWallBanner; + for (int i = 8459; i <= 8462; i++) + materials[i] = Material.RedWallBanner; + for (int i = 8463; i <= 8466; i++) + materials[i] = Material.BlackWallBanner; + materials[8467] = Material.RedSandstone; + materials[8468] = Material.ChiseledRedSandstone; + materials[8469] = Material.CutRedSandstone; + for (int i = 8470; i <= 8549; i++) + materials[i] = Material.RedSandstoneStairs; + for (int i = 8550; i <= 8555; i++) + materials[i] = Material.OakSlab; + for (int i = 8556; i <= 8561; i++) + materials[i] = Material.SpruceSlab; + for (int i = 8562; i <= 8567; i++) + materials[i] = Material.BirchSlab; + for (int i = 8568; i <= 8573; i++) + materials[i] = Material.JungleSlab; + for (int i = 8574; i <= 8579; i++) + materials[i] = Material.AcaciaSlab; + for (int i = 8580; i <= 8585; i++) + materials[i] = Material.DarkOakSlab; + for (int i = 8586; i <= 8591; i++) + materials[i] = Material.StoneSlab; + for (int i = 8592; i <= 8597; i++) + materials[i] = Material.SmoothStoneSlab; + for (int i = 8598; i <= 8603; i++) + materials[i] = Material.SandstoneSlab; + for (int i = 8604; i <= 8609; i++) + materials[i] = Material.CutSandstoneSlab; + for (int i = 8610; i <= 8615; i++) + materials[i] = Material.PetrifiedOakSlab; + for (int i = 8616; i <= 8621; i++) + materials[i] = Material.CobblestoneSlab; + for (int i = 8622; i <= 8627; i++) + materials[i] = Material.BrickSlab; + for (int i = 8628; i <= 8633; i++) + materials[i] = Material.StoneBrickSlab; + for (int i = 8634; i <= 8639; i++) + materials[i] = Material.NetherBrickSlab; + for (int i = 8640; i <= 8645; i++) + materials[i] = Material.QuartzSlab; + for (int i = 8646; i <= 8651; i++) + materials[i] = Material.RedSandstoneSlab; + for (int i = 8652; i <= 8657; i++) + materials[i] = Material.CutRedSandstoneSlab; + for (int i = 8658; i <= 8663; i++) + materials[i] = Material.PurpurSlab; + materials[8664] = Material.SmoothStone; + materials[8665] = Material.SmoothSandstone; + materials[8666] = Material.SmoothQuartz; + materials[8667] = Material.SmoothRedSandstone; + for (int i = 8668; i <= 8699; i++) + materials[i] = Material.SpruceFenceGate; + for (int i = 8700; i <= 8731; i++) + materials[i] = Material.BirchFenceGate; + for (int i = 8732; i <= 8763; i++) + materials[i] = Material.JungleFenceGate; + for (int i = 8764; i <= 8795; i++) + materials[i] = Material.AcaciaFenceGate; + for (int i = 8796; i <= 8827; i++) + materials[i] = Material.DarkOakFenceGate; + for (int i = 8828; i <= 8859; i++) + materials[i] = Material.SpruceFence; + for (int i = 8860; i <= 8891; i++) + materials[i] = Material.BirchFence; + for (int i = 8892; i <= 8923; i++) + materials[i] = Material.JungleFence; + for (int i = 8924; i <= 8955; i++) + materials[i] = Material.AcaciaFence; + for (int i = 8956; i <= 8987; i++) + materials[i] = Material.DarkOakFence; + for (int i = 8988; i <= 9051; i++) + materials[i] = Material.SpruceDoor; + for (int i = 9052; i <= 9115; i++) + materials[i] = Material.BirchDoor; + for (int i = 9116; i <= 9179; i++) + materials[i] = Material.JungleDoor; + for (int i = 9180; i <= 9243; i++) + materials[i] = Material.AcaciaDoor; + for (int i = 9244; i <= 9307; i++) + materials[i] = Material.DarkOakDoor; + for (int i = 9308; i <= 9313; i++) + materials[i] = Material.EndRod; + for (int i = 9314; i <= 9377; i++) + materials[i] = Material.ChorusPlant; + for (int i = 9378; i <= 9383; i++) + materials[i] = Material.ChorusFlower; + materials[9384] = Material.PurpurBlock; + for (int i = 9385; i <= 9387; i++) + materials[i] = Material.PurpurPillar; + for (int i = 9388; i <= 9467; i++) + materials[i] = Material.PurpurStairs; + materials[9468] = Material.EndStoneBricks; + for (int i = 9469; i <= 9472; i++) + materials[i] = Material.Beetroots; + materials[9473] = Material.GrassPath; + materials[9474] = Material.EndGateway; + for (int i = 9475; i <= 9486; i++) + materials[i] = Material.RepeatingCommandBlock; + for (int i = 9487; i <= 9498; i++) + materials[i] = Material.ChainCommandBlock; + for (int i = 9499; i <= 9502; i++) + materials[i] = Material.FrostedIce; + materials[9503] = Material.MagmaBlock; + materials[9504] = Material.NetherWartBlock; + materials[9505] = Material.RedNetherBricks; + for (int i = 9506; i <= 9508; i++) + materials[i] = Material.BoneBlock; + materials[9509] = Material.StructureVoid; + for (int i = 9510; i <= 9521; i++) + materials[i] = Material.Observer; + for (int i = 9522; i <= 9527; i++) + materials[i] = Material.ShulkerBox; + for (int i = 9528; i <= 9533; i++) + materials[i] = Material.WhiteShulkerBox; + for (int i = 9534; i <= 9539; i++) + materials[i] = Material.OrangeShulkerBox; + for (int i = 9540; i <= 9545; i++) + materials[i] = Material.MagentaShulkerBox; + for (int i = 9546; i <= 9551; i++) + materials[i] = Material.LightBlueShulkerBox; + for (int i = 9552; i <= 9557; i++) + materials[i] = Material.YellowShulkerBox; + for (int i = 9558; i <= 9563; i++) + materials[i] = Material.LimeShulkerBox; + for (int i = 9564; i <= 9569; i++) + materials[i] = Material.PinkShulkerBox; + for (int i = 9570; i <= 9575; i++) + materials[i] = Material.GrayShulkerBox; + for (int i = 9576; i <= 9581; i++) + materials[i] = Material.LightGrayShulkerBox; + for (int i = 9582; i <= 9587; i++) + materials[i] = Material.CyanShulkerBox; + for (int i = 9588; i <= 9593; i++) + materials[i] = Material.PurpleShulkerBox; + for (int i = 9594; i <= 9599; i++) + materials[i] = Material.BlueShulkerBox; + for (int i = 9600; i <= 9605; i++) + materials[i] = Material.BrownShulkerBox; + for (int i = 9606; i <= 9611; i++) + materials[i] = Material.GreenShulkerBox; + for (int i = 9612; i <= 9617; i++) + materials[i] = Material.RedShulkerBox; + for (int i = 9618; i <= 9623; i++) + materials[i] = Material.BlackShulkerBox; + for (int i = 9624; i <= 9627; i++) + materials[i] = Material.WhiteGlazedTerracotta; + for (int i = 9628; i <= 9631; i++) + materials[i] = Material.OrangeGlazedTerracotta; + for (int i = 9632; i <= 9635; i++) + materials[i] = Material.MagentaGlazedTerracotta; + for (int i = 9636; i <= 9639; i++) + materials[i] = Material.LightBlueGlazedTerracotta; + for (int i = 9640; i <= 9643; i++) + materials[i] = Material.YellowGlazedTerracotta; + for (int i = 9644; i <= 9647; i++) + materials[i] = Material.LimeGlazedTerracotta; + for (int i = 9648; i <= 9651; i++) + materials[i] = Material.PinkGlazedTerracotta; + for (int i = 9652; i <= 9655; i++) + materials[i] = Material.GrayGlazedTerracotta; + for (int i = 9656; i <= 9659; i++) + materials[i] = Material.LightGrayGlazedTerracotta; + for (int i = 9660; i <= 9663; i++) + materials[i] = Material.CyanGlazedTerracotta; + for (int i = 9664; i <= 9667; i++) + materials[i] = Material.PurpleGlazedTerracotta; + for (int i = 9668; i <= 9671; i++) + materials[i] = Material.BlueGlazedTerracotta; + for (int i = 9672; i <= 9675; i++) + materials[i] = Material.BrownGlazedTerracotta; + for (int i = 9676; i <= 9679; i++) + materials[i] = Material.GreenGlazedTerracotta; + for (int i = 9680; i <= 9683; i++) + materials[i] = Material.RedGlazedTerracotta; + for (int i = 9684; i <= 9687; i++) + materials[i] = Material.BlackGlazedTerracotta; + materials[9688] = Material.WhiteConcrete; + materials[9689] = Material.OrangeConcrete; + materials[9690] = Material.MagentaConcrete; + materials[9691] = Material.LightBlueConcrete; + materials[9692] = Material.YellowConcrete; + materials[9693] = Material.LimeConcrete; + materials[9694] = Material.PinkConcrete; + materials[9695] = Material.GrayConcrete; + materials[9696] = Material.LightGrayConcrete; + materials[9697] = Material.CyanConcrete; + materials[9698] = Material.PurpleConcrete; + materials[9699] = Material.BlueConcrete; + materials[9700] = Material.BrownConcrete; + materials[9701] = Material.GreenConcrete; + materials[9702] = Material.RedConcrete; + materials[9703] = Material.BlackConcrete; + materials[9704] = Material.WhiteConcretePowder; + materials[9705] = Material.OrangeConcretePowder; + materials[9706] = Material.MagentaConcretePowder; + materials[9707] = Material.LightBlueConcretePowder; + materials[9708] = Material.YellowConcretePowder; + materials[9709] = Material.LimeConcretePowder; + materials[9710] = Material.PinkConcretePowder; + materials[9711] = Material.GrayConcretePowder; + materials[9712] = Material.LightGrayConcretePowder; + materials[9713] = Material.CyanConcretePowder; + materials[9714] = Material.PurpleConcretePowder; + materials[9715] = Material.BlueConcretePowder; + materials[9716] = Material.BrownConcretePowder; + materials[9717] = Material.GreenConcretePowder; + materials[9718] = Material.RedConcretePowder; + materials[9719] = Material.BlackConcretePowder; + for (int i = 9720; i <= 9745; i++) + materials[i] = Material.Kelp; + materials[9746] = Material.KelpPlant; + materials[9747] = Material.DriedKelpBlock; + for (int i = 9748; i <= 9759; i++) + materials[i] = Material.TurtleEgg; + materials[9760] = Material.DeadTubeCoralBlock; + materials[9761] = Material.DeadBrainCoralBlock; + materials[9762] = Material.DeadBubbleCoralBlock; + materials[9763] = Material.DeadFireCoralBlock; + materials[9764] = Material.DeadHornCoralBlock; + materials[9765] = Material.TubeCoralBlock; + materials[9766] = Material.BrainCoralBlock; + materials[9767] = Material.BubbleCoralBlock; + materials[9768] = Material.FireCoralBlock; + materials[9769] = Material.HornCoralBlock; + for (int i = 9770; i <= 9771; i++) + materials[i] = Material.DeadTubeCoral; + for (int i = 9772; i <= 9773; i++) + materials[i] = Material.DeadBrainCoral; + for (int i = 9774; i <= 9775; i++) + materials[i] = Material.DeadBubbleCoral; + for (int i = 9776; i <= 9777; i++) + materials[i] = Material.DeadFireCoral; + for (int i = 9778; i <= 9779; i++) + materials[i] = Material.DeadHornCoral; + for (int i = 9780; i <= 9781; i++) + materials[i] = Material.TubeCoral; + for (int i = 9782; i <= 9783; i++) + materials[i] = Material.BrainCoral; + for (int i = 9784; i <= 9785; i++) + materials[i] = Material.BubbleCoral; + for (int i = 9786; i <= 9787; i++) + materials[i] = Material.FireCoral; + for (int i = 9788; i <= 9789; i++) + materials[i] = Material.HornCoral; + for (int i = 9790; i <= 9791; i++) + materials[i] = Material.DeadTubeCoralFan; + for (int i = 9792; i <= 9793; i++) + materials[i] = Material.DeadBrainCoralFan; + for (int i = 9794; i <= 9795; i++) + materials[i] = Material.DeadBubbleCoralFan; + for (int i = 9796; i <= 9797; i++) + materials[i] = Material.DeadFireCoralFan; + for (int i = 9798; i <= 9799; i++) + materials[i] = Material.DeadHornCoralFan; + for (int i = 9800; i <= 9801; i++) + materials[i] = Material.TubeCoralFan; + for (int i = 9802; i <= 9803; i++) + materials[i] = Material.BrainCoralFan; + for (int i = 9804; i <= 9805; i++) + materials[i] = Material.BubbleCoralFan; + for (int i = 9806; i <= 9807; i++) + materials[i] = Material.FireCoralFan; + for (int i = 9808; i <= 9809; i++) + materials[i] = Material.HornCoralFan; + for (int i = 9810; i <= 9817; i++) + materials[i] = Material.DeadTubeCoralWallFan; + for (int i = 9818; i <= 9825; i++) + materials[i] = Material.DeadBrainCoralWallFan; + for (int i = 9826; i <= 9833; i++) + materials[i] = Material.DeadBubbleCoralWallFan; + for (int i = 9834; i <= 9841; i++) + materials[i] = Material.DeadFireCoralWallFan; + for (int i = 9842; i <= 9849; i++) + materials[i] = Material.DeadHornCoralWallFan; + for (int i = 9850; i <= 9857; i++) + materials[i] = Material.TubeCoralWallFan; + for (int i = 9858; i <= 9865; i++) + materials[i] = Material.BrainCoralWallFan; + for (int i = 9866; i <= 9873; i++) + materials[i] = Material.BubbleCoralWallFan; + for (int i = 9874; i <= 9881; i++) + materials[i] = Material.FireCoralWallFan; + for (int i = 9882; i <= 9889; i++) + materials[i] = Material.HornCoralWallFan; + for (int i = 9890; i <= 9897; i++) + materials[i] = Material.SeaPickle; + materials[9898] = Material.BlueIce; + for (int i = 9899; i <= 9900; i++) + materials[i] = Material.Conduit; + materials[9901] = Material.BambooSapling; + for (int i = 9902; i <= 9913; i++) + materials[i] = Material.Bamboo; + materials[9914] = Material.PottedBamboo; + materials[9915] = Material.VoidAir; + materials[9916] = Material.CaveAir; + for (int i = 9917; i <= 9918; i++) + materials[i] = Material.BubbleColumn; + for (int i = 9919; i <= 9998; i++) + materials[i] = Material.PolishedGraniteStairs; + for (int i = 9999; i <= 10078; i++) + materials[i] = Material.SmoothRedSandstoneStairs; + for (int i = 10079; i <= 10158; i++) + materials[i] = Material.MossyStoneBrickStairs; + for (int i = 10159; i <= 10238; i++) + materials[i] = Material.PolishedDioriteStairs; + for (int i = 10239; i <= 10318; i++) + materials[i] = Material.MossyCobblestoneStairs; + for (int i = 10319; i <= 10398; i++) + materials[i] = Material.EndStoneBrickStairs; + for (int i = 10399; i <= 10478; i++) + materials[i] = Material.StoneStairs; + for (int i = 10479; i <= 10558; i++) + materials[i] = Material.SmoothSandstoneStairs; + for (int i = 10559; i <= 10638; i++) + materials[i] = Material.SmoothQuartzStairs; + for (int i = 10639; i <= 10718; i++) + materials[i] = Material.GraniteStairs; + for (int i = 10719; i <= 10798; i++) + materials[i] = Material.AndesiteStairs; + for (int i = 10799; i <= 10878; i++) + materials[i] = Material.RedNetherBrickStairs; + for (int i = 10879; i <= 10958; i++) + materials[i] = Material.PolishedAndesiteStairs; + for (int i = 10959; i <= 11038; i++) + materials[i] = Material.DioriteStairs; + for (int i = 11039; i <= 11044; i++) + materials[i] = Material.PolishedGraniteSlab; + for (int i = 11045; i <= 11050; i++) + materials[i] = Material.SmoothRedSandstoneSlab; + for (int i = 11051; i <= 11056; i++) + materials[i] = Material.MossyStoneBrickSlab; + for (int i = 11057; i <= 11062; i++) + materials[i] = Material.PolishedDioriteSlab; + for (int i = 11063; i <= 11068; i++) + materials[i] = Material.MossyCobblestoneSlab; + for (int i = 11069; i <= 11074; i++) + materials[i] = Material.EndStoneBrickSlab; + for (int i = 11075; i <= 11080; i++) + materials[i] = Material.SmoothSandstoneSlab; + for (int i = 11081; i <= 11086; i++) + materials[i] = Material.SmoothQuartzSlab; + for (int i = 11087; i <= 11092; i++) + materials[i] = Material.GraniteSlab; + for (int i = 11093; i <= 11098; i++) + materials[i] = Material.AndesiteSlab; + for (int i = 11099; i <= 11104; i++) + materials[i] = Material.RedNetherBrickSlab; + for (int i = 11105; i <= 11110; i++) + materials[i] = Material.PolishedAndesiteSlab; + for (int i = 11111; i <= 11116; i++) + materials[i] = Material.DioriteSlab; + for (int i = 11117; i <= 11440; i++) + materials[i] = Material.BrickWall; + for (int i = 11441; i <= 11764; i++) + materials[i] = Material.PrismarineWall; + for (int i = 11765; i <= 12088; i++) + materials[i] = Material.RedSandstoneWall; + for (int i = 12089; i <= 12412; i++) + materials[i] = Material.MossyStoneBrickWall; + for (int i = 12413; i <= 12736; i++) + materials[i] = Material.GraniteWall; + for (int i = 12737; i <= 13060; i++) + materials[i] = Material.StoneBrickWall; + for (int i = 13061; i <= 13384; i++) + materials[i] = Material.NetherBrickWall; + for (int i = 13385; i <= 13708; i++) + materials[i] = Material.AndesiteWall; + for (int i = 13709; i <= 14032; i++) + materials[i] = Material.RedNetherBrickWall; + for (int i = 14033; i <= 14356; i++) + materials[i] = Material.SandstoneWall; + for (int i = 14357; i <= 14680; i++) + materials[i] = Material.EndStoneBrickWall; + for (int i = 14681; i <= 15004; i++) + materials[i] = Material.DioriteWall; + for (int i = 15005; i <= 15036; i++) + materials[i] = Material.Scaffolding; + for (int i = 15037; i <= 15040; i++) + materials[i] = Material.Loom; + for (int i = 15041; i <= 15052; i++) + materials[i] = Material.Barrel; + for (int i = 15053; i <= 15060; i++) + materials[i] = Material.Smoker; + for (int i = 15061; i <= 15068; i++) + materials[i] = Material.BlastFurnace; + materials[15069] = Material.CartographyTable; + materials[15070] = Material.FletchingTable; + for (int i = 15071; i <= 15082; i++) + materials[i] = Material.Grindstone; + for (int i = 15083; i <= 15098; i++) + materials[i] = Material.Lectern; + materials[15099] = Material.SmithingTable; + for (int i = 15100; i <= 15103; i++) + materials[i] = Material.Stonecutter; + for (int i = 15104; i <= 15135; i++) + materials[i] = Material.Bell; + for (int i = 15136; i <= 15139; i++) + materials[i] = Material.Lantern; + for (int i = 15140; i <= 15143; i++) + materials[i] = Material.SoulLantern; + for (int i = 15144; i <= 15175; i++) + materials[i] = Material.Campfire; + for (int i = 15176; i <= 15207; i++) + materials[i] = Material.SoulCampfire; + for (int i = 15208; i <= 15211; i++) + materials[i] = Material.SweetBerryBush; + for (int i = 15212; i <= 15214; i++) + materials[i] = Material.WarpedStem; + for (int i = 15215; i <= 15217; i++) + materials[i] = Material.StrippedWarpedStem; + for (int i = 15218; i <= 15220; i++) + materials[i] = Material.WarpedHyphae; + for (int i = 15221; i <= 15223; i++) + materials[i] = Material.StrippedWarpedHyphae; + materials[15224] = Material.WarpedNylium; + materials[15225] = Material.WarpedFungus; + materials[15226] = Material.WarpedWartBlock; + materials[15227] = Material.WarpedRoots; + materials[15228] = Material.NetherSprouts; + for (int i = 15229; i <= 15231; i++) + materials[i] = Material.CrimsonStem; + for (int i = 15232; i <= 15234; i++) + materials[i] = Material.StrippedCrimsonStem; + for (int i = 15235; i <= 15237; i++) + materials[i] = Material.CrimsonHyphae; + for (int i = 15238; i <= 15240; i++) + materials[i] = Material.StrippedCrimsonHyphae; + materials[15241] = Material.CrimsonNylium; + materials[15242] = Material.CrimsonFungus; + materials[15243] = Material.Shroomlight; + for (int i = 15244; i <= 15269; i++) + materials[i] = Material.WeepingVines; + materials[15270] = Material.WeepingVinesPlant; + for (int i = 15271; i <= 15296; i++) + materials[i] = Material.TwistingVines; + materials[15297] = Material.TwistingVinesPlant; + materials[15298] = Material.CrimsonRoots; + materials[15299] = Material.CrimsonPlanks; + materials[15300] = Material.WarpedPlanks; + for (int i = 15301; i <= 15306; i++) + materials[i] = Material.CrimsonSlab; + for (int i = 15307; i <= 15312; i++) + materials[i] = Material.WarpedSlab; + for (int i = 15313; i <= 15314; i++) + materials[i] = Material.CrimsonPressurePlate; + for (int i = 15315; i <= 15316; i++) + materials[i] = Material.WarpedPressurePlate; + for (int i = 15317; i <= 15348; i++) + materials[i] = Material.CrimsonFence; + for (int i = 15349; i <= 15380; i++) + materials[i] = Material.WarpedFence; + for (int i = 15381; i <= 15444; i++) + materials[i] = Material.CrimsonTrapdoor; + for (int i = 15445; i <= 15508; i++) + materials[i] = Material.WarpedTrapdoor; + for (int i = 15509; i <= 15540; i++) + materials[i] = Material.CrimsonFenceGate; + for (int i = 15541; i <= 15572; i++) + materials[i] = Material.WarpedFenceGate; + for (int i = 15573; i <= 15652; i++) + materials[i] = Material.CrimsonStairs; + for (int i = 15653; i <= 15732; i++) + materials[i] = Material.WarpedStairs; + for (int i = 15733; i <= 15756; i++) + materials[i] = Material.CrimsonButton; + for (int i = 15757; i <= 15780; i++) + materials[i] = Material.WarpedButton; + for (int i = 15781; i <= 15844; i++) + materials[i] = Material.CrimsonDoor; + for (int i = 15845; i <= 15908; i++) + materials[i] = Material.WarpedDoor; + for (int i = 15909; i <= 15940; i++) + materials[i] = Material.CrimsonSign; + for (int i = 15941; i <= 15972; i++) + materials[i] = Material.WarpedSign; + for (int i = 15973; i <= 15980; i++) + materials[i] = Material.CrimsonWallSign; + for (int i = 15981; i <= 15988; i++) + materials[i] = Material.WarpedWallSign; + for (int i = 15989; i <= 15992; i++) + materials[i] = Material.StructureBlock; + for (int i = 15993; i <= 16004; i++) + materials[i] = Material.Jigsaw; + for (int i = 16005; i <= 16013; i++) + materials[i] = Material.Composter; + for (int i = 16014; i <= 16029; i++) + materials[i] = Material.Target; + for (int i = 16030; i <= 16053; i++) + materials[i] = Material.BeeNest; + for (int i = 16054; i <= 16077; i++) + materials[i] = Material.Beehive; + materials[16078] = Material.HoneyBlock; + materials[16079] = Material.HoneycombBlock; + materials[16080] = Material.NetheriteBlock; + materials[16081] = Material.AncientDebris; + materials[16082] = Material.CryingObsidian; + for (int i = 16083; i <= 16087; i++) + materials[i] = Material.RespawnAnchor; + materials[16088] = Material.PottedCrimsonFungus; + materials[16089] = Material.PottedWarpedFungus; + materials[16090] = Material.PottedCrimsonRoots; + materials[16091] = Material.PottedWarpedRoots; + materials[16092] = Material.Lodestone; + materials[16093] = Material.Blackstone; + for (int i = 16094; i <= 16173; i++) + materials[i] = Material.BlackstoneStairs; + for (int i = 16174; i <= 16497; i++) + materials[i] = Material.BlackstoneWall; + for (int i = 16498; i <= 16503; i++) + materials[i] = Material.BlackstoneSlab; + materials[16504] = Material.PolishedBlackstone; + materials[16505] = Material.PolishedBlackstoneBricks; + materials[16506] = Material.CrackedPolishedBlackstoneBricks; + materials[16507] = Material.ChiseledPolishedBlackstone; + for (int i = 16508; i <= 16513; i++) + materials[i] = Material.PolishedBlackstoneBrickSlab; + for (int i = 16514; i <= 16593; i++) + materials[i] = Material.PolishedBlackstoneBrickStairs; + for (int i = 16594; i <= 16917; i++) + materials[i] = Material.PolishedBlackstoneBrickWall; + materials[16918] = Material.GildedBlackstone; + for (int i = 16919; i <= 16998; i++) + materials[i] = Material.PolishedBlackstoneStairs; + for (int i = 16999; i <= 17004; i++) + materials[i] = Material.PolishedBlackstoneSlab; + for (int i = 17005; i <= 17006; i++) + materials[i] = Material.PolishedBlackstonePressurePlate; + for (int i = 17007; i <= 17030; i++) + materials[i] = Material.PolishedBlackstoneButton; + for (int i = 17031; i <= 17354; i++) + materials[i] = Material.PolishedBlackstoneWall; + materials[17355] = Material.ChiseledNetherBricks; + materials[17356] = Material.CrackedNetherBricks; + materials[17357] = Material.QuartzBricks; + for (int i = 17358; i <= 17373; i++) + materials[i] = Material.Candle; + for (int i = 17374; i <= 17389; i++) + materials[i] = Material.WhiteCandle; + for (int i = 17390; i <= 17405; i++) + materials[i] = Material.OrangeCandle; + for (int i = 17406; i <= 17421; i++) + materials[i] = Material.MagentaCandle; + for (int i = 17422; i <= 17437; i++) + materials[i] = Material.LightBlueCandle; + for (int i = 17438; i <= 17453; i++) + materials[i] = Material.YellowCandle; + for (int i = 17454; i <= 17469; i++) + materials[i] = Material.LimeCandle; + for (int i = 17470; i <= 17485; i++) + materials[i] = Material.PinkCandle; + for (int i = 17486; i <= 17501; i++) + materials[i] = Material.GrayCandle; + for (int i = 17502; i <= 17517; i++) + materials[i] = Material.LightGrayCandle; + for (int i = 17518; i <= 17533; i++) + materials[i] = Material.CyanCandle; + for (int i = 17534; i <= 17549; i++) + materials[i] = Material.PurpleCandle; + for (int i = 17550; i <= 17565; i++) + materials[i] = Material.BlueCandle; + for (int i = 17566; i <= 17581; i++) + materials[i] = Material.BrownCandle; + for (int i = 17582; i <= 17597; i++) + materials[i] = Material.GreenCandle; + for (int i = 17598; i <= 17613; i++) + materials[i] = Material.RedCandle; + for (int i = 17614; i <= 17629; i++) + materials[i] = Material.BlackCandle; + for (int i = 17630; i <= 17631; i++) + materials[i] = Material.CandleCake; + for (int i = 17632; i <= 17633; i++) + materials[i] = Material.WhiteCandleCake; + for (int i = 17634; i <= 17635; i++) + materials[i] = Material.OrangeCandleCake; + for (int i = 17636; i <= 17637; i++) + materials[i] = Material.MagentaCandleCake; + for (int i = 17638; i <= 17639; i++) + materials[i] = Material.LightBlueCandleCake; + for (int i = 17640; i <= 17641; i++) + materials[i] = Material.YellowCandleCake; + for (int i = 17642; i <= 17643; i++) + materials[i] = Material.LimeCandleCake; + for (int i = 17644; i <= 17645; i++) + materials[i] = Material.PinkCandleCake; + for (int i = 17646; i <= 17647; i++) + materials[i] = Material.GrayCandleCake; + for (int i = 17648; i <= 17649; i++) + materials[i] = Material.LightGrayCandleCake; + for (int i = 17650; i <= 17651; i++) + materials[i] = Material.CyanCandleCake; + for (int i = 17652; i <= 17653; i++) + materials[i] = Material.PurpleCandleCake; + for (int i = 17654; i <= 17655; i++) + materials[i] = Material.BlueCandleCake; + for (int i = 17656; i <= 17657; i++) + materials[i] = Material.BrownCandleCake; + for (int i = 17658; i <= 17659; i++) + materials[i] = Material.GreenCandleCake; + for (int i = 17660; i <= 17661; i++) + materials[i] = Material.RedCandleCake; + for (int i = 17662; i <= 17663; i++) + materials[i] = Material.BlackCandleCake; + materials[17664] = Material.AmethystBlock; + materials[17665] = Material.BuddingAmethyst; + for (int i = 17666; i <= 17677; i++) + materials[i] = Material.AmethystCluster; + for (int i = 17678; i <= 17689; i++) + materials[i] = Material.LargeAmethystBud; + for (int i = 17690; i <= 17701; i++) + materials[i] = Material.MediumAmethystBud; + for (int i = 17702; i <= 17713; i++) + materials[i] = Material.SmallAmethystBud; + materials[17714] = Material.Tuff; + materials[17715] = Material.Calcite; + materials[17716] = Material.TintedGlass; + materials[17717] = Material.PowderSnow; + for (int i = 17718; i <= 17813; i++) + materials[i] = Material.SculkSensor; + materials[17814] = Material.OxidizedCopper; + materials[17815] = Material.WeatheredCopper; + materials[17816] = Material.ExposedCopper; + materials[17817] = Material.CopperBlock; + materials[17818] = Material.CopperOre; + materials[17819] = Material.DeepslateCopperOre; + materials[17820] = Material.OxidizedCutCopper; + materials[17821] = Material.WeatheredCutCopper; + materials[17822] = Material.ExposedCutCopper; + materials[17823] = Material.CutCopper; + for (int i = 17824; i <= 17903; i++) + materials[i] = Material.OxidizedCutCopperStairs; + for (int i = 17904; i <= 17983; i++) + materials[i] = Material.WeatheredCutCopperStairs; + for (int i = 17984; i <= 18063; i++) + materials[i] = Material.ExposedCutCopperStairs; + for (int i = 18064; i <= 18143; i++) + materials[i] = Material.CutCopperStairs; + for (int i = 18144; i <= 18149; i++) + materials[i] = Material.OxidizedCutCopperSlab; + for (int i = 18150; i <= 18155; i++) + materials[i] = Material.WeatheredCutCopperSlab; + for (int i = 18156; i <= 18161; i++) + materials[i] = Material.ExposedCutCopperSlab; + for (int i = 18162; i <= 18167; i++) + materials[i] = Material.CutCopperSlab; + materials[18168] = Material.WaxedCopperBlock; + materials[18169] = Material.WaxedWeatheredCopper; + materials[18170] = Material.WaxedExposedCopper; + materials[18171] = Material.WaxedOxidizedCopper; + materials[18172] = Material.WaxedOxidizedCutCopper; + materials[18173] = Material.WaxedWeatheredCutCopper; + materials[18174] = Material.WaxedExposedCutCopper; + materials[18175] = Material.WaxedCutCopper; + for (int i = 18176; i <= 18255; i++) + materials[i] = Material.WaxedOxidizedCutCopperStairs; + for (int i = 18256; i <= 18335; i++) + materials[i] = Material.WaxedWeatheredCutCopperStairs; + for (int i = 18336; i <= 18415; i++) + materials[i] = Material.WaxedExposedCutCopperStairs; + for (int i = 18416; i <= 18495; i++) + materials[i] = Material.WaxedCutCopperStairs; + for (int i = 18496; i <= 18501; i++) + materials[i] = Material.WaxedOxidizedCutCopperSlab; + for (int i = 18502; i <= 18507; i++) + materials[i] = Material.WaxedWeatheredCutCopperSlab; + for (int i = 18508; i <= 18513; i++) + materials[i] = Material.WaxedExposedCutCopperSlab; + for (int i = 18514; i <= 18519; i++) + materials[i] = Material.WaxedCutCopperSlab; + for (int i = 18520; i <= 18543; i++) + materials[i] = Material.LightningRod; + for (int i = 18544; i <= 18563; i++) + materials[i] = Material.PointedDripstone; + materials[18564] = Material.DripstoneBlock; + for (int i = 18565; i <= 18616; i++) + materials[i] = Material.CaveVines; + for (int i = 18617; i <= 18618; i++) + materials[i] = Material.CaveVinesPlant; + materials[18619] = Material.SporeBlossom; + materials[18620] = Material.Azalea; + materials[18621] = Material.FloweringAzalea; + materials[18622] = Material.MossCarpet; + materials[18623] = Material.MossBlock; + for (int i = 18624; i <= 18655; i++) + materials[i] = Material.BigDripleaf; + for (int i = 18656; i <= 18663; i++) + materials[i] = Material.BigDripleafStem; + for (int i = 18664; i <= 18679; i++) + materials[i] = Material.SmallDripleaf; + for (int i = 18680; i <= 18681; i++) + materials[i] = Material.HangingRoots; + materials[18682] = Material.RootedDirt; + for (int i = 18683; i <= 18685; i++) + materials[i] = Material.Deepslate; + materials[18686] = Material.CobbledDeepslate; + for (int i = 18687; i <= 18766; i++) + materials[i] = Material.CobbledDeepslateStairs; + for (int i = 18767; i <= 18772; i++) + materials[i] = Material.CobbledDeepslateSlab; + for (int i = 18773; i <= 19096; i++) + materials[i] = Material.CobbledDeepslateWall; + materials[19097] = Material.PolishedDeepslate; + for (int i = 19098; i <= 19177; i++) + materials[i] = Material.PolishedDeepslateStairs; + for (int i = 19178; i <= 19183; i++) + materials[i] = Material.PolishedDeepslateSlab; + for (int i = 19184; i <= 19507; i++) + materials[i] = Material.PolishedDeepslateWall; + materials[19508] = Material.DeepslateTiles; + for (int i = 19509; i <= 19588; i++) + materials[i] = Material.DeepslateTileStairs; + for (int i = 19589; i <= 19594; i++) + materials[i] = Material.DeepslateTileSlab; + for (int i = 19595; i <= 19918; i++) + materials[i] = Material.DeepslateTileWall; + materials[19919] = Material.DeepslateBricks; + for (int i = 19920; i <= 19999; i++) + materials[i] = Material.DeepslateBrickStairs; + for (int i = 20000; i <= 20005; i++) + materials[i] = Material.DeepslateBrickSlab; + for (int i = 20006; i <= 20329; i++) + materials[i] = Material.DeepslateBrickWall; + materials[20330] = Material.ChiseledDeepslate; + materials[20331] = Material.CrackedDeepslateBricks; + materials[20332] = Material.CrackedDeepslateTiles; + for (int i = 20333; i <= 20335; i++) + materials[i] = Material.InfestedDeepslate; + materials[20336] = Material.SmoothBasalt; + materials[20337] = Material.RawIronBlock; + materials[20338] = Material.RawCopperBlock; + materials[20339] = Material.RawGoldBlock; + materials[20340] = Material.PottedAzaleaBush; + materials[20341] = Material.PottedFloweringAzaleaBush; + } + + protected override Dictionary GetDict() + { + return materials; + } + } +} diff --git a/MinecraftClient/Mapping/ChunkColumn.cs b/MinecraftClient/Mapping/ChunkColumn.cs index 22c9d2ae..5cbeda73 100644 --- a/MinecraftClient/Mapping/ChunkColumn.cs +++ b/MinecraftClient/Mapping/ChunkColumn.cs @@ -11,18 +11,29 @@ namespace MinecraftClient.Mapping /// public class ChunkColumn { - public const int ColumnSize = 16; + public int ColumnSize; + + public bool FullyLoaded = false; /// /// Blocks contained into the chunk /// - private readonly Chunk[] chunks = new Chunk[ColumnSize]; + private readonly Chunk[] chunks; /// /// Lock for thread safety /// private readonly ReaderWriterLockSlim chunkLock = new ReaderWriterLockSlim(); + /// + /// Create a new ChunkColumn + /// + public ChunkColumn(int size = 16) + { + ColumnSize = size; + chunks = new Chunk[size]; + } + /// /// Get or set the specified chunk column /// diff --git a/MinecraftClient/Mapping/Dimension.cs b/MinecraftClient/Mapping/Dimension.cs new file mode 100644 index 00000000..75642d51 --- /dev/null +++ b/MinecraftClient/Mapping/Dimension.cs @@ -0,0 +1,176 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace MinecraftClient.Mapping +{ + + /// + /// The dimension type, available after 1.16.2 + /// + public class Dimension + { + /// + /// The name of the dimension type (for example, "minecraft:overworld"). + /// + public readonly string Name; + + /// + /// Whether piglins shake and transform to zombified piglins. + /// + public readonly bool piglinSafe = false; + + /// + /// When false, compasses spin randomly. When true, nether portals can spawn zombified piglins. + /// + public readonly bool natural = true; + + /// + /// How much light the dimension has. + /// + public readonly float ambientLight = 0.0f; + + + /// + /// If set, the time of the day is the specified value. + /// Value: -1: not set + /// Value: [0, 24000]: time of the day + /// + public readonly long fixedTime = -1; + + /// + /// A resource location defining what block tag to use for infiniburn. + /// Value above 1.18.2: "#" or minecraft resource "#minecraft:...". + /// Value below 1.18.1: "" or minecraft resource "minecraft:...". + /// + public readonly string infiniburn = "#minecraft:infiniburn_overworld"; + + /// + /// Whether players can charge and use respawn anchors. + /// + public readonly bool respawnAnchorWorks = false; + + /// + /// Whether the dimension has skylight access or not. + /// + public readonly bool hasSkylight = true; + + /// + /// Whether players can use a bed to sleep. + /// + public readonly bool bedWorks = true; + + /// + /// unknown + /// Values: "minecraft:overworld", "minecraft:the_nether", "minecraft:the_end" or something else. + /// + public readonly string effects = "minecraft:overworld"; + + /// + /// Whether players with the Bad Omen effect can cause a raid. + /// + public readonly bool hasRaids = true; + + /// + /// The minimum Y level. + /// + public readonly int minY = 0; + + /// + /// The maximum Y level. + /// + public readonly int maxY = 256; + + /// + /// The maximum height. + /// + public readonly int height = 256; + + /// + /// The maximum height to which chorus fruits and nether portals can bring players within this dimension. + /// + public readonly int logicalHeight = 256; + + /// + /// The multiplier applied to coordinates when traveling to the dimension. + /// + public readonly double coordinateScale = 1.0; + + /// + /// Whether the dimensions behaves like the nether (water evaporates and sponges dry) or not. Also causes lava to spread thinner. + /// + public readonly bool ultrawarm = false; + + /// + /// Whether the dimension has a bedrock ceiling or not. When true, causes lava to spread faster. + /// + public readonly bool hasCeiling = false; + + /// + /// Default value used in version below 1.17 + /// + public Dimension() + { + this.Name = "minecraft:overworld"; + } + + /// + /// Create from the "Dimension Codec" NBT Tag Compound + /// + /// Dimension name + /// The dimension type (NBT Tag Compound) + public Dimension(string name, Dictionary nbt) + { + if (name == null) + throw new ArgumentNullException("name"); + if (nbt == null) + throw new ArgumentNullException("nbt Data"); + + this.Name = name; + + if (nbt.ContainsKey("piglin_safe")) + this.piglinSafe = 1 == (byte)nbt["piglin_safe"]; + if (nbt.ContainsKey("natural")) + this.natural = 1 == (byte)nbt["natural"]; + if (nbt.ContainsKey("ambient_light")) + this.ambientLight = (float)nbt["ambient_light"]; + if (nbt.ContainsKey("fixed_time")) + this.fixedTime = (long)nbt["fixed_time"]; + if (nbt.ContainsKey("infiniburn")) + this.infiniburn = (string)nbt["infiniburn"]; + if (nbt.ContainsKey("respawn_anchor_works")) + this.respawnAnchorWorks = 1 == (byte)nbt["respawn_anchor_works"]; + if (nbt.ContainsKey("has_skylight")) + this.hasSkylight = 1 == (byte)nbt["has_skylight"]; + if (nbt.ContainsKey("bed_works")) + this.bedWorks = 1 == (byte)nbt["bed_works"]; + if (nbt.ContainsKey("effects")) + this.effects = (string)nbt["effects"]; + if (nbt.ContainsKey("has_raids")) + this.hasRaids = 1 == (byte)nbt["has_raids"]; + if (nbt.ContainsKey("min_y")) + this.minY = (int)nbt["min_y"]; + if (nbt.ContainsKey("height")) + this.height = (int)nbt["height"]; + if (nbt.ContainsKey("min_y") && nbt.ContainsKey("height")) + this.maxY = this.minY + this.height; + if (nbt.ContainsKey("logical_height")) + this.logicalHeight = (int)nbt["logical_height"]; + if (nbt.ContainsKey("coordinate_scale")) + { + var coordinateScaleObj = nbt["coordinate_scale"]; + if (coordinateScaleObj.GetType() == typeof(float)) + this.coordinateScale = (float)coordinateScaleObj; + else + this.coordinateScale = (double)coordinateScaleObj; + } + if (nbt.ContainsKey("ultrawarm")) + this.ultrawarm = 1 == (byte)nbt["ultrawarm"]; + if (nbt.ContainsKey("has_ceiling")) + this.hasCeiling = 1 == (byte)nbt["has_ceiling"]; + } + + } +} diff --git a/MinecraftClient/Mapping/EntityPalettes/EntityPalette117.cs b/MinecraftClient/Mapping/EntityPalettes/EntityPalette117.cs new file mode 100644 index 00000000..65d9272a --- /dev/null +++ b/MinecraftClient/Mapping/EntityPalettes/EntityPalette117.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections.Generic; + +namespace MinecraftClient.Mapping.EntityPalettes +{ + public class EntityPalette117 : EntityPalette + { + private static Dictionary mappings = new Dictionary(); + + static EntityPalette117() + { + mappings[0] = EntityType.AreaEffectCloud; + mappings[1] = EntityType.ArmorStand; + mappings[2] = EntityType.Arrow; + mappings[3] = EntityType.Axolotl; + mappings[4] = EntityType.Bat; + mappings[5] = EntityType.Bee; + mappings[6] = EntityType.Blaze; + mappings[7] = EntityType.Boat; + mappings[8] = EntityType.Cat; + mappings[9] = EntityType.CaveSpider; + mappings[10] = EntityType.Chicken; + mappings[11] = EntityType.Cod; + mappings[12] = EntityType.Cow; + mappings[13] = EntityType.Creeper; + mappings[14] = EntityType.Dolphin; + mappings[15] = EntityType.Donkey; + mappings[16] = EntityType.DragonFireball; + mappings[17] = EntityType.Drowned; + mappings[18] = EntityType.ElderGuardian; + mappings[19] = EntityType.EndCrystal; + mappings[20] = EntityType.EnderDragon; + mappings[21] = EntityType.Enderman; + mappings[22] = EntityType.Endermite; + mappings[23] = EntityType.Evoker; + mappings[24] = EntityType.EvokerFangs; + mappings[25] = EntityType.ExperienceOrb; + mappings[26] = EntityType.EyeOfEnder; + mappings[27] = EntityType.FallingBlock; + mappings[28] = EntityType.FireworkRocket; + mappings[29] = EntityType.Fox; + mappings[30] = EntityType.Ghast; + mappings[31] = EntityType.Giant; + mappings[32] = EntityType.GlowItemFrame; + mappings[33] = EntityType.GlowSquid; + mappings[34] = EntityType.Goat; + mappings[35] = EntityType.Guardian; + mappings[36] = EntityType.Hoglin; + mappings[37] = EntityType.Horse; + mappings[38] = EntityType.Husk; + mappings[39] = EntityType.Illusioner; + mappings[40] = EntityType.IronGolem; + mappings[41] = EntityType.Item; + mappings[42] = EntityType.ItemFrame; + mappings[43] = EntityType.Fireball; + mappings[44] = EntityType.LeashKnot; + mappings[45] = EntityType.LightningBolt; + mappings[46] = EntityType.Llama; + mappings[47] = EntityType.LlamaSpit; + mappings[48] = EntityType.MagmaCube; + mappings[49] = EntityType.Marker; + mappings[50] = EntityType.Minecart; + mappings[51] = EntityType.ChestMinecart; + mappings[52] = EntityType.CommandBlockMinecart; + mappings[53] = EntityType.FurnaceMinecart; + mappings[54] = EntityType.HopperMinecart; + mappings[55] = EntityType.SpawnerMinecart; + mappings[56] = EntityType.TntMinecart; + mappings[57] = EntityType.Mule; + mappings[58] = EntityType.Mooshroom; + mappings[59] = EntityType.Ocelot; + mappings[60] = EntityType.Painting; + mappings[61] = EntityType.Panda; + mappings[62] = EntityType.Parrot; + mappings[63] = EntityType.Phantom; + mappings[64] = EntityType.Pig; + mappings[65] = EntityType.Piglin; + mappings[66] = EntityType.PiglinBrute; + mappings[67] = EntityType.Pillager; + mappings[68] = EntityType.PolarBear; + mappings[69] = EntityType.Tnt; + mappings[70] = EntityType.Pufferfish; + mappings[71] = EntityType.Rabbit; + mappings[72] = EntityType.Ravager; + mappings[73] = EntityType.Salmon; + mappings[74] = EntityType.Sheep; + mappings[75] = EntityType.Shulker; + mappings[76] = EntityType.ShulkerBullet; + mappings[77] = EntityType.Silverfish; + mappings[78] = EntityType.Skeleton; + mappings[79] = EntityType.SkeletonHorse; + mappings[80] = EntityType.Slime; + mappings[81] = EntityType.SmallFireball; + mappings[82] = EntityType.SnowGolem; + mappings[83] = EntityType.Snowball; + mappings[84] = EntityType.SpectralArrow; + mappings[85] = EntityType.Spider; + mappings[86] = EntityType.Squid; + mappings[87] = EntityType.Stray; + mappings[88] = EntityType.Strider; + mappings[89] = EntityType.Egg; + mappings[90] = EntityType.EnderPearl; + mappings[91] = EntityType.ExperienceBottle; + mappings[92] = EntityType.Potion; + mappings[93] = EntityType.Trident; + mappings[94] = EntityType.TraderLlama; + mappings[95] = EntityType.TropicalFish; + mappings[96] = EntityType.Turtle; + mappings[97] = EntityType.Vex; + mappings[98] = EntityType.Villager; + mappings[99] = EntityType.Vindicator; + mappings[100] = EntityType.WanderingTrader; + mappings[101] = EntityType.Witch; + mappings[102] = EntityType.Wither; + mappings[103] = EntityType.WitherSkeleton; + mappings[104] = EntityType.WitherSkull; + mappings[105] = EntityType.Wolf; + mappings[106] = EntityType.Zoglin; + mappings[107] = EntityType.Zombie; + mappings[108] = EntityType.ZombieHorse; + mappings[109] = EntityType.ZombieVillager; + mappings[110] = EntityType.ZombifiedPiglin; + mappings[111] = EntityType.Player; + mappings[112] = EntityType.FishingBobber; + } + + protected override Dictionary GetDict() + { + return mappings; + } + } +} diff --git a/MinecraftClient/Mapping/EntityType.cs b/MinecraftClient/Mapping/EntityType.cs index b2d62b55..a0368e98 100644 --- a/MinecraftClient/Mapping/EntityType.cs +++ b/MinecraftClient/Mapping/EntityType.cs @@ -17,6 +17,7 @@ namespace MinecraftClient.Mapping AreaEffectCloud, ArmorStand, Arrow, + Axolotl, Bat, Bee, Blaze, @@ -53,6 +54,9 @@ namespace MinecraftClient.Mapping FurnaceMinecart, Ghast, Giant, + GlowItemFrame, + GlowSquid, + Goat, Guardian, Hoglin, HopperMinecart, @@ -67,6 +71,7 @@ namespace MinecraftClient.Mapping Llama, LlamaSpit, MagmaCube, + Marker, Minecart, Mooshroom, Mule, diff --git a/MinecraftClient/Mapping/EntityTypeExtensions.cs b/MinecraftClient/Mapping/EntityTypeExtensions.cs index 6e3029dd..a467b3ad 100644 --- a/MinecraftClient/Mapping/EntityTypeExtensions.cs +++ b/MinecraftClient/Mapping/EntityTypeExtensions.cs @@ -62,6 +62,7 @@ namespace MinecraftClient.Mapping { switch (e) { + case EntityType.GlowItemFrame: case EntityType.Item: case EntityType.ItemFrame: case EntityType.EyeOfEnder: diff --git a/MinecraftClient/Mapping/Location.cs b/MinecraftClient/Mapping/Location.cs index 00f18071..cf45c493 100644 --- a/MinecraftClient/Mapping/Location.cs +++ b/MinecraftClient/Mapping/Location.cs @@ -14,7 +14,7 @@ namespace MinecraftClient.Mapping /// The X Coordinate /// public double X; - + /// /// The Y Coordinate (vertical) /// @@ -79,7 +79,7 @@ namespace MinecraftClient.Mapping { get { - return (int)Math.Floor(Y / Chunk.SizeY); + return (int)Math.Floor((Y - World.GetDimension().minY) / Chunk.SizeY); } } @@ -299,7 +299,7 @@ namespace MinecraftClient.Mapping /// String representation of the location public override string ToString() { - return String.Format("X:{0} Y:{1} Z:{2}", X, Y, Z); + return String.Format("X:{0:0.00} Y:{1:0.00} Z:{2:0.00}", X, Y, Z); } } } diff --git a/MinecraftClient/Mapping/Material.cs b/MinecraftClient/Mapping/Material.cs index f695a6e4..ea5cc704 100644 --- a/MinecraftClient/Mapping/Material.cs +++ b/MinecraftClient/Mapping/Material.cs @@ -14,768 +14,903 @@ /// public enum Material { - Air, - Stone, - Granite, - PolishedGranite, - Diorite, - PolishedDiorite, - Andesite, - PolishedAndesite, - GrassBlock, - Dirt, - CoarseDirt, - Podzol, - Cobblestone, - OakPlanks, - SprucePlanks, - BirchPlanks, - JunglePlanks, - AcaciaPlanks, - DarkOakPlanks, - OakSapling, - SpruceSapling, - BirchSapling, - JungleSapling, - AcaciaSapling, - DarkOakSapling, - Bedrock, - Water, - Lava, - Sand, - RedSand, - Gravel, - GoldOre, - IronOre, - CoalOre, - NetherGoldOre, - OakLog, - SpruceLog, - BirchLog, - JungleLog, - AcaciaLog, - DarkOakLog, - StrippedSpruceLog, - StrippedBirchLog, - StrippedJungleLog, - StrippedAcaciaLog, - StrippedDarkOakLog, - StrippedOakLog, - OakWood, - SpruceWood, - BirchWood, - JungleWood, - AcaciaWood, - DarkOakWood, - StrippedOakWood, - StrippedSpruceWood, - StrippedBirchWood, - StrippedJungleWood, - StrippedAcaciaWood, - StrippedDarkOakWood, - OakLeaves, - SpruceLeaves, - BirchLeaves, - JungleLeaves, - AcaciaLeaves, - DarkOakLeaves, - Sponge, - WetSponge, - Glass, - LapisOre, - LapisBlock, - Dispenser, - Sandstone, - ChiseledSandstone, - CutSandstone, - NoteBlock, - WhiteBed, - OrangeBed, - MagentaBed, - LightBlueBed, - YellowBed, - LimeBed, - PinkBed, - GrayBed, - LightGrayBed, - CyanBed, - PurpleBed, - BlueBed, - BrownBed, - GreenBed, - RedBed, - BlackBed, - PoweredRail, - DetectorRail, - StickyPiston, - Cobweb, - Grass, - Fern, - DeadBush, - Seagrass, - TallSeagrass, - Piston, - PistonHead, - WhiteWool, - OrangeWool, - MagentaWool, - LightBlueWool, - YellowWool, - LimeWool, - PinkWool, - GrayWool, - LightGrayWool, - CyanWool, - PurpleWool, - BlueWool, - BrownWool, - GreenWool, - RedWool, - BlackWool, - MovingPiston, - Dandelion, - Poppy, - BlueOrchid, - Allium, - AzureBluet, - RedTulip, - OrangeTulip, - WhiteTulip, - PinkTulip, - OxeyeDaisy, - Cornflower, - WitherRose, - LilyOfTheValley, - BrownMushroom, - RedMushroom, - GoldBlock, - IronBlock, - Bricks, - Tnt, - Bookshelf, - MossyCobblestone, - Obsidian, - Torch, - WallTorch, - Fire, - SoulFire, - Spawner, - OakStairs, - Chest, - RedstoneWire, - DiamondOre, - DiamondBlock, - CraftingTable, - Wheat, - Farmland, - Furnace, - OakSign, - SpruceSign, - BirchSign, - AcaciaSign, - JungleSign, - DarkOakSign, - OakDoor, - Ladder, - Rail, - CobblestoneStairs, - OakWallSign, - SpruceWallSign, - BirchWallSign, - AcaciaWallSign, - JungleWallSign, - DarkOakWallSign, - Lever, - StonePressurePlate, - IronDoor, - OakPressurePlate, - SprucePressurePlate, - BirchPressurePlate, - JunglePressurePlate, - AcaciaPressurePlate, - DarkOakPressurePlate, - RedstoneOre, - RedstoneTorch, - RedstoneWallTorch, - StoneButton, - Snow, - Ice, - SnowBlock, - Cactus, - Clay, - SugarCane, - Jukebox, - OakFence, - Pumpkin, - Netherrack, - SoulSand, - SoulSoil, - Basalt, - PolishedBasalt, - SoulTorch, - SoulWallTorch, - Glowstone, - NetherPortal, - CarvedPumpkin, - JackOLantern, - Cake, - Repeater, - WhiteStainedGlass, - OrangeStainedGlass, - MagentaStainedGlass, - LightBlueStainedGlass, - YellowStainedGlass, - LimeStainedGlass, - PinkStainedGlass, - GrayStainedGlass, - LightGrayStainedGlass, - CyanStainedGlass, - PurpleStainedGlass, - BlueStainedGlass, - BrownStainedGlass, - GreenStainedGlass, - RedStainedGlass, - BlackStainedGlass, - OakTrapdoor, - SpruceTrapdoor, - BirchTrapdoor, - JungleTrapdoor, - AcaciaTrapdoor, - DarkOakTrapdoor, - StoneBricks, - MossyStoneBricks, - CrackedStoneBricks, - ChiseledStoneBricks, - InfestedStone, - InfestedCobblestone, - InfestedStoneBricks, - InfestedMossyStoneBricks, - InfestedCrackedStoneBricks, - InfestedChiseledStoneBricks, - BrownMushroomBlock, - RedMushroomBlock, - MushroomStem, - IronBars, - Chain, - GlassPane, - Melon, - AttachedPumpkinStem, - AttachedMelonStem, - PumpkinStem, - MelonStem, - Vine, - OakFenceGate, - BrickStairs, - StoneBrickStairs, - Mycelium, - LilyPad, - NetherBricks, - NetherBrickFence, - NetherBrickStairs, - NetherWart, - EnchantingTable, - BrewingStand, - Cauldron, - EndPortal, - EndPortalFrame, - EndStone, - DragonEgg, - RedstoneLamp, - Cocoa, - SandstoneStairs, - EmeraldOre, - EnderChest, - TripwireHook, - Tripwire, - EmeraldBlock, - SpruceStairs, - BirchStairs, - JungleStairs, - CommandBlock, - Beacon, - CobblestoneWall, - MossyCobblestoneWall, - FlowerPot, - PottedOakSapling, - PottedSpruceSapling, - PottedBirchSapling, - PottedJungleSapling, - PottedAcaciaSapling, - PottedDarkOakSapling, - PottedFern, - PottedDandelion, - PottedPoppy, - PottedBlueOrchid, - PottedAllium, - PottedAzureBluet, - PottedRedTulip, - PottedOrangeTulip, - PottedWhiteTulip, - PottedPinkTulip, - PottedOxeyeDaisy, - PottedCornflower, - PottedLilyOfTheValley, - PottedWitherRose, - PottedRedMushroom, - PottedBrownMushroom, - PottedDeadBush, - PottedCactus, - Carrots, - Potatoes, - OakButton, - SpruceButton, - BirchButton, - JungleButton, AcaciaButton, - DarkOakButton, - SkeletonSkull, - SkeletonWallSkull, - WitherSkeletonSkull, - WitherSkeletonWallSkull, - ZombieHead, - ZombieWallHead, - PlayerHead, - PlayerWallHead, - CreeperHead, - CreeperWallHead, - DragonHead, - DragonWallHead, - Anvil, - ChippedAnvil, - DamagedAnvil, - TrappedChest, - LightWeightedPressurePlate, - HeavyWeightedPressurePlate, - Comparator, - DaylightDetector, - RedstoneBlock, - NetherQuartzOre, - Hopper, - QuartzBlock, - ChiseledQuartzBlock, - QuartzPillar, - QuartzStairs, - ActivatorRail, - Dropper, - WhiteTerracotta, - OrangeTerracotta, - MagentaTerracotta, - LightBlueTerracotta, - YellowTerracotta, - LimeTerracotta, - PinkTerracotta, - GrayTerracotta, - LightGrayTerracotta, - CyanTerracotta, - PurpleTerracotta, - BlueTerracotta, - BrownTerracotta, - GreenTerracotta, - RedTerracotta, - BlackTerracotta, - WhiteStainedGlassPane, - OrangeStainedGlassPane, - MagentaStainedGlassPane, - LightBlueStainedGlassPane, - YellowStainedGlassPane, - LimeStainedGlassPane, - PinkStainedGlassPane, - GrayStainedGlassPane, - LightGrayStainedGlassPane, - CyanStainedGlassPane, - PurpleStainedGlassPane, - BlueStainedGlassPane, - BrownStainedGlassPane, - GreenStainedGlassPane, - RedStainedGlassPane, - BlackStainedGlassPane, - AcaciaStairs, - DarkOakStairs, - SlimeBlock, - Barrier, - IronTrapdoor, - Prismarine, - PrismarineBricks, - DarkPrismarine, - PrismarineStairs, - PrismarineBrickStairs, - DarkPrismarineStairs, - PrismarineSlab, - PrismarineBrickSlab, - DarkPrismarineSlab, - SeaLantern, - HayBlock, - WhiteCarpet, - OrangeCarpet, - MagentaCarpet, - LightBlueCarpet, - YellowCarpet, - LimeCarpet, - PinkCarpet, - GrayCarpet, - LightGrayCarpet, - CyanCarpet, - PurpleCarpet, - BlueCarpet, - BrownCarpet, - GreenCarpet, - RedCarpet, - BlackCarpet, - Terracotta, - CoalBlock, - PackedIce, - Sunflower, - Lilac, - RoseBush, - Peony, - TallGrass, - LargeFern, - WhiteBanner, - OrangeBanner, - MagentaBanner, - LightBlueBanner, - YellowBanner, - LimeBanner, - PinkBanner, - GrayBanner, - LightGrayBanner, - CyanBanner, - PurpleBanner, - BlueBanner, - BrownBanner, - GreenBanner, - RedBanner, - BlackBanner, - WhiteWallBanner, - OrangeWallBanner, - MagentaWallBanner, - LightBlueWallBanner, - YellowWallBanner, - LimeWallBanner, - PinkWallBanner, - GrayWallBanner, - LightGrayWallBanner, - CyanWallBanner, - PurpleWallBanner, - BlueWallBanner, - BrownWallBanner, - GreenWallBanner, - RedWallBanner, - BlackWallBanner, - RedSandstone, - ChiseledRedSandstone, - CutRedSandstone, - RedSandstoneStairs, - OakSlab, - SpruceSlab, - BirchSlab, - JungleSlab, - AcaciaSlab, - DarkOakSlab, - StoneSlab, - SmoothStoneSlab, - SandstoneSlab, - CutSandstoneSlab, - PetrifiedOakSlab, - CobblestoneSlab, - BrickSlab, - StoneBrickSlab, - NetherBrickSlab, - QuartzSlab, - RedSandstoneSlab, - CutRedSandstoneSlab, - PurpurSlab, - SmoothStone, - SmoothSandstone, - SmoothQuartz, - SmoothRedSandstone, - SpruceFenceGate, - BirchFenceGate, - JungleFenceGate, - AcaciaFenceGate, - DarkOakFenceGate, - SpruceFence, - BirchFence, - JungleFence, - AcaciaFence, - DarkOakFence, - SpruceDoor, - BirchDoor, - JungleDoor, AcaciaDoor, - DarkOakDoor, - EndRod, - ChorusPlant, - ChorusFlower, - PurpurBlock, - PurpurPillar, - PurpurStairs, - EndStoneBricks, - Beetroots, - GrassPath, - EndGateway, - RepeatingCommandBlock, - ChainCommandBlock, - FrostedIce, - MagmaBlock, - NetherWartBlock, - RedNetherBricks, - BoneBlock, - StructureVoid, - Observer, - ShulkerBox, - WhiteShulkerBox, - OrangeShulkerBox, - MagentaShulkerBox, - LightBlueShulkerBox, - YellowShulkerBox, - LimeShulkerBox, - PinkShulkerBox, - GrayShulkerBox, - LightGrayShulkerBox, - CyanShulkerBox, - PurpleShulkerBox, - BlueShulkerBox, - BrownShulkerBox, - GreenShulkerBox, - RedShulkerBox, - BlackShulkerBox, - WhiteGlazedTerracotta, - OrangeGlazedTerracotta, - MagentaGlazedTerracotta, - LightBlueGlazedTerracotta, - YellowGlazedTerracotta, - LimeGlazedTerracotta, - PinkGlazedTerracotta, - GrayGlazedTerracotta, - LightGrayGlazedTerracotta, - CyanGlazedTerracotta, - PurpleGlazedTerracotta, - BlueGlazedTerracotta, - BrownGlazedTerracotta, - GreenGlazedTerracotta, - RedGlazedTerracotta, - BlackGlazedTerracotta, - WhiteConcrete, - OrangeConcrete, - MagentaConcrete, - LightBlueConcrete, - YellowConcrete, - LimeConcrete, - PinkConcrete, - GrayConcrete, - LightGrayConcrete, - CyanConcrete, - PurpleConcrete, - BlueConcrete, - BrownConcrete, - GreenConcrete, - RedConcrete, - BlackConcrete, - WhiteConcretePowder, - OrangeConcretePowder, - MagentaConcretePowder, - LightBlueConcretePowder, - YellowConcretePowder, - LimeConcretePowder, - PinkConcretePowder, - GrayConcretePowder, - LightGrayConcretePowder, - CyanConcretePowder, - PurpleConcretePowder, - BlueConcretePowder, - BrownConcretePowder, - GreenConcretePowder, - RedConcretePowder, - BlackConcretePowder, - Kelp, - KelpPlant, - DriedKelpBlock, - TurtleEgg, - DeadTubeCoralBlock, - DeadBrainCoralBlock, - DeadBubbleCoralBlock, - DeadFireCoralBlock, - DeadHornCoralBlock, - TubeCoralBlock, - BrainCoralBlock, - BubbleCoralBlock, - FireCoralBlock, - HornCoralBlock, - DeadTubeCoral, - DeadBrainCoral, - DeadBubbleCoral, - DeadFireCoral, - DeadHornCoral, - TubeCoral, - BrainCoral, - BubbleCoral, - FireCoral, - HornCoral, - DeadTubeCoralFan, - DeadBrainCoralFan, - DeadBubbleCoralFan, - DeadFireCoralFan, - DeadHornCoralFan, - TubeCoralFan, - BrainCoralFan, - BubbleCoralFan, - FireCoralFan, - HornCoralFan, - DeadTubeCoralWallFan, - DeadBrainCoralWallFan, - DeadBubbleCoralWallFan, - DeadFireCoralWallFan, - DeadHornCoralWallFan, - TubeCoralWallFan, - BrainCoralWallFan, - BubbleCoralWallFan, - FireCoralWallFan, - HornCoralWallFan, - SeaPickle, - BlueIce, - Conduit, - BambooSapling, - Bamboo, - PottedBamboo, - VoidAir, - CaveAir, - BubbleColumn, - PolishedGraniteStairs, - SmoothRedSandstoneStairs, - MossyStoneBrickStairs, - PolishedDioriteStairs, - MossyCobblestoneStairs, - EndStoneBrickStairs, - StoneStairs, - SmoothSandstoneStairs, - SmoothQuartzStairs, - GraniteStairs, - AndesiteStairs, - RedNetherBrickStairs, - PolishedAndesiteStairs, - DioriteStairs, - PolishedGraniteSlab, - SmoothRedSandstoneSlab, - MossyStoneBrickSlab, - PolishedDioriteSlab, - MossyCobblestoneSlab, - EndStoneBrickSlab, - SmoothSandstoneSlab, - SmoothQuartzSlab, - GraniteSlab, - AndesiteSlab, - RedNetherBrickSlab, - PolishedAndesiteSlab, - DioriteSlab, - BrickWall, - PrismarineWall, - RedSandstoneWall, - MossyStoneBrickWall, - GraniteWall, - StoneBrickWall, - NetherBrickWall, - AndesiteWall, - RedNetherBrickWall, - SandstoneWall, - EndStoneBrickWall, - DioriteWall, - Scaffolding, - Loom, - Barrel, - Smoker, - BlastFurnace, - CartographyTable, - FletchingTable, - Grindstone, - Lectern, - SmithingTable, - Stonecutter, - Bell, - Lantern, - SoulLantern, - Campfire, - SoulCampfire, - SweetBerryBush, - WarpedStem, - StrippedWarpedStem, - WarpedHyphae, - StrippedWarpedHyphae, - WarpedNylium, - WarpedFungus, - WarpedWartBlock, - WarpedRoots, - NetherSprouts, - CrimsonStem, - StrippedCrimsonStem, - CrimsonHyphae, - StrippedCrimsonHyphae, - CrimsonNylium, - CrimsonFungus, - Shroomlight, - WeepingVines, - WeepingVinesPlant, - TwistingVines, - TwistingVinesPlant, - CrimsonRoots, - CrimsonPlanks, - WarpedPlanks, - CrimsonSlab, - WarpedSlab, - CrimsonPressurePlate, - WarpedPressurePlate, - CrimsonFence, - WarpedFence, - CrimsonTrapdoor, - WarpedTrapdoor, - CrimsonFenceGate, - WarpedFenceGate, - CrimsonStairs, - WarpedStairs, - CrimsonButton, - WarpedButton, - CrimsonDoor, - WarpedDoor, - CrimsonSign, - WarpedSign, - CrimsonWallSign, - WarpedWallSign, - StructureBlock, - Jigsaw, - Composter, - Target, - BeeNest, - Beehive, - HoneyBlock, - HoneycombBlock, - NetheriteBlock, + AcaciaFence, + AcaciaFenceGate, + AcaciaLeaves, + AcaciaLog, + AcaciaPlanks, + AcaciaPressurePlate, + AcaciaSapling, + AcaciaSign, + AcaciaSlab, + AcaciaStairs, + AcaciaTrapdoor, + AcaciaWallSign, + AcaciaWood, + ActivatorRail, + Air, + Allium, + AmethystBlock, + AmethystCluster, AncientDebris, - CryingObsidian, - RespawnAnchor, - PottedCrimsonFungus, - PottedWarpedFungus, - PottedCrimsonRoots, - PottedWarpedRoots, - Lodestone, + Andesite, + AndesiteSlab, + AndesiteStairs, + AndesiteWall, + Anvil, + AttachedMelonStem, + AttachedPumpkinStem, + Azalea, + AzaleaLeaves, + AzureBluet, + Bamboo, + BambooSapling, + Barrel, + Barrier, + Basalt, + Beacon, + Bedrock, + Beehive, + BeeNest, + Beetroots, + Bell, + BigDripleaf, + BigDripleafStem, + BirchButton, + BirchDoor, + BirchFence, + BirchFenceGate, + BirchLeaves, + BirchLog, + BirchPlanks, + BirchPressurePlate, + BirchSapling, + BirchSign, + BirchSlab, + BirchStairs, + BirchTrapdoor, + BirchWallSign, + BirchWood, + BlackBanner, + BlackBed, + BlackCandle, + BlackCandleCake, + BlackCarpet, + BlackConcrete, + BlackConcretePowder, + BlackGlazedTerracotta, + BlackShulkerBox, + BlackStainedGlass, + BlackStainedGlassPane, Blackstone, + BlackstoneSlab, BlackstoneStairs, BlackstoneWall, - BlackstoneSlab, + BlackTerracotta, + BlackWallBanner, + BlackWool, + BlastFurnace, + BlueBanner, + BlueBed, + BlueCandle, + BlueCandleCake, + BlueCarpet, + BlueConcrete, + BlueConcretePowder, + BlueGlazedTerracotta, + BlueIce, + BlueOrchid, + BlueShulkerBox, + BlueStainedGlass, + BlueStainedGlassPane, + BlueTerracotta, + BlueWallBanner, + BlueWool, + BoneBlock, + Bookshelf, + BrainCoral, + BrainCoralBlock, + BrainCoralFan, + BrainCoralWallFan, + BrewingStand, + Bricks, + BrickSlab, + BrickStairs, + BrickWall, + BrownBanner, + BrownBed, + BrownCandle, + BrownCandleCake, + BrownCarpet, + BrownConcrete, + BrownConcretePowder, + BrownGlazedTerracotta, + BrownMushroom, + BrownMushroomBlock, + BrownShulkerBox, + BrownStainedGlass, + BrownStainedGlassPane, + BrownTerracotta, + BrownWallBanner, + BrownWool, + BubbleColumn, + BubbleCoral, + BubbleCoralBlock, + BubbleCoralFan, + BubbleCoralWallFan, + BuddingAmethyst, + Cactus, + Cake, + Calcite, + Campfire, + Candle, + CandleCake, + Carrots, + CartographyTable, + CarvedPumpkin, + Cauldron, + CaveAir, + CaveVines, + CaveVinesPlant, + Chain, + ChainCommandBlock, + Chest, + ChippedAnvil, + ChiseledDeepslate, + ChiseledNetherBricks, + ChiseledPolishedBlackstone, + ChiseledQuartzBlock, + ChiseledRedSandstone, + ChiseledSandstone, + ChiseledStoneBricks, + ChorusFlower, + ChorusPlant, + Clay, + CoalBlock, + CoalOre, + CoarseDirt, + CobbledDeepslate, + CobbledDeepslateSlab, + CobbledDeepslateStairs, + CobbledDeepslateWall, + Cobblestone, + CobblestoneSlab, + CobblestoneStairs, + CobblestoneWall, + Cobweb, + Cocoa, + CommandBlock, + Comparator, + Composter, + Conduit, + CopperBlock, + CopperOre, + Cornflower, + CrackedDeepslateBricks, + CrackedDeepslateTiles, + CrackedNetherBricks, + CrackedPolishedBlackstoneBricks, + CrackedStoneBricks, + CraftingTable, + CreeperHead, + CreeperWallHead, + CrimsonButton, + CrimsonDoor, + CrimsonFence, + CrimsonFenceGate, + CrimsonFungus, + CrimsonHyphae, + CrimsonNylium, + CrimsonPlanks, + CrimsonPressurePlate, + CrimsonRoots, + CrimsonSign, + CrimsonSlab, + CrimsonStairs, + CrimsonStem, + CrimsonTrapdoor, + CrimsonWallSign, + CryingObsidian, + CutCopper, + CutCopperSlab, + CutCopperStairs, + CutRedSandstone, + CutRedSandstoneSlab, + CutSandstone, + CutSandstoneSlab, + CyanBanner, + CyanBed, + CyanCandle, + CyanCandleCake, + CyanCarpet, + CyanConcrete, + CyanConcretePowder, + CyanGlazedTerracotta, + CyanShulkerBox, + CyanStainedGlass, + CyanStainedGlassPane, + CyanTerracotta, + CyanWallBanner, + CyanWool, + DamagedAnvil, + Dandelion, + DarkOakButton, + DarkOakDoor, + DarkOakFence, + DarkOakFenceGate, + DarkOakLeaves, + DarkOakLog, + DarkOakPlanks, + DarkOakPressurePlate, + DarkOakSapling, + DarkOakSign, + DarkOakSlab, + DarkOakStairs, + DarkOakTrapdoor, + DarkOakWallSign, + DarkOakWood, + DarkPrismarine, + DarkPrismarineSlab, + DarkPrismarineStairs, + DaylightDetector, + DeadBrainCoral, + DeadBrainCoralBlock, + DeadBrainCoralFan, + DeadBrainCoralWallFan, + DeadBubbleCoral, + DeadBubbleCoralBlock, + DeadBubbleCoralFan, + DeadBubbleCoralWallFan, + DeadBush, + DeadFireCoral, + DeadFireCoralBlock, + DeadFireCoralFan, + DeadFireCoralWallFan, + DeadHornCoral, + DeadHornCoralBlock, + DeadHornCoralFan, + DeadHornCoralWallFan, + DeadTubeCoral, + DeadTubeCoralBlock, + DeadTubeCoralFan, + DeadTubeCoralWallFan, + Deepslate, + DeepslateBricks, + DeepslateBrickSlab, + DeepslateBrickStairs, + DeepslateBrickWall, + DeepslateCoalOre, + DeepslateCopperOre, + DeepslateDiamondOre, + DeepslateEmeraldOre, + DeepslateGoldOre, + DeepslateIronOre, + DeepslateLapisOre, + DeepslateRedstoneOre, + DeepslateTiles, + DeepslateTileSlab, + DeepslateTileStairs, + DeepslateTileWall, + DetectorRail, + DiamondBlock, + DiamondOre, + Diorite, + DioriteSlab, + DioriteStairs, + DioriteWall, + Dirt, + Dispenser, + DragonEgg, + DragonHead, + DragonWallHead, + DriedKelpBlock, + DripstoneBlock, + Dropper, + EmeraldBlock, + EmeraldOre, + EnchantingTable, + EnderChest, + EndGateway, + EndPortal, + EndPortalFrame, + EndRod, + EndStone, + EndStoneBricks, + EndStoneBrickSlab, + EndStoneBrickStairs, + EndStoneBrickWall, + ExposedCopper, + ExposedCutCopper, + ExposedCutCopperSlab, + ExposedCutCopperStairs, + Farmland, + Fern, + Fire, + FireCoral, + FireCoralBlock, + FireCoralFan, + FireCoralWallFan, + FletchingTable, + FloweringAzalea, + FloweringAzaleaLeaves, + FlowerPot, + FrostedIce, + Furnace, + GildedBlackstone, + Glass, + GlassPane, + GlowLichen, + Glowstone, + GoldBlock, + GoldOre, + Granite, + GraniteSlab, + GraniteStairs, + GraniteWall, + Grass, + GrassBlock, + GrassPath, + Gravel, + GrayBanner, + GrayBed, + GrayCandle, + GrayCandleCake, + GrayCarpet, + GrayConcrete, + GrayConcretePowder, + GrayGlazedTerracotta, + GrayShulkerBox, + GrayStainedGlass, + GrayStainedGlassPane, + GrayTerracotta, + GrayWallBanner, + GrayWool, + GreenBanner, + GreenBed, + GreenCandle, + GreenCandleCake, + GreenCarpet, + GreenConcrete, + GreenConcretePowder, + GreenGlazedTerracotta, + GreenShulkerBox, + GreenStainedGlass, + GreenStainedGlassPane, + GreenTerracotta, + GreenWallBanner, + GreenWool, + Grindstone, + HangingRoots, + HayBlock, + HeavyWeightedPressurePlate, + HoneyBlock, + HoneycombBlock, + Hopper, + HornCoral, + HornCoralBlock, + HornCoralFan, + HornCoralWallFan, + Ice, + InfestedChiseledStoneBricks, + InfestedCobblestone, + InfestedCrackedStoneBricks, + InfestedDeepslate, + InfestedMossyStoneBricks, + InfestedStone, + InfestedStoneBricks, + IronBars, + IronBlock, + IronDoor, + IronOre, + IronTrapdoor, + JackOLantern, + Jigsaw, + Jukebox, + JungleButton, + JungleDoor, + JungleFence, + JungleFenceGate, + JungleLeaves, + JungleLog, + JunglePlanks, + JunglePressurePlate, + JungleSapling, + JungleSign, + JungleSlab, + JungleStairs, + JungleTrapdoor, + JungleWallSign, + JungleWood, + Kelp, + KelpPlant, + Ladder, + Lantern, + LapisBlock, + LapisOre, + LargeAmethystBud, + LargeFern, + Lava, + LavaCauldron, + Lectern, + Lever, + Light, + LightBlueBanner, + LightBlueBed, + LightBlueCandle, + LightBlueCandleCake, + LightBlueCarpet, + LightBlueConcrete, + LightBlueConcretePowder, + LightBlueGlazedTerracotta, + LightBlueShulkerBox, + LightBlueStainedGlass, + LightBlueStainedGlassPane, + LightBlueTerracotta, + LightBlueWallBanner, + LightBlueWool, + LightGrayBanner, + LightGrayBed, + LightGrayCandle, + LightGrayCandleCake, + LightGrayCarpet, + LightGrayConcrete, + LightGrayConcretePowder, + LightGrayGlazedTerracotta, + LightGrayShulkerBox, + LightGrayStainedGlass, + LightGrayStainedGlassPane, + LightGrayTerracotta, + LightGrayWallBanner, + LightGrayWool, + LightningRod, + LightWeightedPressurePlate, + Lilac, + LilyOfTheValley, + LilyPad, + LimeBanner, + LimeBed, + LimeCandle, + LimeCandleCake, + LimeCarpet, + LimeConcrete, + LimeConcretePowder, + LimeGlazedTerracotta, + LimeShulkerBox, + LimeStainedGlass, + LimeStainedGlassPane, + LimeTerracotta, + LimeWallBanner, + LimeWool, + Lodestone, + Loom, + MagentaBanner, + MagentaBed, + MagentaCandle, + MagentaCandleCake, + MagentaCarpet, + MagentaConcrete, + MagentaConcretePowder, + MagentaGlazedTerracotta, + MagentaShulkerBox, + MagentaStainedGlass, + MagentaStainedGlassPane, + MagentaTerracotta, + MagentaWallBanner, + MagentaWool, + MagmaBlock, + MediumAmethystBud, + Melon, + MelonStem, + MossBlock, + MossCarpet, + MossyCobblestone, + MossyCobblestoneSlab, + MossyCobblestoneStairs, + MossyCobblestoneWall, + MossyStoneBricks, + MossyStoneBrickSlab, + MossyStoneBrickStairs, + MossyStoneBrickWall, + MovingPiston, + MushroomStem, + Mycelium, + NetherBrickFence, + NetherBricks, + NetherBrickSlab, + NetherBrickStairs, + NetherBrickWall, + NetherGoldOre, + NetheriteBlock, + NetherPortal, + NetherQuartzOre, + Netherrack, + NetherSprouts, + NetherWart, + NetherWartBlock, + NoteBlock, + OakButton, + OakDoor, + OakFence, + OakFenceGate, + OakLeaves, + OakLog, + OakPlanks, + OakPressurePlate, + OakSapling, + OakSign, + OakSlab, + OakStairs, + OakTrapdoor, + OakWallSign, + OakWood, + Observer, + Obsidian, + OrangeBanner, + OrangeBed, + OrangeCandle, + OrangeCandleCake, + OrangeCarpet, + OrangeConcrete, + OrangeConcretePowder, + OrangeGlazedTerracotta, + OrangeShulkerBox, + OrangeStainedGlass, + OrangeStainedGlassPane, + OrangeTerracotta, + OrangeTulip, + OrangeWallBanner, + OrangeWool, + OxeyeDaisy, + OxidizedCopper, + OxidizedCutCopper, + OxidizedCutCopperSlab, + OxidizedCutCopperStairs, + PackedIce, + Peony, + PetrifiedOakSlab, + PinkBanner, + PinkBed, + PinkCandle, + PinkCandleCake, + PinkCarpet, + PinkConcrete, + PinkConcretePowder, + PinkGlazedTerracotta, + PinkShulkerBox, + PinkStainedGlass, + PinkStainedGlassPane, + PinkTerracotta, + PinkTulip, + PinkWallBanner, + PinkWool, + Piston, + PistonHead, + PlayerHead, + PlayerWallHead, + Podzol, + PointedDripstone, + PolishedAndesite, + PolishedAndesiteSlab, + PolishedAndesiteStairs, + PolishedBasalt, PolishedBlackstone, PolishedBlackstoneBricks, - CrackedPolishedBlackstoneBricks, - ChiseledPolishedBlackstone, PolishedBlackstoneBrickSlab, PolishedBlackstoneBrickStairs, PolishedBlackstoneBrickWall, - GildedBlackstone, - PolishedBlackstoneStairs, - PolishedBlackstoneSlab, - PolishedBlackstonePressurePlate, PolishedBlackstoneButton, + PolishedBlackstonePressurePlate, + PolishedBlackstoneSlab, + PolishedBlackstoneStairs, PolishedBlackstoneWall, - ChiseledNetherBricks, - CrackedNetherBricks, + PolishedDeepslate, + PolishedDeepslateSlab, + PolishedDeepslateStairs, + PolishedDeepslateWall, + PolishedDiorite, + PolishedDioriteSlab, + PolishedDioriteStairs, + PolishedGranite, + PolishedGraniteSlab, + PolishedGraniteStairs, + Poppy, + Potatoes, + PottedAcaciaSapling, + PottedAllium, + PottedAzaleaBush, + PottedAzureBluet, + PottedBamboo, + PottedBirchSapling, + PottedBlueOrchid, + PottedBrownMushroom, + PottedCactus, + PottedCornflower, + PottedCrimsonFungus, + PottedCrimsonRoots, + PottedDandelion, + PottedDarkOakSapling, + PottedDeadBush, + PottedFern, + PottedFloweringAzaleaBush, + PottedJungleSapling, + PottedLilyOfTheValley, + PottedOakSapling, + PottedOrangeTulip, + PottedOxeyeDaisy, + PottedPinkTulip, + PottedPoppy, + PottedRedMushroom, + PottedRedTulip, + PottedSpruceSapling, + PottedWarpedFungus, + PottedWarpedRoots, + PottedWhiteTulip, + PottedWitherRose, + PowderSnow, + PowderSnowCauldron, + PoweredRail, + Prismarine, + PrismarineBricks, + PrismarineBrickSlab, + PrismarineBrickStairs, + PrismarineSlab, + PrismarineStairs, + PrismarineWall, + Pumpkin, + PumpkinStem, + PurpleBanner, + PurpleBed, + PurpleCandle, + PurpleCandleCake, + PurpleCarpet, + PurpleConcrete, + PurpleConcretePowder, + PurpleGlazedTerracotta, + PurpleShulkerBox, + PurpleStainedGlass, + PurpleStainedGlassPane, + PurpleTerracotta, + PurpleWallBanner, + PurpleWool, + PurpurBlock, + PurpurPillar, + PurpurSlab, + PurpurStairs, + QuartzBlock, QuartzBricks, + QuartzPillar, + QuartzSlab, + QuartzStairs, + Rail, + RawCopperBlock, + RawGoldBlock, + RawIronBlock, + RedBanner, + RedBed, + RedCandle, + RedCandleCake, + RedCarpet, + RedConcrete, + RedConcretePowder, + RedGlazedTerracotta, + RedMushroom, + RedMushroomBlock, + RedNetherBricks, + RedNetherBrickSlab, + RedNetherBrickStairs, + RedNetherBrickWall, + RedSand, + RedSandstone, + RedSandstoneSlab, + RedSandstoneStairs, + RedSandstoneWall, + RedShulkerBox, + RedStainedGlass, + RedStainedGlassPane, + RedstoneBlock, + RedstoneLamp, + RedstoneOre, + RedstoneTorch, + RedstoneWallTorch, + RedstoneWire, + RedTerracotta, + RedTulip, + RedWallBanner, + RedWool, + Repeater, + RepeatingCommandBlock, + RespawnAnchor, + RootedDirt, + RoseBush, + Sand, + Sandstone, + SandstoneSlab, + SandstoneStairs, + SandstoneWall, + Scaffolding, + SculkSensor, + Seagrass, + SeaLantern, + SeaPickle, + Shroomlight, + ShulkerBox, + SkeletonSkull, + SkeletonWallSkull, + SlimeBlock, + SmallAmethystBud, + SmallDripleaf, + SmithingTable, + Smoker, + SmoothBasalt, + SmoothQuartz, + SmoothQuartzSlab, + SmoothQuartzStairs, + SmoothRedSandstone, + SmoothRedSandstoneSlab, + SmoothRedSandstoneStairs, + SmoothSandstone, + SmoothSandstoneSlab, + SmoothSandstoneStairs, + SmoothStone, + SmoothStoneSlab, + Snow, + SnowBlock, + SoulCampfire, + SoulFire, + SoulLantern, + SoulSand, + SoulSoil, + SoulTorch, + SoulWallTorch, + Spawner, + Sponge, + SporeBlossom, + SpruceButton, + SpruceDoor, + SpruceFence, + SpruceFenceGate, + SpruceLeaves, + SpruceLog, + SprucePlanks, + SprucePressurePlate, + SpruceSapling, + SpruceSign, + SpruceSlab, + SpruceStairs, + SpruceTrapdoor, + SpruceWallSign, + SpruceWood, + StickyPiston, + Stone, + StoneBricks, + StoneBrickSlab, + StoneBrickStairs, + StoneBrickWall, + StoneButton, + Stonecutter, + StonePressurePlate, + StoneSlab, + StoneStairs, + StrippedAcaciaLog, + StrippedAcaciaWood, + StrippedBirchLog, + StrippedBirchWood, + StrippedCrimsonHyphae, + StrippedCrimsonStem, + StrippedDarkOakLog, + StrippedDarkOakWood, + StrippedJungleLog, + StrippedJungleWood, + StrippedOakLog, + StrippedOakWood, + StrippedSpruceLog, + StrippedSpruceWood, + StrippedWarpedHyphae, + StrippedWarpedStem, + StructureBlock, + StructureVoid, + SugarCane, + Sunflower, + SweetBerryBush, + TallGrass, + TallSeagrass, + Target, + Terracotta, + TintedGlass, + Tnt, + Torch, + TrappedChest, + Tripwire, + TripwireHook, + TubeCoral, + TubeCoralBlock, + TubeCoralFan, + TubeCoralWallFan, + Tuff, + TurtleEgg, + TwistingVines, + TwistingVinesPlant, + Vine, + VoidAir, + WallTorch, + WarpedButton, + WarpedDoor, + WarpedFence, + WarpedFenceGate, + WarpedFungus, + WarpedHyphae, + WarpedNylium, + WarpedPlanks, + WarpedPressurePlate, + WarpedRoots, + WarpedSign, + WarpedSlab, + WarpedStairs, + WarpedStem, + WarpedTrapdoor, + WarpedWallSign, + WarpedWartBlock, + Water, + WaterCauldron, + WaxedCopperBlock, + WaxedCutCopper, + WaxedCutCopperSlab, + WaxedCutCopperStairs, + WaxedExposedCopper, + WaxedExposedCutCopper, + WaxedExposedCutCopperSlab, + WaxedExposedCutCopperStairs, + WaxedOxidizedCopper, + WaxedOxidizedCutCopper, + WaxedOxidizedCutCopperSlab, + WaxedOxidizedCutCopperStairs, + WaxedWeatheredCopper, + WaxedWeatheredCutCopper, + WaxedWeatheredCutCopperSlab, + WaxedWeatheredCutCopperStairs, + WeatheredCopper, + WeatheredCutCopper, + WeatheredCutCopperSlab, + WeatheredCutCopperStairs, + WeepingVines, + WeepingVinesPlant, + WetSponge, + Wheat, + WhiteBanner, + WhiteBed, + WhiteCandle, + WhiteCandleCake, + WhiteCarpet, + WhiteConcrete, + WhiteConcretePowder, + WhiteGlazedTerracotta, + WhiteShulkerBox, + WhiteStainedGlass, + WhiteStainedGlassPane, + WhiteTerracotta, + WhiteTulip, + WhiteWallBanner, + WhiteWool, + WitherRose, + WitherSkeletonSkull, + WitherSkeletonWallSkull, + YellowBanner, + YellowBed, + YellowCandle, + YellowCandleCake, + YellowCarpet, + YellowConcrete, + YellowConcretePowder, + YellowGlazedTerracotta, + YellowShulkerBox, + YellowStainedGlass, + YellowStainedGlassPane, + YellowTerracotta, + YellowWallBanner, + YellowWool, + ZombieHead, + ZombieWallHead, } } diff --git a/MinecraftClient/Mapping/Material2Tool.cs b/MinecraftClient/Mapping/Material2Tool.cs index 0a3fe8db..d8433808 100644 --- a/MinecraftClient/Mapping/Material2Tool.cs +++ b/MinecraftClient/Mapping/Material2Tool.cs @@ -42,9 +42,11 @@ namespace MinecraftClient.Mapping Material.BrownGlazedTerracotta, Material.BrownShulkerBox, Material.BrownTerracotta, + Material.Calcite, Material.Cauldron, Material.Chain, Material.ChippedAnvil, + Material.ChiseledDeepslate, Material.ChiseledNetherBricks, Material.ChiseledPolishedBlackstone, Material.ChiseledQuartzBlock, @@ -53,11 +55,17 @@ namespace MinecraftClient.Mapping Material.ChiseledStoneBricks, Material.CoalBlock, Material.CoalOre, + Material.CobbledDeepslate, + Material.CobbledDeepslateSlab, + Material.CobbledDeepslateStairs, + Material.CobbledDeepslateWall, Material.Cobblestone, Material.CobblestoneSlab, Material.CobblestoneStairs, Material.CobblestoneWall, Material.Conduit, + Material.CrackedDeepslateBricks, + Material.CrackedDeepslateTiles, Material.CrackedNetherBricks, Material.CrackedPolishedBlackstoneBricks, Material.CrackedStoneBricks, @@ -74,12 +82,23 @@ namespace MinecraftClient.Mapping Material.DarkPrismarine, Material.DarkPrismarineSlab, Material.DarkPrismarineStairs, + Material.Deepslate, + Material.DeepslateBrickSlab, + Material.DeepslateBrickStairs, + Material.DeepslateBrickWall, + Material.DeepslateBricks, + Material.DeepslateCoalOre, + Material.DeepslateTileSlab, + Material.DeepslateTileStairs, + Material.DeepslateTileWall, + Material.DeepslateTiles, Material.DetectorRail, Material.Diorite, Material.DioriteSlab, Material.DioriteStairs, Material.DioriteWall, Material.Dispenser, + Material.DripstoneBlock, Material.Dropper, Material.EnchantingTable, Material.EndRod, @@ -113,6 +132,7 @@ namespace MinecraftClient.Mapping Material.IronDoor, Material.IronTrapdoor, Material.Lantern, + Material.LavaCauldron, Material.LightBlueConcrete, Material.LightBlueGlazedTerracotta, Material.LightBlueShulkerBox, @@ -160,6 +180,7 @@ namespace MinecraftClient.Mapping Material.PinkShulkerBox, Material.PinkTerracotta, Material.Piston, + Material.PointedDripstone, Material.PolishedAndesite, Material.PolishedAndesiteSlab, Material.PolishedAndesiteStairs, @@ -180,6 +201,7 @@ namespace MinecraftClient.Mapping Material.PolishedGranite, Material.PolishedGraniteSlab, Material.PolishedGraniteStairs, + Material.PowderSnowCauldron, Material.PoweredRail, Material.Prismarine, Material.PrismarineBrickSlab, @@ -221,6 +243,7 @@ namespace MinecraftClient.Mapping Material.SandstoneWall, Material.ShulkerBox, Material.Smoker, + Material.SmoothBasalt, Material.SmoothQuartz, Material.SmoothQuartzSlab, Material.SmoothQuartzStairs, @@ -245,7 +268,9 @@ namespace MinecraftClient.Mapping Material.StoneStairs, Material.Stonecutter, Material.Terracotta, + Material.Tuff, Material.WarpedNylium, + Material.WaterCauldron, Material.WhiteConcrete, Material.WhiteGlazedTerracotta, Material.WhiteShulkerBox, @@ -253,26 +278,70 @@ namespace MinecraftClient.Mapping Material.YellowConcrete, Material.YellowGlazedTerracotta, Material.YellowShulkerBox, - Material.YellowTerracotta + Material.YellowTerracotta, }; // Minable by Stone, iron, diamond, netherite. private static readonly List pickaxeTier1 = new List() { + Material.CopperOre, + Material.CopperBlock, + Material.CutCopperSlab, + Material.CutCopperStairs, + Material.CutCopper, + Material.DeepslateCopperOre, + Material.DeepslateIronOre, + Material.DeepslateLapisOre, + Material.ExposedCopper, + Material.ExposedCutCopperSlab, + Material.ExposedCutCopperStairs, + Material.ExposedCutCopper, Material.IronBlock, Material.IronOre, Material.LapisBlock, Material.LapisOre, + Material.LightningRod, + Material.OxidizedCopper, + Material.OxidizedCutCopperSlab, + Material.OxidizedCutCopperStairs, + Material.OxidizedCutCopper, + Material.RawCopperBlock, + Material.RawIronBlock, Material.Terracotta, + Material.WaxedCopperBlock, + Material.WaxedCutCopperSlab, + Material.WaxedCutCopperStairs, + Material.WaxedCutCopper, + Material.WaxedExposedCopper, + Material.WaxedExposedCutCopperSlab, + Material.WaxedExposedCutCopperStairs, + Material.WaxedExposedCutCopper, + Material.WaxedOxidizedCopper, + Material.WaxedOxidizedCutCopperSlab, + Material.WaxedOxidizedCutCopperStairs, + Material.WaxedOxidizedCutCopper, + Material.WaxedWeatheredCopper, + Material.WaxedWeatheredCutCopperSlab, + Material.WaxedWeatheredCutCopperStairs, + Material.WaxedWeatheredCutCopper, + Material.WeatheredCopper, + Material.WeatheredCutCopperSlab, + Material.WeatheredCutCopperStairs, + Material.WeatheredCutCopper, }; // Minable by Iron, diamond, netherite. private static readonly List pickaxeTier2 = new List() { + Material.DeepslateDiamondOre, + Material.DeepslateEmeraldOre, + Material.DeepslateGoldOre, + Material.DeepslateRedstoneOre, Material.DiamondBlock, Material.DiamondOre, Material.EmeraldBlock, Material.EmeraldOre, Material.GoldBlock, Material.GoldOre, + Material.RawGoldBlock, Material.RedstoneOre, }; // Minable by Diamond, Netherite. @@ -314,13 +383,14 @@ namespace MinecraftClient.Mapping Material.PurpleConcretePowder, Material.RedConcretePowder, Material.RedSand, + Material.RootedDirt, Material.Sand, Material.Snow, Material.SnowBlock, Material.SoulSand, Material.SoulSoil, Material.WhiteConcretePowder, - Material.YellowConcretePowder + Material.YellowConcretePowder, }; // Every axe can mine every block (speed difference). private static readonly List axe = new List() @@ -341,6 +411,7 @@ namespace MinecraftClient.Mapping Material.Barrel, Material.BeeNest, Material.Beehive, + Material.BigDripleaf, Material.BirchButton, Material.BirchDoor, Material.BirchFence, @@ -504,12 +575,13 @@ namespace MinecraftClient.Mapping Material.WhiteBanner, Material.WhiteWallBanner, Material.YellowBanner, - Material.YellowWallBanner + Material.YellowWallBanner, }; // Every block a shear can mine. private static readonly List shears = new List() { Material.AcaciaLeaves, + Material.AzaleaLeaves, Material.BirchLeaves, Material.BlackWool, Material.BlueWool, @@ -517,6 +589,7 @@ namespace MinecraftClient.Mapping Material.Cobweb, Material.CyanWool, Material.DarkOakLeaves, + Material.FloweringAzaleaLeaves, Material.GrayWool, Material.GreenWool, Material.JungleLeaves, @@ -539,6 +612,7 @@ namespace MinecraftClient.Mapping Material.Bamboo, Material.Cobweb, Material.InfestedChiseledStoneBricks, + Material.InfestedDeepslate, Material.InfestedCobblestone, Material.InfestedCrackedStoneBricks, Material.InfestedMossyStoneBricks, @@ -553,8 +627,10 @@ namespace MinecraftClient.Mapping Material.DarkOakLeaves, Material.HayBlock, Material.JungleLeaves, + Material.MossBlock, Material.NetherWartBlock, Material.OakLeaves, + Material.SculkSensor, Material.Shroomlight, Material.Sponge, Material.SpruceLeaves, @@ -565,7 +641,7 @@ namespace MinecraftClient.Mapping // Liquids private static readonly List bucket = new List() { - Material.Lava, + Material.Lava, Material.Water }; @@ -597,7 +673,7 @@ namespace MinecraftClient.Mapping { if (pickaxeTier0.Contains(block)) { - return new ItemType[] + return new ItemType[] { ItemType.NetheritePickaxe, ItemType.DiamondPickaxe, @@ -609,7 +685,7 @@ namespace MinecraftClient.Mapping } else if (pickaxeTier1.Contains(block)) { - return new ItemType[] + return new ItemType[] { ItemType.NetheritePickaxe, ItemType.DiamondPickaxe, @@ -620,7 +696,7 @@ namespace MinecraftClient.Mapping } else if (pickaxeTier2.Contains(block)) { - return new ItemType[] + return new ItemType[] { ItemType.NetheritePickaxe, ItemType.DiamondPickaxe, @@ -629,7 +705,7 @@ namespace MinecraftClient.Mapping } else if (pickaxeTier3.Contains(block)) { - return new ItemType[] + return new ItemType[] { ItemType.NetheritePickaxe, ItemType.DiamondPickaxe, @@ -637,7 +713,7 @@ namespace MinecraftClient.Mapping } else if (shovel.Contains(block)) { - return new ItemType[] + return new ItemType[] { ItemType.NetheriteShovel, ItemType.DiamondShovel, @@ -649,7 +725,7 @@ namespace MinecraftClient.Mapping } else if (axe.Contains(block)) { - return new ItemType[] + return new ItemType[] { ItemType.NetheriteAxe, ItemType.DiamondAxe, @@ -661,14 +737,14 @@ namespace MinecraftClient.Mapping } else if (shears.Contains(block)) { - return new ItemType[] + return new ItemType[] { ItemType.Shears, }; } else if (sword.Contains(block)) { - return new ItemType[] + return new ItemType[] { ItemType.NetheriteSword, ItemType.DiamondSword, @@ -680,7 +756,7 @@ namespace MinecraftClient.Mapping } else if (hoe.Contains(block)) { - return new ItemType[] + return new ItemType[] { ItemType.NetheriteHoe, ItemType.DiamondHoe, @@ -692,7 +768,7 @@ namespace MinecraftClient.Mapping } else if (bucket.Contains(block)) { - return new ItemType[] + return new ItemType[] { ItemType.Bucket, }; diff --git a/MinecraftClient/Mapping/MaterialExtensions.cs b/MinecraftClient/Mapping/MaterialExtensions.cs index 166a090b..391097f6 100644 --- a/MinecraftClient/Mapping/MaterialExtensions.cs +++ b/MinecraftClient/Mapping/MaterialExtensions.cs @@ -74,6 +74,8 @@ namespace MinecraftClient.Mapping case Material.JungleLeaves: case Material.AcaciaLeaves: case Material.DarkOakLeaves: + case Material.AzaleaLeaves: + case Material.FloweringAzaleaLeaves: case Material.Sponge: case Material.WetSponge: case Material.Glass: @@ -202,6 +204,9 @@ namespace MinecraftClient.Mapping case Material.EnchantingTable: case Material.BrewingStand: case Material.Cauldron: + case Material.WaterCauldron: + case Material.LavaCauldron: + case Material.PowderSnowCauldron: case Material.EndPortalFrame: case Material.EndStone: case Material.DragonEgg: @@ -518,6 +523,119 @@ namespace MinecraftClient.Mapping case Material.Beehive: case Material.HoneyBlock: case Material.HoneycombBlock: + case Material.Candle: + case Material.WhiteCandle: + case Material.OrangeCandle: + case Material.MagentaCandle: + case Material.LightBlueCandle: + case Material.YellowCandle: + case Material.LimeCandle: + case Material.PinkCandle: + case Material.GrayCandle: + case Material.LightGrayCandle: + case Material.CyanCandle: + case Material.PurpleCandle: + case Material.BlueCandle: + case Material.BrownCandle: + case Material.GreenCandle: + case Material.RedCandle: + case Material.BlackCandle: + case Material.CandleCake: + case Material.WhiteCandleCake: + case Material.OrangeCandleCake: + case Material.MagentaCandleCake: + case Material.LightBlueCandleCake: + case Material.YellowCandleCake: + case Material.LimeCandleCake: + case Material.PinkCandleCake: + case Material.GrayCandleCake: + case Material.LightGrayCandleCake: + case Material.CyanCandleCake: + case Material.PurpleCandleCake: + case Material.BlueCandleCake: + case Material.BrownCandleCake: + case Material.GreenCandleCake: + case Material.RedCandleCake: + case Material.BlackCandleCake: + case Material.AmethystBlock: + case Material.BuddingAmethyst: + case Material.AmethystCluster: + case Material.LargeAmethystBud: + case Material.MediumAmethystBud: + case Material.SmallAmethystBud: + case Material.Tuff: + case Material.Calcite: + case Material.TintedGlass: + case Material.SculkSensor: + case Material.OxidizedCopper: + case Material.WeatheredCopper: + case Material.ExposedCopper: + case Material.CopperBlock: + case Material.CopperOre: + case Material.DeepslateCopperOre: + case Material.OxidizedCutCopper: + case Material.WeatheredCutCopper: + case Material.ExposedCutCopper: + case Material.CutCopper: + case Material.OxidizedCutCopperStairs: + case Material.WeatheredCutCopperStairs: + case Material.ExposedCutCopperStairs: + case Material.CutCopperStairs: + case Material.OxidizedCutCopperSlab: + case Material.WeatheredCutCopperSlab: + case Material.ExposedCutCopperSlab: + case Material.CutCopperSlab: + case Material.WaxedCopperBlock: + case Material.WaxedWeatheredCopper: + case Material.WaxedExposedCopper: + case Material.WaxedOxidizedCopper: + case Material.WaxedOxidizedCutCopper: + case Material.WaxedWeatheredCutCopper: + case Material.WaxedExposedCutCopper: + case Material.WaxedCutCopper: + case Material.WaxedOxidizedCutCopperStairs: + case Material.WaxedWeatheredCutCopperStairs: + case Material.WaxedExposedCutCopperStairs: + case Material.WaxedCutCopperStairs: + case Material.WaxedOxidizedCutCopperSlab: + case Material.WaxedWeatheredCutCopperSlab: + case Material.WaxedExposedCutCopperSlab: + case Material.WaxedCutCopperSlab: + case Material.LightningRod: + case Material.PointedDripstone: + case Material.DripstoneBlock: + case Material.Azalea: + case Material.FloweringAzalea: + case Material.MossCarpet: + case Material.MossBlock: + case Material.RootedDirt: + case Material.Deepslate: + case Material.CobbledDeepslate: + case Material.CobbledDeepslateStairs: + case Material.CobbledDeepslateSlab: + case Material.CobbledDeepslateWall: + case Material.PolishedDeepslate: + case Material.PolishedDeepslateStairs: + case Material.PolishedDeepslateSlab: + case Material.PolishedDeepslateWall: + case Material.DeepslateTiles: + case Material.DeepslateTileStairs: + case Material.DeepslateTileSlab: + case Material.DeepslateTileWall: + case Material.DeepslateBricks: + case Material.DeepslateBrickStairs: + case Material.DeepslateBrickSlab: + case Material.DeepslateBrickWall: + case Material.ChiseledDeepslate: + case Material.CrackedDeepslateBricks: + case Material.CrackedDeepslateTiles: + case Material.InfestedDeepslate: + case Material.SmoothBasalt: + case Material.RawIronBlock: + case Material.RawCopperBlock: + case Material.RawGoldBlock: + case Material.PottedAzaleaBush: + case Material.PottedFloweringAzaleaBush: return true; default: return false; @@ -538,6 +656,7 @@ namespace MinecraftClient.Mapping case Material.Lava: case Material.MagmaBlock: case Material.Campfire: + case Material.PowderSnow: return true; default: return false; diff --git a/MinecraftClient/Mapping/Movement.cs b/MinecraftClient/Mapping/Movement.cs index ec63abe0..8a2715c4 100644 --- a/MinecraftClient/Mapping/Movement.cs +++ b/MinecraftClient/Mapping/Movement.cs @@ -32,7 +32,7 @@ namespace MinecraftClient.Mapping } if (!IsOnGround(world, location) && !IsSwimming(world, location)) { - while (!IsOnGround(world, belowFoots) && belowFoots.Y >= 1) + while (!IsOnGround(world, belowFoots) && belowFoots.Y >= 1 + World.GetDimension().minY) belowFoots = Move(belowFoots, Direction.Down); location = Move2Steps(location, belowFoots, ref motionY, true).Dequeue(); } @@ -446,6 +446,9 @@ namespace MinecraftClient.Mapping /// True if the specified location is on the ground public static bool IsOnGround(World world, Location location) { + if (world.GetChunkColumn(location) == null || world.GetChunkColumn(location).FullyLoaded == false) + return true; // avoid moving downward in a not loaded chunk + return world.GetBlock(Move(location, Direction.Down)).Type.IsSolid() && (location.Y <= Math.Truncate(location.Y) + 0.0001); } diff --git a/MinecraftClient/Mapping/World.cs b/MinecraftClient/Mapping/World.cs index 9a57baae..aee80a25 100644 --- a/MinecraftClient/Mapping/World.cs +++ b/MinecraftClient/Mapping/World.cs @@ -16,11 +16,22 @@ namespace MinecraftClient.Mapping /// private Dictionary> chunks = new Dictionary>(); + /// + /// The dimension info of the world + /// + private static Dimension dimension = new Dimension(); + /// /// Lock for thread safety /// private readonly ReaderWriterLockSlim chunksLock = new ReaderWriterLockSlim(); + /// + /// Chunk data parsing progress + /// + public int chunkCnt = 0; + public int chunkLoadNotCompleted = 0; + /// /// Read, set or unload the specified chunk column /// @@ -78,6 +89,26 @@ namespace MinecraftClient.Mapping } } + /// + /// Set dimension type + /// + /// The name of the dimension type + /// The dimension type (NBT Tag Compound) + public static void SetDimension(string name, Dictionary nbt) + { + // will change in 1.19 and above + dimension = new Dimension(name, nbt); + } + + /// + /// Get current dimension + /// + /// Current dimension + public static Dimension GetDimension() + { + return dimension; + } + /// /// Get chunk column at the specified location /// diff --git a/MinecraftClient/McClient.cs b/MinecraftClient/McClient.cs index 5a9b66db..abc001e8 100644 --- a/MinecraftClient/McClient.cs +++ b/MinecraftClient/McClient.cs @@ -1288,8 +1288,7 @@ namespace MinecraftClient if (inventories.ContainsKey(windowId) && inventories[windowId].Items.ContainsKey(slotId)) item = inventories[windowId].Items[slotId]; - // Inventory update must be after sending packet - bool result = handler.SendWindowAction(windowId, slotId, action, item); + List> changedSlots = new List>(); // List // Update our inventory base on action type var inventory = GetInventory(windowId); @@ -1340,6 +1339,11 @@ namespace MinecraftClient inventory.Items[slotId] = playerInventory.Items[-1]; playerInventory.Items.Remove(-1); } + + if (inventory.Items.ContainsKey(slotId)) + changedSlots.Add(new Tuple((short)slotId, inventory.Items[slotId])); + else + changedSlots.Add(new Tuple((short)slotId, null)); } else { @@ -1352,6 +1356,8 @@ namespace MinecraftClient // Put target slot item to cursor playerInventory.Items[-1] = inventory.Items[slotId]; inventory.Items.Remove(slotId); + + changedSlots.Add(new Tuple((short)slotId, null)); } } break; @@ -1430,6 +1436,10 @@ namespace MinecraftClient } } } + if (inventory.Items.ContainsKey(slotId)) + changedSlots.Add(new Tuple((short)slotId, inventory.Items[slotId])); + else + changedSlots.Add(new Tuple((short)slotId, null)); break; case WindowActionType.ShiftClick: if (slotId == 0) break; @@ -1457,6 +1467,7 @@ namespace MinecraftClient // If hotbar already have same item, will put on it first until every stack are full // If no more same item , will put on the first empty slot (smaller slot id) // If inventory full, item will not move + int itemCount = inventory.Items[slotId].Count; if (slotId <= upperEndSlot) { // Clicked slot is on upper side inventory, put it to hotbar @@ -1476,11 +1487,16 @@ namespace MinecraftClient // Can fit into the stack inventory.Items[_item.Key].Count += inventory.Items[slotId].Count; inventory.Items.Remove(slotId); + + changedSlots.Add(new Tuple((short)_item.Key, inventory.Items[_item.Key])); + changedSlots.Add(new Tuple((short)slotId, null)); } else { inventory.Items[slotId].Count -= spaceLeft; inventory.Items[_item.Key].Count = inventory.Items[_item.Key].Type.StackCount(); + + changedSlots.Add(new Tuple((short)_item.Key, inventory.Items[_item.Key])); } } } @@ -1499,6 +1515,13 @@ namespace MinecraftClient var itemTmp = inventory.Items[slotId]; inventory.Items[emptySlot] = new Item(itemTmp.Type, itemTmp.Count, itemTmp.NBT); inventory.Items.Remove(slotId); + + changedSlots.Add(new Tuple((short)emptySlot, inventory.Items[emptySlot])); + changedSlots.Add(new Tuple((short)slotId, null)); + } + else if (inventory.Items[slotId].Count != itemCount) + { + changedSlots.Add(new Tuple((short)slotId, inventory.Items[slotId])); } } } @@ -1522,11 +1545,16 @@ namespace MinecraftClient // Can fit into the stack inventory.Items[_item.Key].Count += inventory.Items[slotId].Count; inventory.Items.Remove(slotId); + + changedSlots.Add(new Tuple((short)_item.Key, inventory.Items[_item.Key])); + changedSlots.Add(new Tuple((short)slotId, null)); } else { inventory.Items[slotId].Count -= spaceLeft; inventory.Items[_item.Key].Count = inventory.Items[_item.Key].Type.StackCount(); + + changedSlots.Add(new Tuple((short)_item.Key, inventory.Items[_item.Key])); } } } @@ -1546,6 +1574,13 @@ namespace MinecraftClient var itemTmp = inventory.Items[slotId]; inventory.Items[emptySlot] = new Item(itemTmp.Type, itemTmp.Count, itemTmp.NBT); inventory.Items.Remove(slotId); + + changedSlots.Add(new Tuple((short)emptySlot, inventory.Items[emptySlot])); + changedSlots.Add(new Tuple((short)slotId, null)); + } + else if (inventory.Items[slotId].Count != itemCount) + { + changedSlots.Add(new Tuple((short)slotId, inventory.Items[slotId])); } } } @@ -1553,18 +1588,26 @@ namespace MinecraftClient break; case WindowActionType.DropItem: if (inventory.Items.ContainsKey(slotId)) + { inventory.Items[slotId].Count--; + changedSlots.Add(new Tuple((short)slotId, inventory.Items[slotId])); + } if (inventory.Items[slotId].Count <= 0) + { inventory.Items.Remove(slotId); + changedSlots.Add(new Tuple((short)slotId, null)); + } + break; case WindowActionType.DropItemStack: inventory.Items.Remove(slotId); + changedSlots.Add(new Tuple((short)slotId, null)); break; } } - return result; + return handler.SendWindowAction(windowId, slotId, action, item, changedSlots, inventories[windowId].StateID); } /// @@ -2127,11 +2170,12 @@ namespace MinecraftClient /// /// Inventory ID /// Item list, key = slot ID, value = Item information - public void OnWindowItems(byte inventoryID, Dictionary itemList) + public void OnWindowItems(byte inventoryID, Dictionary itemList, int stateId) { if (inventories.ContainsKey(inventoryID)) { inventories[inventoryID].Items = itemList; + inventories[inventoryID].StateID = stateId; DispatchBotEvent(bot => bot.OnInventoryUpdate(inventoryID)); } } @@ -2142,8 +2186,11 @@ namespace MinecraftClient /// Window ID /// Slot ID /// Item (may be null for empty slot) - public void OnSetSlot(byte inventoryID, short slotID, Item item) + public void OnSetSlot(byte inventoryID, short slotID, Item item, int stateId) { + if (inventories.ContainsKey(inventoryID)) + inventories[inventoryID].StateID = stateId; + // Handle inventoryID -2 - Add item to player inventory without animation if (inventoryID == 254) inventoryID = 0; @@ -2591,7 +2638,7 @@ namespace MinecraftClient /// 0 to create/update an item. 1 to remove an item. /// The name of the objective the score belongs to /// he score to be displayed next to the entry. Only sent when Action does not equal 1. - public void OnUpdateScore(string entityname, byte action, string objectivename, int value) + public void OnUpdateScore(string entityname, int action, string objectivename, int value) { DispatchBotEvent(bot => bot.OnUpdateScore(entityname, action, objectivename, value)); } diff --git a/MinecraftClient/Program.cs b/MinecraftClient/Program.cs index 55a5d204..334de9bc 100644 --- a/MinecraftClient/Program.cs +++ b/MinecraftClient/Program.cs @@ -1,4 +1,5 @@ using System; +using System.IO; using System.Collections.Generic; using System.Linq; using System.Text; @@ -8,6 +9,9 @@ using System.Runtime.InteropServices; using System.Threading; using MinecraftClient.Protocol.Handlers.Forge; using MinecraftClient.Protocol.Session; +using MinecraftClient.Mapping.EntityPalettes; +using MinecraftClient.Mapping.BlockPalettes; +using MinecraftClient.Inventory.ItemPalettes; using MinecraftClient.WinAPI; using MinecraftClient.Protocol.Keys; using System.Security.Cryptography; @@ -123,6 +127,82 @@ namespace MinecraftClient return; } + if (args.Contains("--generate")) + { + string dataGenerator = ""; + string dataPath = ""; + + foreach (string argument in args) + { + if (argument.StartsWith("--") && !argument.Contains("--generate")) + { + if (!argument.Contains("=")) + throw new ArgumentException(Translations.Get("error.setting.argument_syntax", argument)); + + string[] argParts = argument.Substring(2).Split('='); + string argName = argParts[0].Trim(); + string argValue = argParts[1].Replace("\"", "").Trim(); + + if (argName == "data-path") + { + Console.WriteLine(dataPath); + dataPath = argValue; + } + + if (argName == "data-generator") + { + dataGenerator = argValue; + } + } + } + + if (string.IsNullOrEmpty(dataGenerator) || !(dataGenerator.ToLower().Equals("entity") || dataGenerator.ToLower().Equals("item") || dataGenerator.ToLower().Equals("block"))) + { + Console.WriteLine(Translations.Get("error.generator.invalid")); + Console.WriteLine(Translations.Get("error.usage") + " MinecraftClient.exe --data-generator= --data-path=\"\""); + return; + } + + if (string.IsNullOrEmpty(dataPath)) + { + Console.WriteLine(Translations.Get("error.missing.argument", "--data-path")); + Console.WriteLine(Translations.Get("error.usage") + " MinecraftClient.exe --data-generator= --data-path=\"\""); + return; + } + + if (!File.Exists(dataPath)) + { + Console.WriteLine(Translations.Get("error.generator.path", dataPath)); + return; + } + + if (!dataPath.EndsWith(".json")) + { + Console.WriteLine(Translations.Get("error.generator.json", dataPath)); + return; + } + + Console.WriteLine(Translations.Get("mcc.generator.generating", dataGenerator, dataPath)); + + switch (dataGenerator) + { + case "entity": + EntityPaletteGenerator.GenerateEntityTypes(dataPath); + break; + + case "item": + ItemPaletteGenerator.GenerateItemType(dataPath); + break; + + case "block": + BlockPaletteGenerator.GenerateBlockPalette(dataPath); + break; + } + + Console.WriteLine(Translations.Get("mcc.generator.done", dataGenerator, dataPath)); + return; + } + try { Settings.LoadArguments(args); diff --git a/MinecraftClient/Protocol/Handlers/DataTypes.cs b/MinecraftClient/Protocol/Handlers/DataTypes.cs index a734cf49..624924ab 100644 --- a/MinecraftClient/Protocol/Handlers/DataTypes.cs +++ b/MinecraftClient/Protocol/Handlers/DataTypes.cs @@ -450,6 +450,7 @@ namespace MinecraftClient.Protocol.Handlers // NBT root name string rootName = Encoding.ASCII.GetString(ReadData(ReadNextUShort(cache), cache)); + if (!String.IsNullOrEmpty(rootName)) nbtData[""] = rootName; } @@ -706,10 +707,13 @@ namespace MinecraftClient.Protocol.Handlers // NBT root name string rootName = null; + if (nbt.ContainsKey("")) rootName = nbt[""] as string; + if (rootName == null) rootName = ""; + bytes.AddRange(GetUShort((ushort)rootName.Length)); bytes.AddRange(Encoding.ASCII.GetBytes(rootName)); } @@ -1010,10 +1014,10 @@ namespace MinecraftClient.Protocol.Handlers { // MC 1.13 and greater if (item == null || item.IsEmpty) - slotData.Add(0); // No item + slotData.AddRange(GetBool(false)); // No item else { - slotData.Add(1); // Item is present + slotData.AddRange(GetBool(true)); // Item is present slotData.AddRange(GetVarInt(itemPalette.ToId(item.Type))); slotData.Add((byte)item.Count); slotData.AddRange(GetNbt(item.NBT)); @@ -1034,6 +1038,24 @@ namespace MinecraftClient.Protocol.Handlers return slotData.ToArray(); } + /// + /// Get a byte array representing an array of item slots + /// + /// Items + /// Item Palette + /// Array of Item slot representations + public byte[] GetSlotsArray(Dictionary items, ItemPalette itemPalette) + { + byte[] slotsArray = new byte[items.Count]; + + foreach (KeyValuePair item in items) + { + slotsArray = ConcatBytes(slotsArray, GetShort((short)item.Key), GetItemSlot(item.Value, itemPalette)); + } + + return slotsArray; + } + /// /// Get protocol block face from Direction /// @@ -1076,6 +1098,11 @@ namespace MinecraftClient.Protocol.Handlers return result.ToArray(); } + /// + /// Convert a byte array to an hexadecimal string representation (for debugging purposes) + /// + /// Byte array + /// String representation public string ByteArrayToString(byte[] bytes) { return BitConverter.ToString(bytes).Replace("-", " "); diff --git a/MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette117.cs b/MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette117.cs index c14e86b8..ed15c558 100644 --- a/MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette117.cs +++ b/MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette117.cs @@ -64,7 +64,7 @@ namespace MinecraftClient.Protocol.Handlers.PacketPalettes { 0x37, PacketTypesIn.FacePlayer }, { 0x38, PacketTypesIn.PlayerPositionAndLook }, { 0x39, PacketTypesIn.UnlockRecipes }, - { 0x3A, PacketTypesIn.DestroyEntity }, + { 0x3A, PacketTypesIn.DestroyEntities }, { 0x3B, PacketTypesIn.RemoveEntityEffect }, { 0x3C, PacketTypesIn.ResourcePackSend }, { 0x3D, PacketTypesIn.Respawn }, diff --git a/MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette118.cs b/MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette118.cs index ce38ff22..2a24b5fa 100644 --- a/MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette118.cs +++ b/MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette118.cs @@ -64,7 +64,7 @@ namespace MinecraftClient.Protocol.Handlers.PacketPalettes { 0x37, PacketTypesIn.FacePlayer }, { 0x38, PacketTypesIn.PlayerPositionAndLook }, { 0x39, PacketTypesIn.UnlockRecipes }, - { 0x3A, PacketTypesIn.DestroyEntity }, + { 0x3A, PacketTypesIn.DestroyEntities }, { 0x3B, PacketTypesIn.RemoveEntityEffect }, { 0x3C, PacketTypesIn.ResourcePackSend }, { 0x3D, PacketTypesIn.Respawn }, diff --git a/MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette119.cs b/MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette119.cs index 21313bf1..2b9ecd32 100644 --- a/MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette119.cs +++ b/MinecraftClient/Protocol/Handlers/PacketPalettes/PacketPalette119.cs @@ -62,7 +62,7 @@ namespace MinecraftClient.Protocol.Handlers.PacketPalettes { 0x35, PacketTypesIn.FacePlayer }, // (Wiki name: Player Look At) { 0x36, PacketTypesIn.PlayerPositionAndLook }, // (Wiki name: Player Position) { 0x37, PacketTypesIn.UnlockRecipes }, // (Wiki name: Recipe) - { 0x38, PacketTypesIn.DestroyEntity }, // (Wiki name: Remove Entites) + { 0x38, PacketTypesIn.DestroyEntities }, // (Wiki name: Remove Entites) { 0x39, PacketTypesIn.RemoveEntityEffect }, { 0x3A, PacketTypesIn.ResourcePackSend }, // (Wiki name: Resource Pack) { 0x3B, PacketTypesIn.Respawn }, // Changed in 1.19 (Heavy changes) - DONE diff --git a/MinecraftClient/Protocol/Handlers/PacketTypesIn.cs b/MinecraftClient/Protocol/Handlers/PacketTypesIn.cs index 84d2c879..9001e0eb 100644 --- a/MinecraftClient/Protocol/Handlers/PacketTypesIn.cs +++ b/MinecraftClient/Protocol/Handlers/PacketTypesIn.cs @@ -112,7 +112,6 @@ namespace MinecraftClient.Protocol.Handlers WorldBorderCenter, ActionBar, Tags, - DestroyEntity, // For 1.17+ DeathCombatEvent, EnterCombatEvent, EndCombatEvent, diff --git a/MinecraftClient/Protocol/Handlers/Protocol16.cs b/MinecraftClient/Protocol/Handlers/Protocol16.cs index b22e399f..f691a2be 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol16.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol16.cs @@ -729,7 +729,7 @@ namespace MinecraftClient.Protocol.Handlers return false; //Currently not implemented } - public bool SendWindowAction(int windowId, int slotId, WindowActionType action, Item item) + public bool SendWindowAction(int windowId, int slotId, WindowActionType action, Item item, List> changedSlots, int stateId) { return false; //Currently not implemented } diff --git a/MinecraftClient/Protocol/Handlers/Protocol18.cs b/MinecraftClient/Protocol/Handlers/Protocol18.cs index 145292a6..ceb9a709 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol18.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol18.cs @@ -12,7 +12,6 @@ using MinecraftClient.Mapping.BlockPalettes; using MinecraftClient.Mapping.EntityPalettes; using MinecraftClient.Protocol.Handlers.Forge; using MinecraftClient.Inventory; -using System.Data.SqlClient; using System.Diagnostics; using MinecraftClient.Inventory.ItemPalettes; using MinecraftClient.Protocol.Handlers.PacketPalettes; @@ -92,19 +91,19 @@ namespace MinecraftClient.Protocol.Handlers this.log = handler.GetLogger(); this.randomGen = RandomNumberGenerator.Create(); - if (handler.GetTerrainEnabled() && protocolversion > MC_1_16_5_Version) + if (handler.GetTerrainEnabled() && protocolversion > MC_1_18_2_Version) { log.Error(Translations.Get("extra.terrainandmovement_disabled")); handler.SetTerrainEnabled(false); } - if (handler.GetInventoryEnabled() && (protocolversion < MC_1_10_Version || protocolversion > MC_1_16_5_Version)) + if (handler.GetInventoryEnabled() && (protocolversion < MC_1_10_Version || protocolversion > MC_1_18_2_Version)) { log.Error(Translations.Get("extra.inventory_disabled")); handler.SetInventoryEnabled(false); } - if (handler.GetEntityHandlingEnabled() && (protocolversion < MC_1_10_Version || protocolversion > MC_1_16_5_Version)) + if (handler.GetEntityHandlingEnabled() && (protocolversion < MC_1_10_Version || protocolversion > MC_1_18_2_Version)) { log.Error(Translations.Get("extra.entity_disabled")); handler.SetEntityHandlingEnabled(false); @@ -113,8 +112,11 @@ namespace MinecraftClient.Protocol.Handlers // Block palette if (protocolversion >= MC_1_13_Version) { - if (protocolVersion > MC_1_16_5_Version && handler.GetTerrainEnabled()) + if (protocolVersion > MC_1_18_2_Version && handler.GetTerrainEnabled()) throw new NotImplementedException(Translations.Get("exception.palette.block")); + if (protocolVersion >= MC_1_17_Version) + Block.Palette = new Palette117(); + else if (protocolVersion >= MC_1_16_Version) if (protocolVersion >= MC_1_16_Version) Block.Palette = new Palette116(); else if (protocolVersion >= MC_1_15_Version) @@ -128,8 +130,11 @@ namespace MinecraftClient.Protocol.Handlers // Entity palette if (protocolversion >= MC_1_13_Version) { - if (protocolversion > MC_1_16_5_Version && handler.GetEntityHandlingEnabled()) + if (protocolversion > MC_1_18_2_Version && handler.GetEntityHandlingEnabled()) throw new NotImplementedException(Translations.Get("exception.palette.entity")); + if (protocolversion >= MC_1_17_Version) + entityPalette = new EntityPalette117(); + else if (protocolversion >= MC_1_16_2_Version) if (protocolversion >= MC_1_16_2_Version) entityPalette = new EntityPalette1162(); else if (protocolversion >= MC_1_16_Version) @@ -143,10 +148,15 @@ namespace MinecraftClient.Protocol.Handlers else entityPalette = new EntityPalette112(); // Item palette - if (protocolversion >= MC_1_16_Version) + if (protocolversion >= MC_1_16_2_Version) { - if (protocolversion > MC_1_16_5_Version && handler.GetInventoryEnabled()) + if (protocolversion > MC_1_18_2_Version && handler.GetInventoryEnabled()) throw new NotImplementedException(Translations.Get("exception.palette.item")); + if (protocolversion >= MC_1_18_1_Version) + itemPalette = new ItemPalette118(); + else if (protocolversion >= MC_1_17_Version) + itemPalette = new ItemPalette117(); + else if (protocolversion >= MC_1_16_2_Version) if (protocolversion >= MC_1_16_2_Version) itemPalette = new ItemPalette1162(); else itemPalette = new ItemPalette1161(); @@ -229,6 +239,7 @@ namespace MinecraftClient.Protocol.Handlers packetData.Clear(); int size = dataTypes.ReadNextVarIntRAW(socketWrapper); //Packet size byte[] rawpacket = socketWrapper.ReadDataRAW(size); //Packet contents + for (int i = 0; i < rawpacket.Length; i++) packetData.Enqueue(rawpacket[i]); @@ -341,9 +352,8 @@ namespace MinecraftClient.Protocol.Handlers if (protocolversion >= MC_1_16_Version) currentDimensionName = dataTypes.ReadNextString(packetData); // Dimension Name (World Name) - 1.16 and above - // Implementation in PR#1943 - // if (protocolversion >= MC_1_16_2_Version) - // handler.GetWorld().SetDimension(currentDimensionName, currentDimensionType); + if (protocolversion >= MC_1_16_2_Version) + World.SetDimension(currentDimensionName, currentDimensionType); if (protocolversion >= MC_1_15_Version) dataTypes.ReadNextLong(packetData); // Hashed world seed - 1.15 and above @@ -430,13 +440,13 @@ namespace MinecraftClient.Protocol.Handlers break; case PacketTypesIn.Respawn: string? dimensionNameInRespawn = null; - Dictionary? dimensionTypeInRespawn = null; + Dictionary dimensionTypeInRespawn = null; if (protocolversion >= MC_1_16_Version) { if (protocolversion >= MC_1_19_Version) dataTypes.ReadNextString(packetData); // Dimension Type: Identifier else if (protocolversion >= MC_1_16_2_Version) - currentDimensionType = dataTypes.ReadNextNbt(packetData); // Dimension Type: NBT Tag Compound + dimensionTypeInRespawn = dataTypes.ReadNextNbt(packetData); // Dimension Type: NBT Tag Compound else dataTypes.ReadNextString(packetData); this.currentDimension = 0; @@ -449,9 +459,8 @@ namespace MinecraftClient.Protocol.Handlers if (protocolversion >= MC_1_16_Version) dimensionNameInRespawn = dataTypes.ReadNextString(packetData); // Dimension Name (World Name) - 1.16 and above - // Implementation in PR#1943 - // if (protocolversion >= MC_1_16_2_Version) - // handler.GetWorld().SetDimension(currentDimensionName, currentDimensionType); + if (protocolversion >= MC_1_16_2_Version) + World.SetDimension(dimensionNameInRespawn, dimensionTypeInRespawn); if (protocolversion < MC_1_14_Version) dataTypes.ReadNextByte(packetData); // Difficulty - 1.13 and below @@ -509,56 +518,88 @@ namespace MinecraftClient.Protocol.Handlers SendPacket(PacketTypesOut.TeleportConfirm, dataTypes.GetVarInt(teleportID)); } - if (protocolversion >= MC_1_17_Version) dataTypes.ReadNextBool(packetData); + if (protocolversion >= MC_1_17_Version) + dataTypes.ReadNextBool(packetData); // Dismount Vehicle - 1.17 and above break; - case PacketTypesIn.ChunkData: //TODO implement for 1.17, bit mask is not limited to 0-15 anymore + case PacketTypesIn.ChunkData: if (handler.GetTerrainEnabled()) { int chunkX = dataTypes.ReadNextInt(packetData); int chunkZ = dataTypes.ReadNextInt(packetData); - bool chunksContinuous = dataTypes.ReadNextBool(packetData); - if (protocolversion >= MC_1_16_Version && protocolversion <= MC_1_16_1_Version) - dataTypes.ReadNextBool(packetData); // Ignore old data - 1.16 to 1.16.1 only - ushort chunkMask = protocolversion >= MC_1_9_Version - ? (ushort)dataTypes.ReadNextVarInt(packetData) - : dataTypes.ReadNextUShort(packetData); - if (protocolversion < MC_1_8_Version) + if (protocolversion >= MC_1_17_Version) { - ushort addBitmap = dataTypes.ReadNextUShort(packetData); - int compressedDataSize = dataTypes.ReadNextInt(packetData); - byte[] compressed = dataTypes.ReadData(compressedDataSize, packetData); - byte[] decompressed = ZlibUtils.Decompress(compressed); + ulong[]? verticalStripBitmask = null; + + if (protocolversion == MC_1_17_Version || protocolversion == MC_1_17_1_Version) + verticalStripBitmask = dataTypes.ReadNextULongArray(packetData); // Bit Mask Le:ngth and Primary Bit Mask + + dataTypes.ReadNextNbt(packetData); // Heightmaps + + if (protocolversion == MC_1_17_Version || protocolversion == MC_1_17_1_Version) + { + int biomesLength = dataTypes.ReadNextVarInt(packetData); // Biomes length + for (int i = 0; i < biomesLength; i++) + { + dataTypes.SkipNextVarInt(packetData); // Biomes + } + } + + int dataSize = dataTypes.ReadNextVarInt(packetData); // Size + + Interlocked.Increment(ref handler.GetWorld().chunkCnt); + Interlocked.Increment(ref handler.GetWorld().chunkLoadNotCompleted); new Task(() => { - pTerrain.ProcessChunkColumnData(chunkX, chunkZ, chunkMask, addBitmap, currentDimension == 0, chunksContinuous, currentDimension, new Queue(decompressed)); + pTerrain.ProcessChunkColumnData(chunkX, chunkZ, verticalStripBitmask, packetData); + Interlocked.Decrement(ref handler.GetWorld().chunkLoadNotCompleted); }).Start(); } else { - if (protocolversion >= MC_1_14_Version) - dataTypes.ReadNextNbt(packetData); // Heightmaps - 1.14 and above - int biomesLength = 0; - if (protocolversion >= MC_1_16_2_Version) - if (chunksContinuous) - biomesLength = dataTypes.ReadNextVarInt(packetData); // Biomes length - 1.16.2 and above - if (protocolversion >= MC_1_15_Version && chunksContinuous) + bool chunksContinuous = dataTypes.ReadNextBool(packetData); + if (protocolversion >= MC_1_16_Version && protocolversion <= MC_1_16_1_Version) + dataTypes.ReadNextBool(packetData); // Ignore old data - 1.16 to 1.16.1 only + ushort chunkMask = protocolversion >= MC_1_9_Version + ? (ushort)dataTypes.ReadNextVarInt(packetData) + : dataTypes.ReadNextUShort(packetData); + if (protocolversion < MC_1_8_Version) { - if (protocolversion >= MC_1_16_2_Version) + ushort addBitmap = dataTypes.ReadNextUShort(packetData); + int compressedDataSize = dataTypes.ReadNextInt(packetData); + byte[] compressed = dataTypes.ReadData(compressedDataSize, packetData); + byte[] decompressed = ZlibUtils.Decompress(compressed); + new Task(() => { - for (int i = 0; i < biomesLength; i++) - { - // Biomes - 1.16.2 and above - // Don't use ReadNextVarInt because it cost too much time - dataTypes.SkipNextVarInt(packetData); - } - } - else dataTypes.ReadData(1024 * 4, packetData); // Biomes - 1.15 and above + pTerrain.ProcessChunkColumnData(chunkX, chunkZ, chunkMask, addBitmap, currentDimension == 0, chunksContinuous, currentDimension, new Queue(decompressed)); + }).Start(); } - int dataSize = dataTypes.ReadNextVarInt(packetData); - new Task(() => + else { - pTerrain.ProcessChunkColumnData(chunkX, chunkZ, chunkMask, 0, false, chunksContinuous, currentDimension, packetData); - }).Start(); + if (protocolversion >= MC_1_14_Version) + dataTypes.ReadNextNbt(packetData); // Heightmaps - 1.14 and above + int biomesLength = 0; + if (protocolversion >= MC_1_16_2_Version) + if (chunksContinuous) + biomesLength = dataTypes.ReadNextVarInt(packetData); // Biomes length - 1.16.2 and above + if (protocolversion >= MC_1_15_Version && chunksContinuous) + { + if (protocolversion >= MC_1_16_2_Version) + { + for (int i = 0; i < biomesLength; i++) + { + // Biomes - 1.16.2 and above + // Don't use ReadNextVarInt because it cost too much time + dataTypes.SkipNextVarInt(packetData); + } + } + else dataTypes.ReadData(1024 * 4, packetData); // Biomes - 1.15 and above + } + int dataSize = dataTypes.ReadNextVarInt(packetData); + new Task(() => + { + pTerrain.ProcessChunkColumnData(chunkX, chunkZ, chunkMask, 0, false, chunksContinuous, currentDimension, packetData); + }).Start(); + } } } break; @@ -666,7 +707,7 @@ namespace MinecraftClient.Protocol.Handlers int sectionX = (int)(chunkSection >> 42); int sectionY = (int)((chunkSection << 44) >> 44); int sectionZ = (int)((chunkSection << 22) >> 42); - dataTypes.ReadNextBool(packetData); // Useless boolean + dataTypes.ReadNextBool(packetData); // Useless boolean (Related to light update) int blocksSize = dataTypes.ReadNextVarInt(packetData); for (int i = 0; i < blocksSize; i++) { @@ -820,6 +861,13 @@ namespace MinecraftClient.Protocol.Handlers { int chunkX = dataTypes.ReadNextInt(packetData); int chunkZ = dataTypes.ReadNextInt(packetData); + + // Warning: It is legal to include unloaded chunks in the UnloadChunk packet. + // Since chunks that have not been loaded are not recorded, this may result + // in loading chunks that should be unloaded and inaccurate statistics. + if (handler.GetWorld()[chunkX, chunkZ] != null) + Interlocked.Decrement(ref handler.GetWorld().chunkCnt); + handler.GetWorld()[chunkX, chunkZ] = null; } break; @@ -985,24 +1033,45 @@ namespace MinecraftClient.Protocol.Handlers if (handler.GetInventoryEnabled()) { byte windowId = dataTypes.ReadNextByte(packetData); - short elements = dataTypes.ReadNextShort(packetData); + int stateId = -1; + int elements = 0; + + if (protocolversion >= MC_1_17_1_Version) + { + // State ID and Elements as VarInt - 1.17.1 and above + stateId = dataTypes.ReadNextVarInt(packetData); + elements = dataTypes.ReadNextVarInt(packetData); + } + else + { + // Elements as Short - 1.17.0 and below + dataTypes.ReadNextShort(packetData); + } + Dictionary inventorySlots = new Dictionary(); - for (short slotId = 0; slotId < elements; slotId++) + for (int slotId = 0; slotId < elements; slotId++) { Item item = dataTypes.ReadNextItemSlot(packetData, itemPalette); if (item != null) inventorySlots[slotId] = item; } - handler.OnWindowItems(windowId, inventorySlots); + + if (protocolversion >= MC_1_17_1_Version) // Carried Item - 1.17.1 and above + dataTypes.ReadNextItemSlot(packetData, itemPalette); + + handler.OnWindowItems(windowId, inventorySlots, stateId); } break; case PacketTypesIn.SetSlot: if (handler.GetInventoryEnabled()) { byte windowID = dataTypes.ReadNextByte(packetData); + int stateId = -1; + if (protocolversion >= MC_1_17_1_Version) + stateId = dataTypes.ReadNextVarInt(packetData); // State ID - 1.17.1 and above short slotID = dataTypes.ReadNextShort(packetData); Item item = dataTypes.ReadNextItemSlot(packetData, itemPalette); - handler.OnSetSlot(windowID, slotID, item); + handler.OnSetSlot(windowID, slotID, item, stateId); } break; case PacketTypesIn.WindowConfirmation: @@ -1024,7 +1093,9 @@ namespace MinecraftClient.Protocol.Handlers if (protocolversion >= MC_1_17_Version) { forced = dataTypes.ReadNextBool(packetData); - String forcedMessage = ChatParser.ParseText(dataTypes.ReadNextString(packetData)); + string forcedMessage = ChatParser.ParseText(dataTypes.ReadNextString(packetData)); + dataTypes.ReadNextBool(packetData); // Has Prompt Message (Boolean) - 1.17 and above + dataTypes.ReadNextString(packetData); // Prompt Message (Optional Chat) - 1.17 and above } // Some server plugins may send invalid resource packs to probe the client and we need to ignore them (issue #1056) if (!url.StartsWith("http") && hash.Length != 40) // Some server may have null hash value @@ -1121,19 +1192,15 @@ namespace MinecraftClient.Protocol.Handlers case PacketTypesIn.DestroyEntities: if (handler.GetEntityHandlingEnabled()) { - int EntityCount = dataTypes.ReadNextVarInt(packetData); - int[] EntitiesList = new int[EntityCount]; - for (int i = 0; i < EntityCount; i++) + int entityCount = 1; // 1.17.0 has only one entity per packet + if (protocolversion != MC_1_17_Version) + entityCount = dataTypes.ReadNextVarInt(packetData); // All other versions have a "count" field + int[] entityList = new int[entityCount]; + for (int i = 0; i < entityCount; i++) { - EntitiesList[i] = dataTypes.ReadNextVarInt(packetData); + entityList[i] = dataTypes.ReadNextVarInt(packetData); } - handler.OnDestroyEntities(EntitiesList); - } - break; - case PacketTypesIn.DestroyEntity: - if (handler.GetEntityHandlingEnabled()) - { - handler.OnDestroyEntities(new[] { dataTypes.ReadNextVarInt(packetData) }); + handler.OnDestroyEntities(entityList); } break; case PacketTypesIn.EntityPosition: @@ -1206,7 +1273,16 @@ namespace MinecraftClient.Protocol.Handlers { int EntityID = dataTypes.ReadNextVarInt(packetData); Dictionary metadata = dataTypes.ReadNextMetadata(packetData, itemPalette); - int healthField = protocolversion >= MC_1_14_Version ? 8 : 7; // Health is field no. 7 in 1.10+ and 8 in 1.14+ + + // See https://wiki.vg/Entity_metadata#Living_Entity + int healthField = 7; // From 1.10 to 1.13.2 + if (protocolversion >= MC_1_14_Version) + healthField = 8; // 1.14 and above + if (protocolversion >= MC_1_17_Version) + healthField = 9; // 1.17 and above + if (protocolversion > MC_1_18_2_Version) + throw new NotImplementedException(Translations.Get("exception.palette.healthfield")); + if (metadata.ContainsKey(healthField) && metadata[healthField] != null && metadata[healthField].GetType() == typeof(float)) handler.OnEntityHealth(EntityID, (float)metadata[healthField]); handler.OnEntityMetadata(EntityID, metadata); @@ -1292,7 +1368,9 @@ namespace MinecraftClient.Protocol.Handlers break; case PacketTypesIn.UpdateScore: string entityname = dataTypes.ReadNextString(packetData); - byte action3 = dataTypes.ReadNextByte(packetData); + int action3 = protocolversion >= MC_1_18_2_Version + ? dataTypes.ReadNextVarInt(packetData) + : dataTypes.ReadNextByte(packetData); string objectivename2 = string.Empty; int value = -1; if (action3 != 1 || protocolversion >= MC_1_8_Version) @@ -1995,7 +2073,12 @@ namespace MinecraftClient.Protocol.Handlers if (protocolversion >= MC_1_9_Version) fields.AddRange(dataTypes.GetVarInt(mainHand)); if (protocolversion >= MC_1_17_Version) - fields.Add(0); // Enables text filtering. Always false + { + if (protocolversion >= MC_1_18_1_Version) + fields.Add(0); // 1.18 and above - Enable text filtering. (Always false) + else + fields.Add(1); // 1.17 and 1.17.1 - Disable text filtering. (Always true) + } if (protocolversion >= MC_1_18_1_Version) fields.Add(1); // 1.18 and above - Allow server listings SendPacket(PacketTypesOut.ClientSettings, fields); @@ -2250,7 +2333,7 @@ namespace MinecraftClient.Protocol.Handlers catch (ObjectDisposedException) { return false; } } - public bool SendWindowAction(int windowId, int slotId, WindowActionType action, Item item) + public bool SendWindowAction(int windowId, int slotId, WindowActionType action, Item item, List> changedSlots, int stateId) { try { @@ -2286,14 +2369,48 @@ namespace MinecraftClient.Protocol.Handlers } List packet = new List(); - packet.Add((byte)windowId); - packet.AddRange(dataTypes.GetShort((short)slotId)); - packet.Add(button); - if (protocolversion < MC_1_17_Version) packet.AddRange(dataTypes.GetShort(actionNumber)); + packet.Add((byte)windowId); // Window ID + + // 1.18+ + if (protocolversion >= MC_1_18_1_Version) + { + packet.AddRange(dataTypes.GetVarInt(stateId)); // State ID + packet.AddRange(dataTypes.GetShort((short)slotId)); // Slot ID + } + // 1.17.1 + else if (protocolversion == MC_1_17_1_Version) + { + packet.AddRange(dataTypes.GetShort((short)slotId)); // Slot ID + packet.AddRange(dataTypes.GetVarInt(stateId)); // State ID + } + // Older + else + { + packet.AddRange(dataTypes.GetShort((short)slotId)); // Slot ID + } + + packet.Add(button); // Button + + if (protocolversion < MC_1_17_Version) + packet.AddRange(dataTypes.GetShort(actionNumber)); + if (protocolversion >= MC_1_9_Version) - packet.AddRange(dataTypes.GetVarInt(mode)); + packet.AddRange(dataTypes.GetVarInt(mode)); // Mode else packet.Add(mode); - packet.AddRange(dataTypes.GetItemSlot(item, itemPalette)); + + // 1.17+ Array of changed slots + if (protocolversion >= MC_1_17_Version) + { + packet.AddRange(dataTypes.GetVarInt(changedSlots.Count)); // Length of the array + foreach (var slot in changedSlots) + { + packet.AddRange(dataTypes.GetShort(slot.Item1)); // slot ID + packet.AddRange(dataTypes.GetItemSlot(slot.Item2, itemPalette)); // slot Data + } + } + + packet.AddRange(dataTypes.GetItemSlot(item, itemPalette)); // Carried item (Clicked item) + SendPacket(PacketTypesOut.ClickWindow, packet); return true; } diff --git a/MinecraftClient/Protocol/Handlers/Protocol18Terrain.cs b/MinecraftClient/Protocol/Handlers/Protocol18Terrain.cs index 7926d930..1ccabb2e 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol18Terrain.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol18Terrain.cs @@ -28,7 +28,188 @@ namespace MinecraftClient.Protocol.Handlers } /// - /// Process chunk column data from the server and (un)load the chunk from the Minecraft world + /// Reading the "Block states" field: consists of 4096 entries, representing all the blocks in the chunk section. + /// + /// Blocks will store in this chunk + /// Cache for reading data + private Chunk ReadBlockStatesField(ref Chunk chunk, Queue cache) + { + // read Block states (Type: Paletted Container) + byte bitsPerEntry = dataTypes.ReadNextByte(cache); + + // 1.18(1.18.1) add a pattle named "Single valued" to replace the vertical strip bitmask in the old + if (bitsPerEntry == 0 && protocolversion >= Protocol18Handler.MC_1_18_1_Version) + { + // Palettes: Single valued - 1.18(1.18.1) and above + ushort value = (ushort)dataTypes.ReadNextVarInt(cache); + + dataTypes.SkipNextVarInt(cache); // Data Array Length will be zero + + // Empty chunks will not be stored + if (new Block(value).Type == Material.Air) + return null; + + for (int blockY = 0; blockY < Chunk.SizeY; blockY++) + { + for (int blockZ = 0; blockZ < Chunk.SizeZ; blockZ++) + { + for (int blockX = 0; blockX < Chunk.SizeX; blockX++) + { + chunk[blockX, blockY, blockZ] = new Block(value); + } + } + } + } + else + { + // Palettes: Indirect or Direct + bool usePalette = (bitsPerEntry <= 8); + + // Indirect Mode: For block states with bits per entry <= 4, 4 bits are used to represent a block. + if (bitsPerEntry < 4) bitsPerEntry = 4; + + // Direct Mode: Bit mask covering bitsPerEntry bits + // EG, if bitsPerEntry = 5, valueMask = 00011111 in binary + uint valueMask = (uint)((1 << bitsPerEntry) - 1); + + int paletteLength = 0; // Assume zero when length is absent + if (usePalette) paletteLength = dataTypes.ReadNextVarInt(cache); + + int[] palette = new int[paletteLength]; + for (int i = 0; i < paletteLength; i++) + palette[i] = dataTypes.ReadNextVarInt(cache); + + // Block IDs are packed in the array of 64-bits integers + ulong[] dataArray = dataTypes.ReadNextULongArray(cache); + + int longIndex = 0; + int startOffset = 0 - bitsPerEntry; + for (int blockY = 0; blockY < Chunk.SizeY; blockY++) + { + for (int blockZ = 0; blockZ < Chunk.SizeZ; blockZ++) + { + for (int blockX = 0; blockX < Chunk.SizeX; blockX++) + { + // NOTICE: In the future a single ushort may not store the entire block id; + // the Block class may need to change if block state IDs go beyond 65535 + ushort blockId; + + // Calculate location of next block ID inside the array of Longs + startOffset += bitsPerEntry; + + if ((startOffset + bitsPerEntry) > 64) + { + // In MC 1.16+, padding is applied to prevent overlapping between Longs: + // [ LONG INTEGER ][ LONG INTEGER ] + // [Block][Block][Block]XXXXX[Block][Block][Block]XXXXX + + // When overlapping, move forward to the beginning of the next Long + startOffset = 0; + longIndex++; + } + + // Extract Block ID + blockId = (ushort)((dataArray[longIndex] >> startOffset) & valueMask); + + // Map small IDs to actual larger block IDs + if (usePalette) + { + if (paletteLength <= blockId) + { + int blockNumber = (blockY * Chunk.SizeZ + blockZ) * Chunk.SizeX + blockX; + throw new IndexOutOfRangeException(String.Format("Block ID {0} is outside Palette range 0-{1}! (bitsPerBlock: {2}, blockNumber: {3})", + blockId, + paletteLength - 1, + bitsPerEntry, + blockNumber)); + } + + blockId = (ushort)palette[blockId]; + } + + // We have our block, save the block into the chunk + chunk[blockX, blockY, blockZ] = new Block(blockId); + } + } + } + } + + return chunk; + } + + /// + /// Process chunk column data from the server and (un)load the chunk from the Minecraft world - 1.17 and above + /// + /// Chunk X location + /// Chunk Z location + /// Chunk mask for reading data, store in bitset, used in 1.17 and 1.17.1 + /// Cache for reading chunk data + public void ProcessChunkColumnData(int chunkX, int chunkZ, ulong[] verticalStripBitmask, Queue cache) + { + var world = handler.GetWorld(); + + int chunkColumnSize = (World.GetDimension().height + 15) / 16; // Round up + + if (protocolversion >= Protocol18Handler.MC_1_17_Version) + { + // 1.17 and above chunk format + // Unloading chunks is handled by a separate packet + for (int chunkY = 0; chunkY < chunkColumnSize; chunkY++) + { + // 1.18 and above always contains all chunk section in data + // 1.17 and 1.17.1 need vertical strip bitmask to know if the chunk section is included + if ((protocolversion >= Protocol18Handler.MC_1_18_1_Version) || + (((protocolversion == Protocol18Handler.MC_1_17_Version) || + (protocolversion == Protocol18Handler.MC_1_17_1_Version)) && + ((verticalStripBitmask[chunkY / 64] & (1UL << (chunkY % 64))) != 0))) + { + // Non-air block count inside chunk section, for lighting purposes + int blockCnt = dataTypes.ReadNextShort(cache); + + // Read Block states (Type: Paletted Container) + Chunk chunk = new Chunk(); + ReadBlockStatesField(ref chunk, cache); + + //We have our chunk, save the chunk into the world + handler.InvokeOnMainThread(() => + { + if (handler.GetWorld()[chunkX, chunkZ] == null) + handler.GetWorld()[chunkX, chunkZ] = new ChunkColumn(chunkColumnSize); + handler.GetWorld()[chunkX, chunkZ][chunkY] = chunk; + }); + + // Skip Read Biomes (Type: Paletted Container) - 1.18(1.18.1) and above + if (protocolversion >= Protocol18Handler.MC_1_18_1_Version) + { + byte bitsPerEntryBiome = dataTypes.ReadNextByte(cache); // Bits Per Entry + if (bitsPerEntryBiome == 0) + { + dataTypes.SkipNextVarInt(cache); // Value + dataTypes.SkipNextVarInt(cache); // Data Array Length + // Data Array must be empty + } + else + { + if (bitsPerEntryBiome <= 3) + { + int paletteLength = dataTypes.ReadNextVarInt(cache); // Palette Length + for (int i = 0; i < paletteLength; i++) + dataTypes.SkipNextVarInt(cache); // Palette + } + int dataArrayLength = dataTypes.ReadNextVarInt(cache); // Data Array Length + dataTypes.ReadData(dataArrayLength * 8, cache); // Data Array + } + } + } + } + // Don't worry about skipping remaining data since there is no useful data afterwards in 1.9 + // (plus, it would require parsing the tile entity lists' NBT) + } + handler.GetWorld()[chunkX, chunkZ].FullyLoaded = true; + } + + /// + /// Process chunk column data from the server and (un)load the chunk from the Minecraft world - 1.17 below /// /// Chunk X location /// Chunk Z location @@ -40,11 +221,12 @@ namespace MinecraftClient.Protocol.Handlers /// Cache for reading chunk data public void ProcessChunkColumnData(int chunkX, int chunkZ, ushort chunkMask, ushort chunkMask2, bool hasSkyLight, bool chunksContinuous, int currentDimension, Queue cache) { + const int chunkColumnSize = 16; if (protocolversion >= Protocol18Handler.MC_1_9_Version) { // 1.9 and above chunk format // Unloading chunks is handled by a separate packet - for (int chunkY = 0; chunkY < ChunkColumn.ColumnSize; chunkY++) + for (int chunkY = 0; chunkY < chunkColumnSize; chunkY++) { if ((chunkMask & (1 << chunkY)) != 0) { @@ -200,7 +382,7 @@ namespace MinecraftClient.Protocol.Handlers else { //Load chunk data from the server - for (int chunkY = 0; chunkY < ChunkColumn.ColumnSize; chunkY++) + for (int chunkY = 0; chunkY < chunkColumnSize; chunkY++) { if ((chunkMask & (1 << chunkY)) != 0) { @@ -224,7 +406,7 @@ namespace MinecraftClient.Protocol.Handlers } //Skip light information - for (int chunkY = 0; chunkY < ChunkColumn.ColumnSize; chunkY++) + for (int chunkY = 0; chunkY < chunkColumnSize; chunkY++) { if ((chunkMask & (1 << chunkY)) != 0) { @@ -258,7 +440,7 @@ namespace MinecraftClient.Protocol.Handlers //Count chunk sections int sectionCount = 0; int addDataSectionCount = 0; - for (int chunkY = 0; chunkY < ChunkColumn.ColumnSize; chunkY++) + for (int chunkY = 0; chunkY < chunkColumnSize; chunkY++) { if ((chunkMask & (1 << chunkY)) != 0) sectionCount++; @@ -286,7 +468,7 @@ namespace MinecraftClient.Protocol.Handlers dataTypes.ReadData(Chunk.SizeX * Chunk.SizeZ, cache); //Biomes //Load chunk data - for (int chunkY = 0; chunkY < ChunkColumn.ColumnSize; chunkY++) + for (int chunkY = 0; chunkY < chunkColumnSize; chunkY++) { if ((chunkMask & (1 << chunkY)) != 0) { @@ -307,6 +489,7 @@ namespace MinecraftClient.Protocol.Handlers } } } + handler.GetWorld()[chunkX, chunkZ].FullyLoaded = true; } } } diff --git a/MinecraftClient/Protocol/IMinecraftCom.cs b/MinecraftClient/Protocol/IMinecraftCom.cs index 3810a66a..a7c36b5b 100644 --- a/MinecraftClient/Protocol/IMinecraftCom.cs +++ b/MinecraftClient/Protocol/IMinecraftCom.cs @@ -95,7 +95,7 @@ namespace MinecraftClient.Protocol /// packet Data /// True if message was successfully sent bool SendPluginChannelPacket(string channel, byte[] data); - + /// /// Send Entity Action packet to the server. /// @@ -103,7 +103,7 @@ namespace MinecraftClient.Protocol /// Type of packet to send /// True if packet was successfully sent bool SendEntityAction(int EntityID, int type); - + /// /// Send a held item change packet to the server. /// @@ -141,7 +141,7 @@ namespace MinecraftClient.Protocol /// Z coordinate for "interact at" /// True if packet was successfully sent bool SendInteractEntity(int EntityID, int type, float X, float Y, float Z); - + /// /// Send an entity interaction packet to the server. /// @@ -164,10 +164,12 @@ namespace MinecraftClient.Protocol /// /// Id of the window being clicked /// Id of the clicked slot - /// Action to perform + /// Action to perform /// Item in the clicked slot + /// Slots that have been changed in this event: List + /// Inventory's stateId /// True if packet was successfully sent - bool SendWindowAction(int windowId, int slotId, WindowActionType action, Item item); + bool SendWindowAction(int windowId, int slotId, WindowActionType action, Item item, List> changedSlots, int stateId); /// /// Request Creative Mode item creation into regular/survival Player Inventory @@ -224,7 +226,7 @@ namespace MinecraftClient.Protocol /// New line 4 /// True if packet was succcessfully sent bool SendUpdateSign(Location location, string line1, string line2, string line3, string line4); - + /// /// Update command block /// diff --git a/MinecraftClient/Protocol/IMinecraftComHandler.cs b/MinecraftClient/Protocol/IMinecraftComHandler.cs index 9895d47e..96b4e4b7 100644 --- a/MinecraftClient/Protocol/IMinecraftComHandler.cs +++ b/MinecraftClient/Protocol/IMinecraftComHandler.cs @@ -285,7 +285,8 @@ namespace MinecraftClient.Protocol /// /// Inventory ID /// Item list - void OnWindowItems(byte inventoryID, Dictionary itemList); + /// State ID + void OnWindowItems(byte inventoryID, Dictionary itemList, int stateId); /// /// Called when a single slot has been updated inside an inventory @@ -293,7 +294,8 @@ namespace MinecraftClient.Protocol /// Window ID /// Slot ID /// Item (may be null for empty slot) - void OnSetSlot(byte inventoryID, short slotID, Item item); + /// State ID + void OnSetSlot(byte inventoryID, short slotID, Item item, int stateId); /// /// Called when player health or hunger changed. @@ -397,7 +399,7 @@ namespace MinecraftClient.Protocol /// 0 to create/update an item. 1 to remove an item. /// The name of the objective the score belongs to /// he score to be displayed next to the entry. Only sent when Action does not equal 1. - void OnUpdateScore(string entityname, byte action, string objectivename, int value); + void OnUpdateScore(string entityname, int action, string objectivename, int value); /// /// Called when tradeList is received from server diff --git a/MinecraftClient/Resources/lang/en.ini b/MinecraftClient/Resources/lang/en.ini index 6b1f775e..c006d112 100644 --- a/MinecraftClient/Resources/lang/en.ini +++ b/MinecraftClient/Resources/lang/en.ini @@ -44,7 +44,8 @@ mcc.with_forge=, with Forge mcc.handshake=§8Handshake successful. (Server ID: {0}) mcc.realms_available=You have access to the following Realms worlds mcc.realms_join=Use realms: as server IP to join a Realms world - +mcc.generator.generating=Generating {0} palette using the dataset: {1} +mcc.generator.done=Succesfully generated {0} palette using the dataset: {1} [debug] # Messages from MCC Debug Mode @@ -97,6 +98,11 @@ error.realms.access_denied=This Realms world does not exist or access was denied error.realms.server_unavailable=Realms server may require some time to start up. Please retry again later. error.realms.server_id=Invalid or unknown Realms server ID. error.realms.disabled=Trying to join a Realms world but Realms support is disabled in config +error.missing.argument=You are missing argument {0} +error.usage=Usage: +error.generator.invalid=Invalid usage of the generator command! +error.generator.path=Invalid data path provided! (The path either does not exists or you have made a typo) +error.generator.json=The provided path must be a path to a file that is in .json format! [internal command] # MCC internal help command @@ -321,11 +327,13 @@ cmd.move.enable=Enabling Terrain and Movements on next server login, respawn or cmd.move.disable=Disabling Terrain and Movements. cmd.move.moving=Moving {0} cmd.move.dir_fail=Cannot move in that direction. -cmd.move.walk=Walking to {0} +cmd.move.walk=Walking from {1} to {0} cmd.move.fail=Failed to compute path to {0} cmd.move.suggestforce=Failed to compute a safe path to {0}. Try -f parameter to allow unsafe movements. cmd.move.gravity.enabled=Gravity is enabled. cmd.move.gravity.disabled=Gravity is disabled. +cmd.move.chunk_loading_status=Chunk loading status: {0:P} - {1} out of {2} load completed. +cmd.move.chunk_not_loaded=The chunk where the target location resides has not yet been loaded. # Reco cmd.reco.desc=restart and reconnect to the server. diff --git a/MinecraftClient/Scripting/ChatBot.cs b/MinecraftClient/Scripting/ChatBot.cs index ffda9560..650bcf8c 100644 --- a/MinecraftClient/Scripting/ChatBot.cs +++ b/MinecraftClient/Scripting/ChatBot.cs @@ -327,7 +327,7 @@ namespace MinecraftClient /// 0 to create/update an item. 1 to remove an item. /// The name of the objective the score belongs to /// The score to be displayed next to the entry. Only sent when Action does not equal 1. - public virtual void OnUpdateScore(string entityname, byte action, string objectivename, int value) { } + public virtual void OnUpdateScore(string entityname, int action, string objectivename, int value) { } /// /// Called when an inventory/container was updated by server