diff options
author | isXander <xander@isxander.dev> | 2023-08-15 16:13:54 +0100 |
---|---|---|
committer | isXander <xander@isxander.dev> | 2023-08-15 16:13:54 +0100 |
commit | 9f72a09a5b2afc99b08a79bda84f91ef51c0f4d0 (patch) | |
tree | 56c7214bf95fa50e2469762b972cb6163f5f1b14 /test-common/src/main/java/dev | |
parent | 3e30af10ab48aa64fa659834a863a4e3067d5542 (diff) | |
download | YetAnotherConfigLib-9f72a09a5b2afc99b08a79bda84f91ef51c0f4d0.tar.gz YetAnotherConfigLib-9f72a09a5b2afc99b08a79bda84f91ef51c0f4d0.tar.bz2 YetAnotherConfigLib-9f72a09a5b2afc99b08a79bda84f91ef51c0f4d0.zip |
Add javadoc to config api v2
Diffstat (limited to 'test-common/src/main/java/dev')
3 files changed, 6 insertions, 7 deletions
diff --git a/test-common/src/main/java/dev/isxander/yacl3/test/ConfigTest.java b/test-common/src/main/java/dev/isxander/yacl3/test/ConfigTest.java index e633061..fc07120 100644 --- a/test-common/src/main/java/dev/isxander/yacl3/test/ConfigTest.java +++ b/test-common/src/main/java/dev/isxander/yacl3/test/ConfigTest.java @@ -2,7 +2,7 @@ package dev.isxander.yacl3.test; import dev.isxander.yacl3.config.v2.api.ConfigClassHandler; import dev.isxander.yacl3.config.v2.api.SerialEntry; -import dev.isxander.yacl3.config.v2.api.GsonConfigSerializerBuilder; +import dev.isxander.yacl3.config.v2.api.serializer.GsonConfigSerializerBuilder; import dev.isxander.yacl3.platform.YACLPlatform; import java.awt.*; diff --git a/test-common/src/main/java/dev/isxander/yacl3/test/ConfigV2Test.java b/test-common/src/main/java/dev/isxander/yacl3/test/ConfigV2Test.java index 04b7db0..462bef8 100644 --- a/test-common/src/main/java/dev/isxander/yacl3/test/ConfigV2Test.java +++ b/test-common/src/main/java/dev/isxander/yacl3/test/ConfigV2Test.java @@ -7,7 +7,7 @@ import dev.isxander.yacl3.api.controller.ControllerBuilder; import dev.isxander.yacl3.api.controller.StringControllerBuilder; import dev.isxander.yacl3.config.v2.api.ConfigClassHandler; import dev.isxander.yacl3.config.v2.api.ConfigField; -import dev.isxander.yacl3.config.v2.api.GsonConfigSerializerBuilder; +import dev.isxander.yacl3.config.v2.api.serializer.GsonConfigSerializerBuilder; import dev.isxander.yacl3.config.v2.api.SerialEntry; import dev.isxander.yacl3.config.v2.api.autogen.*; import dev.isxander.yacl3.platform.YACLPlatform; @@ -23,7 +23,6 @@ public class ConfigV2Test { .setPath(YACLPlatform.getConfigDir().resolve("yacl-test-v2.json5")) .setJson5(true) .build()) - .autoGen(true) .build(); @AutoGen(category = "test", group = "master_test") @@ -69,7 +68,7 @@ public class ConfigV2Test { public static class TestListControllerFactory implements ListGroup.ControllerFactory<String> { @Override - public ControllerBuilder<String> createController(ListGroup annotation, ConfigField<List<String>> field, OptionStorage storage, Option<String> option) { + public ControllerBuilder<String> createController(ListGroup annotation, ConfigField<List<String>> field, OptionAccess storage, Option<String> option) { return StringControllerBuilder.create(option); } } diff --git a/test-common/src/main/java/dev/isxander/yacl3/test/GuiTest.java b/test-common/src/main/java/dev/isxander/yacl3/test/GuiTest.java index 4953d0c..6430c48 100644 --- a/test-common/src/main/java/dev/isxander/yacl3/test/GuiTest.java +++ b/test-common/src/main/java/dev/isxander/yacl3/test/GuiTest.java @@ -45,7 +45,7 @@ public class GuiTest { .option(ButtonOption.createBuilder() .name(Component.literal("Auto-gen test")) .action((screen, opt) -> { - ConfigV2Test.INSTANCE.serializer().deserialize(); + ConfigV2Test.INSTANCE.serializer().load(); Minecraft.getInstance().setScreen(ConfigV2Test.INSTANCE.generateGui().generateScreen(screen)); }) .build()) @@ -64,7 +64,7 @@ public class GuiTest { private static Screen getFullTestSuite(Screen parent) { AtomicReference<Option<Boolean>> booleanOption = new AtomicReference<>(); - ConfigTest.GSON.serializer().deserialize(); + ConfigTest.GSON.serializer().load(); return YetAnotherConfigLib.create(ConfigTest.GSON, (defaults, config, builder) -> builder .title(Component.literal("Test GUI")) .category(ConfigCategory.createBuilder() @@ -380,7 +380,7 @@ public class GuiTest { .build()) .save(() -> { Minecraft.getInstance().options.save(); - ConfigTest.GSON.serializer().serialize(); + ConfigTest.GSON.serializer().save(); }) ) .generateScreen(parent); |