update libgui

This commit is contained in:
Joseph Garcia 2021-07-31 23:21:56 -05:00
parent 6dd6ef5a0f
commit d7221978d2
3 changed files with 9 additions and 8 deletions

View File

@ -45,7 +45,7 @@ dependencies {
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs. // PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
// You may need to force-disable transitiveness on them. // 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 { processResources {

View File

@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties # Fabric Properties
# check these on https://fabricmc.net/use # check these on https://fabricmc.net/use
minecraft_version=1.16.5 minecraft_version=1.17.1
yarn_mappings=1.16.5+build.1 yarn_mappings=1.17.1+build.31
loader_version=0.11.1 loader_version=0.11.6
# Mod Properties # Mod Properties
mod_version = 1.1.0 mod_version = 1.2.0
maven_group = com.josyf.commandbuttons maven_group = com.josyf.commandbuttons
archives_base_name = command-gui-buttons archives_base_name = command-gui-buttons
# Dependencies # Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api # 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

View File

@ -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.event.lifecycle.v1.ClientTickEvents;
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
import net.minecraft.client.MinecraftClient; 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 net.minecraft.client.util.InputUtil;
import org.json.simple.JSONObject; import org.json.simple.JSONObject;
import org.lwjgl.glfw.GLFW; import org.lwjgl.glfw.GLFW;
@ -41,7 +42,7 @@ public class CommandButtons implements ModInitializer {
ClientTickEvents.END_CLIENT_TICK.register(client -> { ClientTickEvents.END_CLIENT_TICK.register(client -> {
while (keyBinding.wasPressed()) { while (keyBinding.wasPressed()) {
MinecraftClient.getInstance().openScreen(new ButtonGUIScreen(new ButtonGUI())); MinecraftClient.getInstance().setScreen(new ButtonGUIScreen(new ButtonGUI()));
//client.player.closeScreen(); //client.player.closeScreen();
} }
}); });