TransportNetwork

public final class TransportNetwork extends Record

Nodes joined by two-way links. Flights search the graph when requested; nothing is precomputed.

Constructors

Link copied to clipboard
public void TransportNetwork(String id, String world, String transportEntity, double speed, double acceleration, int countdown, Map<String, TransportNode> nodes)

Functions

Link copied to clipboard
public static TransportNetwork load(String id, ConfigurationSection yaml, Consumer<String> warn)
Link copied to clipboard
public List<TransportNode> path(String from, String to)
A* over straight distances between nodes.
Link copied to clipboard
public List<TransportNode> reachableDestinations(String from)
Destinations reachable from a node, nearest first.
Link copied to clipboard
public TransportRoute route(String from, String to)
The flight between two nodes as an ordinary route, so journeys need no network-specific code.

Inherited functions

Link copied to clipboard
public abstract boolean equals(Object p)
Link copied to clipboard
public abstract int hashCode()
Link copied to clipboard
public abstract String toString()