aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelogs/1.7.1.md1
-rw-r--r--src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java3
2 files changed, 2 insertions, 2 deletions
diff --git a/changelogs/1.7.1.md b/changelogs/1.7.1.md
new file mode 100644
index 0000000..3570cef
--- /dev/null
+++ b/changelogs/1.7.1.md
@@ -0,0 +1 @@
+- Breaking change: `GsonConfigInstance` now only serializes fields annotated with `@ConfigEntry` to prevent strange GSON problem.
diff --git a/src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java b/src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java
index 5d19e48..40c2c99 100644
--- a/src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java
+++ b/src/main/java/dev/isxander/yacl/config/GsonConfigInstance.java
@@ -7,7 +7,6 @@ import net.minecraft.text.Text;
import java.awt.*;
import java.io.IOException;
-import java.lang.reflect.Modifier;
import java.lang.reflect.Type;
import java.nio.file.Files;
import java.nio.file.Path;
@@ -17,7 +16,7 @@ import java.util.function.UnaryOperator;
/**
* Uses GSON to serialize and deserialize config data from JSON to a file.
*
- * You can exclude fields from serialization by marking them as transient.
+ * Only fields annotated with {@link ConfigEntry} are included in the JSON.
* {@link Text}, {@link Style} and {@link Color} have default type adapters, so there is no need to provide them in your GSON instance.
* GSON is automatically configured to format fields as {@code lower_camel_case}.
*