From d7221978d278426b8c65fbb78b953402d66529a7 Mon Sep 17 00:00:00 2001 From: Joseph Garcia Date: Sat, 31 Jul 2021 23:21:56 -0500 Subject: [PATCH] update libgui --- build.gradle | 2 +- gradle.properties | 10 +++++----- .../java/com/josyf/commandbuttons/CommandButtons.java | 5 +++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 623f7d0..e4d505e 100644 --- a/build.gradle +++ b/build.gradle @@ -45,7 +45,7 @@ dependencies { // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs. // You may need to force-disable transitiveness on them. - modImplementation "io.github.cottonmc:LibGui:3.2.2+1.16.3" + modImplementation "io.github.cottonmc:LibGui:4.1.5+1.17.1" } processResources { diff --git a/gradle.properties b/gradle.properties index 6d7b7f3..f783221 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=1.16.5 - yarn_mappings=1.16.5+build.1 - loader_version=0.11.1 + minecraft_version=1.17.1 + yarn_mappings=1.17.1+build.31 + loader_version=0.11.6 # Mod Properties - mod_version = 1.1.0 + mod_version = 1.2.0 maven_group = com.josyf.commandbuttons archives_base_name = command-gui-buttons # Dependencies # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api - fabric_version=0.29.3+1.16 + fabric_version=0.37.1+1.17 diff --git a/src/main/java/com/josyf/commandbuttons/CommandButtons.java b/src/main/java/com/josyf/commandbuttons/CommandButtons.java index f8a46ef..a667434 100644 --- a/src/main/java/com/josyf/commandbuttons/CommandButtons.java +++ b/src/main/java/com/josyf/commandbuttons/CommandButtons.java @@ -7,7 +7,8 @@ import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents; import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; import net.minecraft.client.MinecraftClient; -import net.minecraft.client.options.KeyBinding; +//import net.minecraft.client.options.KeyBinding; +import net.minecraft.client.option.KeyBinding; import net.minecraft.client.util.InputUtil; import org.json.simple.JSONObject; import org.lwjgl.glfw.GLFW; @@ -41,7 +42,7 @@ public class CommandButtons implements ModInitializer { ClientTickEvents.END_CLIENT_TICK.register(client -> { while (keyBinding.wasPressed()) { - MinecraftClient.getInstance().openScreen(new ButtonGUIScreen(new ButtonGUI())); + MinecraftClient.getInstance().setScreen(new ButtonGUIScreen(new ButtonGUI())); //client.player.closeScreen(); } });