Minecraft-Console-Client/MinecraftClient/Mapping/EntityPalettes/EntityPaletteGenerator.cs
ORelio bd85c46663 Implement entity types (#1001)
Implement palette generation and investigate palette changes between
versions. Turns out 1.13- has legacy IDs, 1.14 switches to entity
palette and 1.15 refreshes the whole palette just to insert Bee.

Also refactor entity handling code here and there.
2020-05-24 18:21:22 +02:00

20 lines
809 B
C#

using MinecraftClient.Protocol;
namespace MinecraftClient.Mapping.EntityPalettes
{
/// <summary>
/// Generator for MCC ItemType enumeration
/// </summary>
public static class EntityPaletteGenerator
{
/// <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");
}
}
}