Skip to content

Commit

Permalink
Update GPS.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen3H committed Nov 14, 2023
1 parent d16a85b commit 707927b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/io/github/emcw/map/api/GPS.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@

import com.github.jafarlihi.eemit.EventEmitter;
import io.github.emcw.map.entities.Town;
import org.jetbrains.annotations.NotNull;

import java.util.Map;
import java.util.Objects;
import java.util.Optional;

import static io.github.emcw.utils.Funcs.collectEntities;
import static io.github.emcw.utils.GsonUtil.streamValues;
Expand Down Expand Up @@ -66,10 +65,11 @@ public Route findRoute(Location loc, RouteType route) {
return !PVP && !capitalIsPublic;
}));

return new Route(null, 0, "");
String direction = cardinalDirection(new Location(), new Location());
return new Route(null, 0, direction);
}

static String cardinalDirection(Location origin, Location destination) {
static @NotNull String cardinalDirection(Location origin, Location destination) {
int deltaX = origin.getX() - destination.getX();
int deltaZ = origin.getZ() - destination.getZ();

Expand Down

0 comments on commit 707927b

Please sign in to comment.