rename: manifest_version -> format_version

This commit is contained in:
moehreag 2024-05-26 13:57:58 +02:00
parent 1b4b1d0d93
commit 2e64ad2289
3 changed files with 5 additions and 5 deletions

View file

@ -1,5 +1,5 @@
[frog] [frog]
manifest_version = "1.0.0" format_version = "1.0.0"
[frog.mod] [frog.mod]
id = "example_mod" id = "example_mod"

View file

@ -44,17 +44,17 @@ public class ModPropertiesReader {
} }
private static ModProperties readProperties(UnmodifiableConfig config) { private static ModProperties readProperties(UnmodifiableConfig config) {
String manifestVer = config.get("frog.manifest_version"); String manifestVer = config.get("frog.format_version");
try { try {
return ManifestVersion.get(manifestVer).parse(config); return FormatVersion.get(manifestVer).parse(config);
} catch (IOException e) { } catch (IOException e) {
throw new UncheckedIOException(e); throw new UncheckedIOException(e);
} }
} }
@AllArgsConstructor @AllArgsConstructor
private enum ManifestVersion { private enum FormatVersion {
V1_0_0("1.0.0", config -> { V1_0_0("1.0.0", config -> {
String id = config.get("frog.mod.id"); String id = config.get("frog.mod.id");
String name = config.get("frog.mod.name"); String name = config.get("frog.mod.name");

View file

@ -1,5 +1,5 @@
[frog] [frog]
manifest_version = "1.0.0" format_version = "1.0.0"
[frog.mod] [frog.mod]
id = "frogloader" id = "frogloader"