From 052867893cbc7f71c82e680df86d7590af5c5c40 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sat, 13 Apr 2024 07:31:17 -0400 Subject: [PATCH] Bugfix in delay override --- src/engine/loot/WorkOrder.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/engine/loot/WorkOrder.java b/src/engine/loot/WorkOrder.java index 6bd7bf53..d1b0903f 100644 --- a/src/engine/loot/WorkOrder.java +++ b/src/engine/loot/WorkOrder.java @@ -11,7 +11,6 @@ package engine.loot; import engine.mbEnums; import engine.objects.Item; import engine.objects.NPC; -import org.jetbrains.annotations.NotNull; import java.time.Duration; import java.time.Instant; @@ -22,8 +21,6 @@ import java.util.HashMap; import java.util.concurrent.Delayed; import java.util.concurrent.TimeUnit; -import static java.lang.Math.toIntExact; - public class WorkOrder implements Delayed { public int workOrderID; @@ -57,8 +54,8 @@ public class WorkOrder implements Delayed { } @Override - public int compareTo(@NotNull Delayed o) { - return toIntExact(this.completionTime - ((WorkOrder) o).completionTime); + public int compareTo(Delayed o) { + return Long.compare(this.completionTime, ((WorkOrder) o).completionTime); } public String toString() {