diff options
author | isXander <xander@isxander.dev> | 2024-05-29 22:42:46 +0100 |
---|---|---|
committer | isXander <xander@isxander.dev> | 2024-05-29 22:42:46 +0100 |
commit | 646c7bac69dba476b3f9171568091eb23a86edaa (patch) | |
tree | 83727744315b956120fb573f9ecd883837b63099 /src/testmod | |
parent | 41253828df7c2066b5df29a32aa8e512f34ad85a (diff) | |
download | YetAnotherConfigLib-646c7bac69dba476b3f9171568091eb23a86edaa.tar.gz YetAnotherConfigLib-646c7bac69dba476b3f9171568091eb23a86edaa.tar.bz2 YetAnotherConfigLib-646c7bac69dba476b3f9171568091eb23a86edaa.zip |
1.21 compat
Diffstat (limited to 'src/testmod')
3 files changed, 5 insertions, 3 deletions
diff --git a/src/testmod/java/dev/isxander/yacl3/test/AutogenConfigTest.java b/src/testmod/java/dev/isxander/yacl3/test/AutogenConfigTest.java index 9bb361e..186d192 100644 --- a/src/testmod/java/dev/isxander/yacl3/test/AutogenConfigTest.java +++ b/src/testmod/java/dev/isxander/yacl3/test/AutogenConfigTest.java @@ -24,7 +24,7 @@ import java.util.List; public class AutogenConfigTest { public static final ConfigClassHandler<AutogenConfigTest> INSTANCE = ConfigClassHandler.createBuilder(AutogenConfigTest.class) - .id(new ResourceLocation("yacl3-test", "config")) + .id(YACLPlatform.rl("yacl3-test", "config")) .serializer(config -> GsonConfigSerializerBuilder.create(config) .setPath(YACLPlatform.getConfigDir().resolve("yacl-test-v2.json5")) .setJson5(true) diff --git a/src/testmod/java/dev/isxander/yacl3/test/GuiTest.java b/src/testmod/java/dev/isxander/yacl3/test/GuiTest.java index cdc1285..07e0098 100644 --- a/src/testmod/java/dev/isxander/yacl3/test/GuiTest.java +++ b/src/testmod/java/dev/isxander/yacl3/test/GuiTest.java @@ -14,6 +14,7 @@ import dev.isxander.yacl3.gui.controllers.string.number.DoubleFieldController; import dev.isxander.yacl3.gui.controllers.string.number.FloatFieldController; import dev.isxander.yacl3.gui.controllers.string.number.IntegerFieldController; import dev.isxander.yacl3.gui.controllers.string.number.LongFieldController; +import dev.isxander.yacl3.platform.YACLPlatform; import net.minecraft.ChatFormatting; import net.minecraft.Util; import net.minecraft.client.GraphicsStatus; @@ -502,7 +503,7 @@ public class GuiTest { } private static ResourceLocation imageSample(String name) { - return new ResourceLocation("yacl_test", "textures/images/" + name); + return YACLPlatform.rl("yacl_test", "textures/images/" + name); } private static boolean myBooleanOption = true; diff --git a/src/testmod/kotlin/dev/isxander/yacl3/test/DslTest.kt b/src/testmod/kotlin/dev/isxander/yacl3/test/DslTest.kt index 2efd9a4..a3ed7cc 100644 --- a/src/testmod/kotlin/dev/isxander/yacl3/test/DslTest.kt +++ b/src/testmod/kotlin/dev/isxander/yacl3/test/DslTest.kt @@ -4,6 +4,7 @@ import dev.isxander.yacl3.api.OptionFlag import dev.isxander.yacl3.api.controller.BooleanControllerBuilder import dev.isxander.yacl3.api.controller.IntegerSliderControllerBuilder import dev.isxander.yacl3.dsl.* +import dev.isxander.yacl3.platform.YACLPlatform import net.minecraft.client.gui.screens.Screen import net.minecraft.network.chat.Component import net.minecraft.resources.ResourceLocation @@ -85,7 +86,7 @@ fun kotlinDslGui(parent: Screen?) = YetAnotherConfigLib("namespace") { addDefaultDescription(lines = 5) text { Component.translatable("somecustomkey") } - webpImage(ResourceLocation("namespace", "image.png")) + webpImage(YACLPlatform.rl("namespace", "image.png")) } // KProperties are cool! |