FiguraMC / Figura

Extensively customize your character with Figura!
https://modrinth.com/mod/figura
GNU Lesser General Public License v2.1
225 stars 44 forks source link

Fix texture issue with 4.10+ models. #235

Closed GrandpaScout closed 2 months ago

GrandpaScout commented 2 months ago

Blockbench pushed a fix in update 4.10.0 that fixed relative paths for textures. It originally treated the bbmodel file itself as a directory, which caused the relative path to contain an extra "../". Since this has been fixed, Figura tries to read textures as if the bbmodel is a directory (which it is not.)

This commit should fix this issue while still keeping compatibility with 4.9- models by doing the old method if a file at the relative path doesn't exist and the path starts with "../".


Gonna be honest. I kinda took the easy approach when making this. There's probably a better way of handling this but I don't wanna mess with Java's file path stuff too much.

The problems this issue caused are:

The following was changed: