steal mo structures config for testing and make it workm, 1.0.3

This commit is contained in:
Draylar
2021-03-13 17:17:40 -06:00
parent e0f1ef8b5e
commit 4e24988fa3
4 changed files with 134 additions and 3 deletions
@@ -103,7 +103,7 @@ public class OmegaConfig {
// Cursed time.
List<String> lines = new ArrayList<>(Arrays.asList(json.split("\n")));
Map<Integer, String> insertions = new HashMap<>();
Map<Integer, String> insertions = new TreeMap<>();
Map<String, String> keyToComments = new HashMap<>();
// populate key -> comments map
@@ -136,7 +136,11 @@ public class OmegaConfig {
}
// insertions -> list
insertions.forEach(lines::add);
for (Map.Entry<Integer, String> entry : insertions.entrySet()) {
Integer key = entry.getKey();
String value = entry.getValue();
lines.add(key, value);
}
// list -> string
StringBuilder res = new StringBuilder();