aboutsummaryrefslogtreecommitdiff
path: root/src/testmod
diff options
context:
space:
mode:
Diffstat (limited to 'src/testmod')
-rw-r--r--src/testmod/java/dev/isxander/yacl3/test/AutogenConfigTest.java2
-rw-r--r--src/testmod/java/dev/isxander/yacl3/test/GuiTest.java3
-rw-r--r--src/testmod/kotlin/dev/isxander/yacl3/test/DslTest.kt3
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!