Skip to content

Commit

Permalink
Fixed Ping Menu keybind not working, when assigned to a mouse button
Browse files Browse the repository at this point in the history
  • Loading branch information
GirafiStudios committed Dec 25, 2020
1 parent c7737d3 commit 01d3147
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
minecraft_version=1.16.4
forge_version=35.0.15
forge_version=35.1.11
mappings=20201028-1.16.3
mod_version=1.6.7
mod_version=1.6.8

org.gradle.jvmargs=-Xmx4G
org.gradle.daemon=false
2 changes: 1 addition & 1 deletion src/main/java/dmillerw/ping/client/KeyHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public static void onClientTick(TickEvent.ClientTickEvent event) {
}

long handle = Minecraft.getInstance().getMainWindow().getHandle();
boolean keyPressed = (KEY_BINDING.getKey().getKeyCode() >= 0 ? InputMappings.isKeyDown(handle, KEY_BINDING.getKey().getKeyCode()) : InputMappings.isKeyDown(handle, KEY_BINDING.getKey().getKeyCode() + 100));
boolean keyPressed = (KEY_BINDING.matchesMouseKey(KEY_BINDING.getKey().getKeyCode()) ? GLFW.glfwGetMouseButton(handle, KEY_BINDING.getKey().getKeyCode()) == 1 : InputMappings.isKeyDown(handle, KEY_BINDING.getKey().getKeyCode()));

if (keyPressed != lastKeyState) {
if (keyPressed) {
Expand Down

0 comments on commit 01d3147

Please sign in to comment.