From 8255d5782fb6f8fbc7db99c4efe3b8918d69d890 Mon Sep 17 00:00:00 2001 From: sebseb7 Date: Fri, 5 Jan 2024 00:46:43 +0100 Subject: [PATCH] fix for slow servers --- gradle.properties | 4 ++-- .../sebseb7/autotrade/event/KeybindCallbacks.java | 12 ++++-------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/gradle.properties b/gradle.properties index bf16082..9b0acfc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,7 +7,7 @@ mod_name = AutoTrade author = sebseb7 mod_file_name = autotrade-fabric -mod_version = 0.0.6 +mod_version = 0.0.7 malilib_version = 0.18.0 @@ -15,4 +15,4 @@ minecraft_version_out = 1.20.4 minecraft_version = 1.20.4 mappings_version = 1.20.4+build.1 fabric_loader_version = 0.15.1 -mod_menu_version = 9.0.0-pre.1 +mod_menu_version = 9.0.0 diff --git a/src/main/java/com/github/sebseb7/autotrade/event/KeybindCallbacks.java b/src/main/java/com/github/sebseb7/autotrade/event/KeybindCallbacks.java index a254e8e..18562f0 100644 --- a/src/main/java/com/github/sebseb7/autotrade/event/KeybindCallbacks.java +++ b/src/main/java/com/github/sebseb7/autotrade/event/KeybindCallbacks.java @@ -332,19 +332,15 @@ public class KeybindCallbacks implements IHotkeyCallback, IClientTickHandler { inputInRange = true; ActionResult result = mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(input.toCenterPos(), Direction.UP, input, false)); - if (result.isAccepted()) { - inputOpened = true; - return; - } + inputOpened = true; + return; } if ((output.toCenterPos().distanceTo(mc.player.getPos()) < 4) && (outputInRange == false)) { outputInRange = true; ActionResult result = mc.interactionManager.interactBlock(mc.player, Hand.MAIN_HAND, new BlockHitResult(output.toCenterPos(), Direction.UP, output, false)); - if (result.isAccepted()) { - outputOpened = true; - return; - } + outputOpened = true; + return; } if (input.toCenterPos().distanceTo(mc.player.getPos()) > 5) {