Browse Source

Bugfix in delay override

combat-2
MagicBot 9 months ago
parent
commit
052867893c
  1. 7
      src/engine/loot/WorkOrder.java

7
src/engine/loot/WorkOrder.java

@ -11,7 +11,6 @@ package engine.loot;
import engine.mbEnums; import engine.mbEnums;
import engine.objects.Item; import engine.objects.Item;
import engine.objects.NPC; import engine.objects.NPC;
import org.jetbrains.annotations.NotNull;
import java.time.Duration; import java.time.Duration;
import java.time.Instant; import java.time.Instant;
@ -22,8 +21,6 @@ import java.util.HashMap;
import java.util.concurrent.Delayed; import java.util.concurrent.Delayed;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import static java.lang.Math.toIntExact;
public class WorkOrder implements Delayed { public class WorkOrder implements Delayed {
public int workOrderID; public int workOrderID;
@ -57,8 +54,8 @@ public class WorkOrder implements Delayed {
} }
@Override @Override
public int compareTo(@NotNull Delayed o) { public int compareTo(Delayed o) {
return toIntExact(this.completionTime - ((WorkOrder) o).completionTime); return Long.compare(this.completionTime, ((WorkOrder) o).completionTime);
} }
public String toString() { public String toString() {

Loading…
Cancel
Save