diff options
author | HacktheTime <l4bg0jb7@duck.com> | 2023-10-04 20:38:16 +0200 |
---|---|---|
committer | HacktheTime <l4bg0jb7@duck.com> | 2023-10-04 20:38:16 +0200 |
commit | 354abd2073e2b4f0d4be274fcb9639702dd292c2 (patch) | |
tree | b3fee02f594c6088902650803841f41fc9c02e14 /src/main/java/de/hype/bbsentials/client | |
parent | a4aabb5cbd29fda0f8c6aeac867602528e4fd618 (diff) | |
download | BBsentials-354abd2073e2b4f0d4be274fcb9639702dd292c2.tar.gz BBsentials-354abd2073e2b4f0d4be274fcb9639702dd292c2.tar.bz2 BBsentials-354abd2073e2b4f0d4be274fcb9639702dd292c2.zip |
bug fixes
Diffstat (limited to 'src/main/java/de/hype/bbsentials/client')
3 files changed, 9 insertions, 3 deletions
diff --git a/src/main/java/de/hype/bbsentials/client/BBsentials.java b/src/main/java/de/hype/bbsentials/client/BBsentials.java index ee7c6b1..63dc8f1 100644 --- a/src/main/java/de/hype/bbsentials/client/BBsentials.java +++ b/src/main/java/de/hype/bbsentials/client/BBsentials.java @@ -46,6 +46,7 @@ public class BBsentials implements ClientModInitializer { /** * Checks if still connected to the Server. + * * @return true if it connected; false if old connection is kept. */ public static boolean conditionalReconnectToBBserver() { @@ -233,7 +234,12 @@ public class BBsentials implements ClientModInitializer { KeyBinding craftKeyBind = new KeyBinding("Craft", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_V, "BBsentials"); KeyBindingHelper.registerKeyBinding(craftKeyBind); ClientTickEvents.END_CLIENT_TICK.register(client -> { - if (craftKeyBind.wasPressed()) Chat.sendCommand("/craft"); + if (craftKeyBind.wasPressed()) MinecraftClient.getInstance().getNetworkHandler().sendChatMessage("/craft"); + }); + KeyBinding petKeyBind = new KeyBinding("Open Pet Menu", InputUtil.Type.KEYSYM, -1, "BBsentials"); + KeyBindingHelper.registerKeyBinding(petKeyBind); + ClientTickEvents.END_CLIENT_TICK.register(client -> { + if (petKeyBind.wasPressed()) MinecraftClient.getInstance().getNetworkHandler().sendChatMessage("/pets"); }); for (int i = 1; i <= 9; i++) { KeyBinding ecPageKeyBind = new KeyBinding("Ender Chest Page " + i, InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_KP_1 + (i - 1), "BBsentials"); diff --git a/src/main/java/de/hype/bbsentials/client/DebugThread.java b/src/main/java/de/hype/bbsentials/client/DebugThread.java index fe5e583..3c853c2 100644 --- a/src/main/java/de/hype/bbsentials/client/DebugThread.java +++ b/src/main/java/de/hype/bbsentials/client/DebugThread.java @@ -10,7 +10,7 @@ public class DebugThread implements Runnable { @Override public void run() { - loop(); + loop(); //place a breakpoint for only this thread here. } diff --git a/src/main/java/de/hype/bbsentials/client/SplashStatusUpdateListener.java b/src/main/java/de/hype/bbsentials/client/SplashStatusUpdateListener.java index 2463c79..95caab8 100644 --- a/src/main/java/de/hype/bbsentials/client/SplashStatusUpdateListener.java +++ b/src/main/java/de/hype/bbsentials/client/SplashStatusUpdateListener.java @@ -55,8 +55,8 @@ public class SplashStatusUpdateListener implements Runnable { public void setStatus(String newStatus) { this.newStatus = newStatus; if (newStatus.equals(SplashUpdatePacket.STATUS_SPLASHING)) { + splashed=true; executionService.schedule(() -> { - splashed=true; setStatus(SplashUpdatePacket.STATUS_DONE); splashLobby = false; }, 1, TimeUnit.MINUTES); |