Skip to content

Commit 68f5ec5

Browse files
committed
just do texture IDs incrementally, the written IDs are just wrong
1 parent 9f4bbc5 commit 68f5ec5

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

DenizenModelsConverter/MinecraftModelMaker.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,10 @@ public static string CreateModelFor(BBModel model, BBModel.Outliner outline)
1717
JObject jout = new(), textures = new(), group = new(), display = new(), head = new();
1818
JArray groups = new(), elements = new();
1919
JArray childrenList = new();
20+
int texId = 0;
2021
foreach (BBModel.Texture texture in model.Textures)
2122
{
22-
if (texture.ID == "1" && model.Textures.Count == 1)
23-
{ // Some models have only one texture, labeled '1', which should be #0
24-
textures.Add("0", texture.CorrectedFullPath);
25-
}
26-
else
27-
{
28-
textures.Add(texture.ID, texture.CorrectedFullPath);
29-
}
23+
textures.Add((texId++).ToString(), texture.CorrectedFullPath);
3024
if (texture.Particle)
3125
{
3226
textures.Add("particle", texture.CorrectedFullPath);

0 commit comments

Comments
 (0)