diff options
author | isXander <xander@isxander.dev> | 2024-06-12 17:15:09 +0100 |
---|---|---|
committer | isXander <xander@isxander.dev> | 2024-06-12 17:15:09 +0100 |
commit | 566fb6c498d571281c94029f8dfbac5e5077600c (patch) | |
tree | 7b92ee139e0e6e2cdd8d8619c62f4f7d031aad42 /src/testmod/java | |
parent | 305718e163f91802a4bc1c1ed6540febb2ce204e (diff) | |
download | YetAnotherConfigLib-566fb6c498d571281c94029f8dfbac5e5077600c.tar.gz YetAnotherConfigLib-566fb6c498d571281c94029f8dfbac5e5077600c.tar.bz2 YetAnotherConfigLib-566fb6c498d571281c94029f8dfbac5e5077600c.zip |
Changelog and minor changes
Diffstat (limited to 'src/testmod/java')
-rw-r--r-- | src/testmod/java/dev/isxander/yacl3/test/CodecConfig.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/testmod/java/dev/isxander/yacl3/test/CodecConfig.java b/src/testmod/java/dev/isxander/yacl3/test/CodecConfig.java index 08137e6..1a65eb2 100644 --- a/src/testmod/java/dev/isxander/yacl3/test/CodecConfig.java +++ b/src/testmod/java/dev/isxander/yacl3/test/CodecConfig.java @@ -6,12 +6,13 @@ import com.mojang.serialization.DataResult; import com.mojang.serialization.JsonOps; import dev.isxander.yacl3.config.v3.ConfigEntry; import dev.isxander.yacl3.config.v3.JsonFileCodecConfig; +import dev.isxander.yacl3.config.v3.ReadonlyConfigEntry; import dev.isxander.yacl3.platform.YACLPlatform; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.ComponentSerialization; import net.minecraft.resources.ResourceLocation; -public class CodecConfig extends JsonFileCodecConfig { +public class CodecConfig extends JsonFileCodecConfig<CodecConfig> { public static final CodecConfig INSTANCE = new CodecConfig(); public final ConfigEntry<Integer> myInt = @@ -26,8 +27,8 @@ public class CodecConfig extends JsonFileCodecConfig { public final ConfigEntry<Component> myText = register("my_text", Component.literal("Hello"), ComponentSerialization.CODEC); - public final ConfigEntry<InnerCodecConfig> myInnerConfig = - register("my_inner_config", InnerCodecConfig.INSTANCE, InnerCodecConfig.INSTANCE); + public final ReadonlyConfigEntry<InnerCodecConfig> myInnerConfig = + register("my_inner_config", InnerCodecConfig.INSTANCE); public static class InnerCodecConfig extends dev.isxander.yacl3.config.v3.CodecConfig<InnerCodecConfig> { public static final InnerCodecConfig INSTANCE = new InnerCodecConfig(); |