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/kotlin/dev/isxander | |
parent | 519ac2fc0e23587defcf4a8259979961d35d0ce2 (diff) | |
download | YetAnotherConfigLib-e73a08e6672fb380cab8db71340158969c5ef56b.tar.gz YetAnotherConfigLib-e73a08e6672fb380cab8db71340158969c5ef56b.tar.bz2 YetAnotherConfigLib-e73a08e6672fb380cab8db71340158969c5ef56b.zip |
3.6.0
Diffstat (limited to 'src/testmod/kotlin/dev/isxander')
-rw-r--r-- | src/testmod/kotlin/dev/isxander/yacl3/test/DslTest.kt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/testmod/kotlin/dev/isxander/yacl3/test/DslTest.kt b/src/testmod/kotlin/dev/isxander/yacl3/test/DslTest.kt index ac162a1..35e1a4d 100644 --- a/src/testmod/kotlin/dev/isxander/yacl3/test/DslTest.kt +++ b/src/testmod/kotlin/dev/isxander/yacl3/test/DslTest.kt @@ -8,6 +8,8 @@ import dev.isxander.yacl3.dsl.* import dev.isxander.yacl3.platform.YACLPlatform import net.minecraft.client.gui.screens.Screen import net.minecraft.network.chat.Component +// 1.20.1 doesn't have a component codec +//? if >1.20.1 import net.minecraft.network.chat.ComponentSerialization import net.minecraft.resources.ResourceLocation @@ -20,6 +22,8 @@ object CodecConfigKt : JsonFileCodecConfig<CodecConfigKt>(YACLPlatform.getConfig val myIdentifier by register<ResourceLocation>(YACLPlatform.rl("test"), ResourceLocation.CODEC) + // 1.20.1 doesn't have a component codec + //? if >1.20.1 val myText by register<Component>(Component.literal("Hello, World!"), ComponentSerialization.CODEC) init { @@ -110,7 +114,7 @@ object CodecConfigKt : JsonFileCodecConfig<CodecConfigKt>(YACLPlatform.getConfig // you can access other options like this! // `options` field is from the enclosing group dsl - listener { opt, newVal -> + addListener { opt, event -> options.futureRef<String>("myString").onReady { } |