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() {