Skip to content

Commit

Permalink
Fixed multiple key presses when finding items
Browse files Browse the repository at this point in the history
  • Loading branch information
Buuz135 committed Sep 22, 2024
1 parent b73519f commit f3ff036
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private static void init() {
});
ClientRawInputEvent.KEY_PRESSED.register((client, keyCode, scanCode, action, modifiers) -> {
if (!lastRenderedStack.isEmpty() && client.level != null && client.level.getGameTime() - lastTooltipTime < 3) {
if (KEY.matches(keyCode, scanCode))
if (KEY.matches(keyCode, scanCode) && action == 1)
NetworkManager.sendToServer(new PositionRequestMessage(lastRenderedStack));
if (PULL_ONE.matches(keyCode, scanCode) && action == 1)
NetworkManager.sendToServer(new PullItemRequestMessage(lastRenderedStack, 1));
Expand Down

0 comments on commit f3ff036

Please sign in to comment.