From b6fec0afbe6b3555e8544ff6dd1792ea3ed21d03 Mon Sep 17 00:00:00 2001 From: Kevin <92656833+kevinthegreat1@users.noreply.github.com> Date: Sat, 6 Jul 2024 16:31:18 +0800 Subject: Refactor retry bit shift --- src/main/java/de/hysky/skyblocker/utils/Utils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/de/hysky/skyblocker/utils/Utils.java b/src/main/java/de/hysky/skyblocker/utils/Utils.java index 9ebd8bbb..0b18ed9d 100644 --- a/src/main/java/de/hysky/skyblocker/utils/Utils.java +++ b/src/main/java/de/hysky/skyblocker/utils/Utils.java @@ -505,7 +505,7 @@ public class Utils { }).exceptionally(throwable -> { LOGGER.error("[Skyblocker] Failed to get mayor status!", throwable.getCause()); if (mayorTickRetryAttempts < 5) { - int minutes = 5 * (mayorTickRetryAttempts == 0 ? 1 : 2 << mayorTickRetryAttempts - 1); //5, 10, 20, 40, 80 minutes + int minutes = 5 * 1 << mayorTickRetryAttempts; //5, 10, 20, 40, 80 minutes mayorTickRetryAttempts++; LOGGER.warn("[Skyblocker] Retrying in {} minutes.", minutes); Scheduler.INSTANCE.schedule(Utils::tickMayorCache, minutes * 60 * 20); -- cgit