diff options
author | isXander <xander@isxander.dev> | 2023-08-17 14:19:32 +0100 |
---|---|---|
committer | isXander <xander@isxander.dev> | 2023-08-17 14:19:32 +0100 |
commit | 39bc5b5d8b8e6d4369ea71a7787907521e11ad34 (patch) | |
tree | d56be6ac071094646829061e2d835e6e952df47c /common/src/main/java/dev/isxander/yacl3/config/GsonConfigInstance.java | |
parent | 9ffd159faa215256161c3af9c57bd0b742b6d818 (diff) | |
download | YetAnotherConfigLib-39bc5b5d8b8e6d4369ea71a7787907521e11ad34.tar.gz YetAnotherConfigLib-39bc5b5d8b8e6d4369ea71a7787907521e11ad34.tar.bz2 YetAnotherConfigLib-39bc5b5d8b8e6d4369ea71a7787907521e11ad34.zip |
Re-write image renderer handling to be threadsafe (relates to #101)
Diffstat (limited to 'common/src/main/java/dev/isxander/yacl3/config/GsonConfigInstance.java')
-rw-r--r-- | common/src/main/java/dev/isxander/yacl3/config/GsonConfigInstance.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/common/src/main/java/dev/isxander/yacl3/config/GsonConfigInstance.java b/common/src/main/java/dev/isxander/yacl3/config/GsonConfigInstance.java index 0d7b289..acbf338 100644 --- a/common/src/main/java/dev/isxander/yacl3/config/GsonConfigInstance.java +++ b/common/src/main/java/dev/isxander/yacl3/config/GsonConfigInstance.java @@ -22,6 +22,20 @@ import java.util.function.UnaryOperator; * * @param <T> config data type * @deprecated upgrade to config v2 {@link dev.isxander.yacl3.config.v2.api.ConfigClassHandler} with {@link dev.isxander.yacl3.config.v2.api.serializer.GsonConfigSerializerBuilder} + * <pre> + * {@code + * public class MyConfig { + * public static ConfigClassHandler<MyConfig> HANDLER = ConfigClassHandler.createBuilder(MyConfig.class) + * .id(new ResourceLocation("modid", "config")) + * .serializer(config -> GsonConfigSerializerBuilder.create(config) + * .setPath(FabricLoader.getInstance().getConfigDir().resolve("my_mod.json") + * .build()) + * .build(); + * + * @SerialEntry public boolean myBoolean = true; + * } + * } + * </pre> */ @Deprecated public class GsonConfigInstance<T> extends ConfigInstance<T> { |