/// <summary> /// Place below line to Program.cs /// Inventory.ItemPalettes.ItemPaletteGenerator.GenerateItemType(@"your\path\to\registries.json"); /// See https://wiki.vg/Data_Generators for getting those .json /// </summary> /// <param name="registriesJsonFile"></param> public static void GenerateItemType(string registriesJsonFile) { DataTypeGenerator.GenerateEnumWithPalette( registriesJsonFile, "minecraft:item", "ItemType", "MinecraftClient.Inventory", "ItemPalette", "MinecraftClient.Inventory.ItemPalettes"); }
/// <summary> /// Generate EntityType.cs from Minecraft registries.json /// </summary> /// <param name="registriesJsonFile">path to registries.json</param> /// <remarks>java -cp minecraft_server.jar net.minecraft.data.Main --reports</remarks> public static void GenerateEntityTypes(string registriesJsonFile) { DataTypeGenerator.GenerateEnumWithPalette(registriesJsonFile, "minecraft:entity_type", "EntityType", "MinecraftClient.Mapping", "EntityPalette", "MinecraftClient.Mapping.EntityPalettes"); }