From 03076b3ea68c69510af669bc646d3b7432a7b7b5 Mon Sep 17 00:00:00 2001 From: onixiya1337 <47077455+onixiya1337@users.noreply.github.com> Date: Wed, 10 Jul 2024 18:03:59 +0200 Subject: [PATCH] Osama & RobotHanzo cooking Visitors Macro: + Added ability to use both name and rarity visitor filters at the same time, thanks RobotHanzo! + Added ability to choose whether to reject or ignore when the visitor isn't filtered by name filters, thanks RobotHanzo! Remote Control: = Fixed avatar previews, thanks RobotHanzo! Webhook: = Fixed spamming with JDA update messages Jacob's Contest: = Fixed next contest's crops not clearing from the memory when the player did not participate in the contest, thanks RobotHanzo! Scheduler: + Added disconnecting during break, thanks Osama! + Added waiting until rewarp point is reached, thanks Osama! + Added ability to reset scheduler after disabling the macro, thanks Osama! + Added reset button, thanks Osama! Jacob's Contest failsafe: = Fixed reconnect bug, thanks Osama! Lower Average BPS: = Added stopping randomization --- gradle.properties | 2 +- .../jelly/farmhelperv2/failsafe/impl/LowerAvgBpsFailsafe.java | 4 ++-- .../java/com/jelly/farmhelperv2/remote/WebsocketHandler.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index c16061f1..5e59f8cc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,4 +5,4 @@ mcVersion=1.8.9 modid=farmhelperv2 modName=FarmHelper version=2.8.4-pre1 -shouldRelease=false +shouldRelease=true diff --git a/src/main/java/com/jelly/farmhelperv2/failsafe/impl/LowerAvgBpsFailsafe.java b/src/main/java/com/jelly/farmhelperv2/failsafe/impl/LowerAvgBpsFailsafe.java index 09548d44..d8cd2f23 100644 --- a/src/main/java/com/jelly/farmhelperv2/failsafe/impl/LowerAvgBpsFailsafe.java +++ b/src/main/java/com/jelly/farmhelperv2/failsafe/impl/LowerAvgBpsFailsafe.java @@ -68,7 +68,7 @@ public void onTickDetection(TickEvent.ClientTickEvent event) { || currentBPS >= FarmHelperConfig.minBpsThreshold; if (shouldReset) { - if (clock.isScheduled() || lowerBPSState != LowerBPSState.NONE) { + if (clock.isScheduled() || lowerBPSState == LowerBPSState.WAIT_BEFORE_START) { resetStates(); // LogUtils.sendDebug("LowerAvgBpsFailsafe: Reset states. Current BPS: " + currentBPS); } @@ -76,7 +76,7 @@ public void onTickDetection(TickEvent.ClientTickEvent event) { } if (!clock.isScheduled()) { - clock.schedule(5000L); + clock.schedule(4500L + Math.random() * 1000L); // LogUtils.sendDebug("LowerAvgBpsFailsafe: BPS below threshold. Current: " + currentBPS + ", Threshold: " + FarmHelperConfig.minBpsThreshold); } else if (clock.passed()) { // LogUtils.sendDebug("LowerAvgBpsFailsafe: Failsafe triggered. Current BPS: " + currentBPS); diff --git a/src/main/java/com/jelly/farmhelperv2/remote/WebsocketHandler.java b/src/main/java/com/jelly/farmhelperv2/remote/WebsocketHandler.java index 0aad176b..cabf11ca 100644 --- a/src/main/java/com/jelly/farmhelperv2/remote/WebsocketHandler.java +++ b/src/main/java/com/jelly/farmhelperv2/remote/WebsocketHandler.java @@ -96,7 +96,7 @@ public void onTick(TickEvent.ClientTickEvent event) { LogUtils.sendNotification("Farm Helper", "Farm Helper JDA Dependency is not installed, disabling remote control.."); } return; - } else if (!FarmHelper.isJDAVersionCorrect) { + } else if (!FarmHelper.isJDAVersionCorrect && FarmHelperConfig.enableRemoteControl) { FarmHelperConfig.enableRemoteControl = false; LogUtils.sendError("[Remote Control] Farm Helper JDA Dependency is outdated! Please update it and try again. Disabling remote control..."); LogUtils.sendNotification("Farm Helper", "Farm Helper JDA Dependency is outdated! Please update it and try again. Disabling remote control...");