From f18aee84c7a0c62f4c5dcf2f990fe97ab935eb44 Mon Sep 17 00:00:00 2001 From: Marc Hermans Date: Sun, 12 Apr 2026 09:48:41 +0200 Subject: [PATCH] Sort values in getValues method to ensure consistent ordering --- .../NeoFormConfigConfigurationSpecV1.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dsl/neoform/src/main/groovy/net/neoforged/gradle/dsl/neoform/configuration/NeoFormConfigConfigurationSpecV1.java b/dsl/neoform/src/main/groovy/net/neoforged/gradle/dsl/neoform/configuration/NeoFormConfigConfigurationSpecV1.java index 224f844e..29e8e0bf 100644 --- a/dsl/neoform/src/main/groovy/net/neoforged/gradle/dsl/neoform/configuration/NeoFormConfigConfigurationSpecV1.java +++ b/dsl/neoform/src/main/groovy/net/neoforged/gradle/dsl/neoform/configuration/NeoFormConfigConfigurationSpecV1.java @@ -35,9 +35,11 @@ import java.lang.reflect.Type; import java.nio.charset.StandardCharsets; import java.util.Collections; +import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.TreeMap; import java.util.stream.Collectors; import javax.annotation.Nullable; @@ -152,7 +154,13 @@ public String getName() { @Nested public Map getValues() { - return values == null ? Collections.emptyMap() : values; + if (values != null) { + var sorted = new TreeMap(Comparator.naturalOrder()); + sorted.putAll(values); + return sorted; + } + + return Collections.emptyMap(); } @Nullable