9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-19 15:09:15 +00:00

修复fix atlas下无法检测贴图存在的问题

This commit is contained in:
XiaoMoMi
2025-11-22 15:19:53 +08:00
parent 76d2a618bd
commit ba55f91f55

View File

@@ -1544,7 +1544,14 @@ public abstract class AbstractPackManager implements PackManager {
}
}
if (Config.fixTextureAtlas()) {
texturesToFix.add(key);
String imagePath = "assets/" + key.namespace() + "/textures/" + key.value() + ".png";
for (Path rootPath : rootPaths) {
if (Files.exists(rootPath.resolve(imagePath))) {
texturesToFix.add(key);
continue label;
}
}
TranslationManager.instance().log("warning.config.resource_pack.generation.missing_model_texture", entry.getValue().stream().distinct().toList().toString(), imagePath);
} else {
TranslationManager.instance().log("warning.config.resource_pack.generation.texture_not_in_atlas", key.toString());
}