dont always regenerate uuid

This commit is contained in:
zimzaza4
2024-07-23 17:40:24 +08:00
parent b6e6a27c10
commit 274abe432a

View File

@@ -103,6 +103,7 @@ public class GeneratorMain {
} }
File animationsFolder = new File(output, "animations"); File animationsFolder = new File(output, "animations");
File entityFolder = new File(output, "entity");
File modelsFolder = new File(output, "models/entity"); File modelsFolder = new File(output, "models/entity");
File texturesFolder = new File(output, "textures/entity"); File texturesFolder = new File(output, "textures/entity");
File animationControllersFolder = new File(output, "animation_controllers"); File animationControllersFolder = new File(output, "animation_controllers");
@@ -111,17 +112,18 @@ public class GeneratorMain {
File manifestFile = new File(output, "manifest.json"); File manifestFile = new File(output, "manifest.json");
output.mkdirs(); output.mkdirs();
Path path = manifestFile.toPath(); if (!manifestFile.exists()) {
if (!path.toFile().exists()) {
try { try {
Files.writeString(path, Files.writeString(manifestFile.toPath(),
PackManifest.generate(), StandardCharsets.UTF_8); PackManifest.generate(), StandardCharsets.UTF_8);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
animationsFolder.mkdirs(); animationsFolder.mkdirs();
entityFolder.mkdirs(); entityFolder.mkdirs();
modelsFolder.mkdirs(); modelsFolder.mkdirs();