diff options
author | isXander <xander@isxander.dev> | 2024-10-19 19:22:45 +0100 |
---|---|---|
committer | isXander <xander@isxander.dev> | 2024-10-19 19:22:45 +0100 |
commit | e73a08e6672fb380cab8db71340158969c5ef56b (patch) | |
tree | dd08a311f4eff9a91b465ef1854caa1286fc6f9a /src/testmod/java/dev/isxander/yacl3/test/CodecConfig.java | |
parent | 519ac2fc0e23587defcf4a8259979961d35d0ce2 (diff) | |
download | YetAnotherConfigLib-e73a08e6672fb380cab8db71340158969c5ef56b.tar.gz YetAnotherConfigLib-e73a08e6672fb380cab8db71340158969c5ef56b.tar.bz2 YetAnotherConfigLib-e73a08e6672fb380cab8db71340158969c5ef56b.zip |
3.6.0
Diffstat (limited to 'src/testmod/java/dev/isxander/yacl3/test/CodecConfig.java')
-rw-r--r-- | src/testmod/java/dev/isxander/yacl3/test/CodecConfig.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/testmod/java/dev/isxander/yacl3/test/CodecConfig.java b/src/testmod/java/dev/isxander/yacl3/test/CodecConfig.java index 1a65eb2..1b185ac 100644 --- a/src/testmod/java/dev/isxander/yacl3/test/CodecConfig.java +++ b/src/testmod/java/dev/isxander/yacl3/test/CodecConfig.java @@ -9,7 +9,6 @@ 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<CodecConfig> { @@ -24,8 +23,11 @@ public class CodecConfig extends JsonFileCodecConfig<CodecConfig> { public final ConfigEntry<ResourceLocation> myIdentifier = register("my_identifier", YACLPlatform.rl("test"), ResourceLocation.CODEC); + //? if >=1.21.2 { public final ConfigEntry<Component> myText = - register("my_text", Component.literal("Hello"), ComponentSerialization.CODEC); + register("my_text", Component.literal("Hello"), + net.minecraft.network.chat.ComponentSerialization.CODEC); + //?} public final ReadonlyConfigEntry<InnerCodecConfig> myInnerConfig = register("my_inner_config", InnerCodecConfig.INSTANCE); |