mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-07-13 13:18:22 +00:00
ModelEditor - Update 'GetModelImageIndex'
This commit is contained in:
@@ -42,91 +42,89 @@ namespace PckStudio.Forms.Editor
|
||||
modelTreeView.ImageList.Images.AddRange(ApplicationScope.EntityImages);
|
||||
}
|
||||
|
||||
private const int InvalidImageIndex = 127;
|
||||
// TODO: move to json file. -miku
|
||||
private static int GetModelImageIndex(string modelName)
|
||||
private static Dictionary<string, int> ModelImageIndex = new Dictionary<string, int>()
|
||||
{
|
||||
return modelName switch
|
||||
{
|
||||
"bat" => 3,
|
||||
"blaze" => 4,
|
||||
"boat" => 5,
|
||||
"cat" => 6,
|
||||
"spider" => 107,
|
||||
"chicken" => 9,
|
||||
"cod" => 10,
|
||||
"cow" => 12,
|
||||
"creeper" => 13,
|
||||
"creeper_head" => 13,
|
||||
"dolphin" => 14,
|
||||
"horse.v2" => 110,
|
||||
"guardian" => 109,
|
||||
"bed" => 108,
|
||||
"dragon" => 21,
|
||||
"dragon_head" => 21,
|
||||
"enderman" => 23,
|
||||
"ghast" => 34,
|
||||
"irongolem" => 40,
|
||||
"lavaslime" => 46,
|
||||
"llama" => 44,
|
||||
"llamaspit" => 45,
|
||||
"minecart" => 47,
|
||||
"ocelot" => 50,
|
||||
"parrot" => 53,
|
||||
"phantom" => 54,
|
||||
"pig" => 55,
|
||||
"pigzombie" => 94,
|
||||
"polarbear" => 57,
|
||||
"rabbit" => 60,
|
||||
"sheep" => 63,
|
||||
"sheep.sheared" => 113,
|
||||
"shulker" => 64,
|
||||
"silverfish" => 66,
|
||||
"skeleton" => 67,
|
||||
"skeleton_head" => 67,
|
||||
"skeleton.stray" => 77,
|
||||
"skeleton.wither" => 89,
|
||||
"skeleton_wither_head" => 89,
|
||||
"slime" => 115,
|
||||
"slime.armor" => 116,
|
||||
["bat"] = 3,
|
||||
["blaze"] = 4,
|
||||
["boat"] = 5,
|
||||
["cat"] = 6,
|
||||
["spider"] = 107,
|
||||
["chicken"] = 9,
|
||||
["cod"] = 10,
|
||||
["cow"] = 12,
|
||||
["creeper"] = 13,
|
||||
["creeper_head"] = 13,
|
||||
["dolphin"] = 14,
|
||||
["horse.v2"] = 110,
|
||||
["guardian"] = 109,
|
||||
["bed"] = 108,
|
||||
["dragon"] = 21,
|
||||
["dragon_head"] = 21,
|
||||
["enderman"] = 23,
|
||||
["ghast"] = 34,
|
||||
["irongolem"] = 40,
|
||||
["lavaslime"] = 46,
|
||||
["llama"] = 44,
|
||||
["llamaspit"] = 45,
|
||||
["minecart"] = 47,
|
||||
["ocelot"] = 50,
|
||||
["parrot"] = 53,
|
||||
["phantom"] = 54,
|
||||
["pig"] = 55,
|
||||
["pigzombie"] = 94,
|
||||
["polarbear"] = 57,
|
||||
["rabbit"] = 60,
|
||||
["sheep"] = 63,
|
||||
["sheep.sheared"] = 113,
|
||||
["shulker"] = 64,
|
||||
["silverfish"] = 66,
|
||||
["skeleton"] = 67,
|
||||
["skeleton_head"] = 67,
|
||||
["skeleton.stray"] = 77,
|
||||
["skeleton.wither"] = 89,
|
||||
["skeleton_wither_head"] = 89,
|
||||
["slime"] = 115,
|
||||
["slime.armor"] = 116,
|
||||
|
||||
"snowgolem" => 71,
|
||||
"squid" => 76,
|
||||
"trident" => 80,
|
||||
"turtle" => 82,
|
||||
"villager" => 84,
|
||||
"villager.witch" => 87,
|
||||
["snowgolem"] = 71,
|
||||
["squid"] = 76,
|
||||
["trident"] = 80,
|
||||
["turtle"] = 82,
|
||||
["villager"] = 84,
|
||||
["villager.witch"] = 87,
|
||||
|
||||
"vex" => 83,
|
||||
"evoker" => 25,
|
||||
"vindicator" => 25,
|
||||
"witherBoss" => 88,
|
||||
"wolf" => 91,
|
||||
"zombie" => 92,
|
||||
"zombie_head" => 92,
|
||||
"zombie.husk" => 39,
|
||||
"zombie.villager" => 95,
|
||||
"zombie.drowned" => 17,
|
||||
"endermite" => 24,
|
||||
"pufferfish.small" => 111,
|
||||
"pufferfish.mid" => 112,
|
||||
"pufferfish.large" => 59,
|
||||
"salmon" => 62,
|
||||
"stray.armor" => 118,
|
||||
"stray_armor" => 118,
|
||||
"tropicalfish_a" => 81,
|
||||
"tropicalfish_b" => 81,
|
||||
"mooshroom" => 48,
|
||||
"witherBoss.armor" => 90,
|
||||
["vex"] = 83,
|
||||
["evoker"] = 25,
|
||||
["vindicator"] = 25,
|
||||
["witherBoss"] = 88,
|
||||
["wolf"] = 91,
|
||||
["zombie"] = 92,
|
||||
["zombie_head"] = 92,
|
||||
["zombie.husk"] = 39,
|
||||
["zombie.villager"] = 95,
|
||||
["zombie.drowned"] = 17,
|
||||
["endermite"] = 24,
|
||||
["pufferfish.small"] = 111,
|
||||
["pufferfish.mid"] = 112,
|
||||
["pufferfish.large"] = 59,
|
||||
["salmon"] = 62,
|
||||
["stray.armor"] = 118,
|
||||
["stray_armor"] = 118,
|
||||
["tropicalfish_a"] = 81,
|
||||
["tropicalfish_b"] = 81,
|
||||
["mooshroom"] = 48,
|
||||
["witherBoss.armor"] = 90,
|
||||
|
||||
"panda" => 52,
|
||||
"ravager" => 61,
|
||||
"pillager" => 56,
|
||||
"villager_v2" => 101,
|
||||
"zombie.villager_v2" => 102,
|
||||
["panda"] = 52,
|
||||
["ravager"] = 61,
|
||||
["pillager"] = 56,
|
||||
["villager_v2"] = 101,
|
||||
["zombie.villager_v2"] = 102,
|
||||
};
|
||||
|
||||
_ => 127
|
||||
};
|
||||
}
|
||||
private static int GetModelImageIndex(string name) => ModelImageIndex.TryGetValue(name, out int index) ? index : InvalidImageIndex;
|
||||
|
||||
private class ModelNode : TreeNode
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user