From c0f26cab080c130b11693ea707220a4d20a735fc Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Thu, 16 Jun 2022 17:10:26 +0300 Subject: Update to 1.19 and bump version to 6.0.0 --- .../main/java/io/github/cottonmc/test/client/LibGuiTestClient.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'GuiTest/src/main') 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 openScreen(Function screenFactory) { -- cgit