From 84a07a241ddc03be92680a077c9308695b66a179 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Sun, 11 Jul 2021 13:21:39 +0300 Subject: Update Yarn --- GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java | 2 +- .../java/io/github/cottonmc/test/client/LibGuiTestClient.java | 8 ++++---- gradle.properties | 2 +- .../io/github/cottonmc/cotton/gui/impl/modmenu/ConfigGui.java | 2 +- .../github/cottonmc/cotton/gui/impl/modmenu/ModMenuSupport.java | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java b/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java index 699c38e..278ddb9 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java +++ b/GuiTest/src/main/java/io/github/cottonmc/test/GuiItem.java @@ -32,6 +32,6 @@ public class GuiItem extends Item { @Environment(EnvType.CLIENT) private void openScreen() { - MinecraftClient.getInstance().openScreen(new CottonClientScreen(new TestClientGui())); + MinecraftClient.getInstance().setScreen(new CottonClientScreen(new TestClientGui())); } } 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 2f78fcd..02b1452 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 @@ -29,28 +29,28 @@ public class LibGuiTestClient implements ClientModInitializer { .then(literal("config").executes(context -> { var client = context.getSource().getClient(); client.send(() -> { - client.openScreen(new CottonClientScreen(new ConfigGui(client.currentScreen))); + client.setScreen(new CottonClientScreen(new ConfigGui(client.currentScreen))); }); return 0; })) .then(literal("tab").executes(context -> { var client = context.getSource().getClient(); client.send(() -> { - client.openScreen(new CottonClientScreen(new TabTestGui())); + client.setScreen(new CottonClientScreen(new TabTestGui())); }); return 0; })) .then(literal("scrolling").executes(context -> { var client = context.getSource().getClient(); client.send(() -> { - client.openScreen(new CottonClientScreen(new ScrollingTestGui())); + client.setScreen(new CottonClientScreen(new ScrollingTestGui())); }); return 0; })) .then(literal("insets").executes(context -> { var client = context.getSource().getClient(); client.send(() -> { - client.openScreen(new CottonClientScreen(new InsetsTestGui())); + client.setScreen(new CottonClientScreen(new InsetsTestGui())); }); return 0; })) diff --git a/gradle.properties b/gradle.properties index ce607dc..514178a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use minecraft_version=1.17.1 - yarn_mappings=1.17.1+build.1 + yarn_mappings=1.17.1+build.10 loader_version=0.11.6 # Mod Properties diff --git a/src/main/java/io/github/cottonmc/cotton/gui/impl/modmenu/ConfigGui.java b/src/main/java/io/github/cottonmc/cotton/gui/impl/modmenu/ConfigGui.java index 8c237a8..b1faf17 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/impl/modmenu/ConfigGui.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/impl/modmenu/ConfigGui.java @@ -52,7 +52,7 @@ public class ConfigGui extends LightweightGuiDescription { WButton doneButton = new WButton(new TranslatableText("gui.done")); doneButton.setOnClick(()->{ - MinecraftClient.getInstance().openScreen(previous); + MinecraftClient.getInstance().setScreen(previous); }); root.add(doneButton, 0, 5, 3, 1); diff --git a/src/main/java/io/github/cottonmc/cotton/gui/impl/modmenu/ModMenuSupport.java b/src/main/java/io/github/cottonmc/cotton/gui/impl/modmenu/ModMenuSupport.java index 60e62cb..6d1f094 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/impl/modmenu/ModMenuSupport.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/impl/modmenu/ModMenuSupport.java @@ -11,7 +11,7 @@ public class ModMenuSupport implements ModMenuApi { public ConfigScreenFactory getModConfigScreenFactory() { return screen -> new CottonClientScreen(new TranslatableText("options.libgui.libgui_settings"), new ConfigGui(screen)) { public void onClose() { - this.client.openScreen(screen); + this.client.setScreen(screen); } }; } -- cgit