From e73a08e6672fb380cab8db71340158969c5ef56b Mon Sep 17 00:00:00 2001 From: isXander Date: Sat, 19 Oct 2024 19:22:45 +0100 Subject: 3.6.0 --- src/testmod/kotlin/dev/isxander/yacl3/test/DslTest.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/testmod/kotlin/dev') 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(YACLPlatform.getConfig val myIdentifier by register(YACLPlatform.rl("test"), ResourceLocation.CODEC) + // 1.20.1 doesn't have a component codec + //? if >1.20.1 val myText by register(Component.literal("Hello, World!"), ComponentSerialization.CODEC) init { @@ -110,7 +114,7 @@ object CodecConfigKt : JsonFileCodecConfig(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("myString").onReady { } -- cgit