From 67c5d6a44e4763ee9351f1191fa96cc7c44bebb1 Mon Sep 17 00:00:00 2001 From: TelepathicGrunt <40846040+TelepathicGrunt@users.noreply.github.com> Date: Fri, 1 Nov 2024 08:16:15 -0400 Subject: [PATCH] Show a range's default value in config file Closes https://github.com/neoforged/NeoForge/issues/1643 --- src/main/java/net/neoforged/neoforge/common/ModConfigSpec.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/neoforged/neoforge/common/ModConfigSpec.java b/src/main/java/net/neoforged/neoforge/common/ModConfigSpec.java index 870ce31e09..5b2867abfc 100644 --- a/src/main/java/net/neoforged/neoforge/common/ModConfigSpec.java +++ b/src/main/java/net/neoforged/neoforge/common/ModConfigSpec.java @@ -363,7 +363,8 @@ public > ConfigValue defineInRange(String pat public > ConfigValue defineInRange(List path, Supplier defaultSupplier, V min, V max, Class clazz) { Range range = new Range<>(clazz, min, max); context.setRange(range); - comment("Range: " + range.toString()); + comment("Range: " + range); + comment("Default: " + defaultSupplier.get()); return define(path, defaultSupplier, range); }