aboutsummaryrefslogtreecommitdiff
path: root/GuiTest
diff options
context:
space:
mode:
authorJuuz <6596629+Juuxel@users.noreply.github.com>2022-06-16 17:10:26 +0300
committerJuuz <6596629+Juuxel@users.noreply.github.com>2022-06-16 17:10:26 +0300
commitc0f26cab080c130b11693ea707220a4d20a735fc (patch)
treee2ad26b6ee9811d1869deaf286c03102840ee5f0 /GuiTest
parentbf3e130211f6e0c9a1b6fad555fb3d38f6f984ea (diff)
downloadLibGui-c0f26cab080c130b11693ea707220a4d20a735fc.tar.gz
LibGui-c0f26cab080c130b11693ea707220a4d20a735fc.tar.bz2
LibGui-c0f26cab080c130b11693ea707220a4d20a735fc.zip
Update to 1.19 and bump version to 6.0.0
Diffstat (limited to 'GuiTest')
-rw-r--r--GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java b/GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java
index c396a7f..2d6c5b7 100644
--- a/GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java
+++ b/GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java
@@ -2,7 +2,7 @@ package io.github.cottonmc.test.client;
import com.mojang.brigadier.Command;
import net.fabricmc.api.ClientModInitializer;
-import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager;
+import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.ingame.HandledScreens;
@@ -39,14 +39,14 @@ public class LibGuiTestClient implements ClientModInitializer {
CottonHud.add(new WHudTest(), 10, -20, 10, 10);
CottonHud.add(new WLabel(Text.literal("Test label")), 10, -30, 10, 10);
- ClientCommandManager.DISPATCHER.register(
+ ClientCommandRegistrationCallback.EVENT.register((dispatcher, commandRegistryAccess) -> dispatcher.register(
literal("libgui")
.then(literal("config").executes(openScreen(client -> new ConfigGui(client.currentScreen))))
.then(literal("tab").executes(openScreen(client -> new TabTestGui())))
.then(literal("scrolling").executes(openScreen(client -> new ScrollingTestGui())))
.then(literal("insets").executes(openScreen(client -> new InsetsTestGui())))
.then(literal("textfield").executes(openScreen(client -> new TextFieldTestGui())))
- );
+ ));
}
private static Command<FabricClientCommandSource> openScreen(Function<MinecraftClient, LightweightGuiDescription> screenFactory) {