From c5b144b60cc3c6bfab2619d2e7616193ab71de5d Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Wed, 28 Sep 2022 22:28:29 +0200 Subject: [PATCH] No Comment - Added "." to empty comments in config files (-> Fixes forge startup crash on 1.19) --- .../java/com/simibubi/create/foundation/config/CStress.java | 4 ++-- .../com/simibubi/create/foundation/config/ConfigBase.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/simibubi/create/foundation/config/CStress.java b/src/main/java/com/simibubi/create/foundation/config/CStress.java index 344394f98..bfc15855b 100644 --- a/src/main/java/com/simibubi/create/foundation/config/CStress.java +++ b/src/main/java/com/simibubi/create/foundation/config/CStress.java @@ -22,7 +22,7 @@ public class CStress extends ConfigBase implements IStressValueProvider { @Override protected void registerAll(Builder builder) { - builder.comment("", Comments.su, Comments.impact) + builder.comment(".", Comments.su, Comments.impact) .push("impact"); BlockStressDefaults.DEFAULT_IMPACTS.forEach((r, i) -> { if (r.getNamespace() @@ -31,7 +31,7 @@ public class CStress extends ConfigBase implements IStressValueProvider { }); builder.pop(); - builder.comment("", Comments.su, Comments.capacity) + builder.comment(".", Comments.su, Comments.capacity) .push("capacity"); BlockStressDefaults.DEFAULT_CAPACITIES.forEach((r, i) -> { if (r.getNamespace() diff --git a/src/main/java/com/simibubi/create/foundation/config/ConfigBase.java b/src/main/java/com/simibubi/create/foundation/config/ConfigBase.java index 352975c79..5559a8db4 100644 --- a/src/main/java/com/simibubi/create/foundation/config/ConfigBase.java +++ b/src/main/java/com/simibubi/create/foundation/config/ConfigBase.java @@ -110,11 +110,11 @@ public abstract class ConfigBase { public void addComments(Builder builder, String... comment) { if (comment.length > 0) { String[] comments = new String[comment.length + 1]; - comments[0] = " "; + comments[0] = "."; System.arraycopy(comment, 0, comments, 1, comment.length); builder.comment(comments); } else - builder.comment(" "); + builder.comment("."); } public void register(ForgeConfigSpec.Builder builder) {