Package org.rspeer.game.web
Class Web
- java.lang.Object
-
- org.rspeer.game.web.Web
-
public class Web extends Object
-
-
Constructor Summary
Constructors Constructor Description Web()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
clearCachedPath()
static <T> T
closestTo(SceneNode target, Function<T,Position> function, T... candidates)
static Position
closestTo(SceneNode target, SceneNode... candidates)
static void
connect(io.netty.channel.EventLoopGroup bootstrap)
static void
debug(Object ctx, String msg)
static void
disableWilderness()
static double
distance(SceneNode position)
Requests a distance to the position from the web serverstatic double
distance(SceneNode start, SceneNode end)
Requests a distance between two positions from the web serverstatic void
enableWilderness()
static WebPath
getCachedPath()
static HouseProfile
getHouseProfile()
static boolean
isWildernessEnabled()
static WebPath
pathBetween(SceneNode start, SceneNode end)
Requests a path from the web server Does not cache the resultstatic WebPath
pathTo(SceneNode node)
Requests a path from the web server.static void
resetSettings()
static void
setDebug(boolean debug)
static void
setHouseProfile(HouseProfile houseProfile)
-
-
-
Method Detail
-
resetSettings
public static void resetSettings()
-
connect
public static void connect(io.netty.channel.EventLoopGroup bootstrap)
-
pathTo
public static WebPath pathTo(SceneNode node)
Requests a path from the web server. Caches and recalculates based on the destination- Parameters:
node
- - the destination- Returns:
- path to the destination
-
pathBetween
public static WebPath pathBetween(SceneNode start, SceneNode end)
Requests a path from the web server Does not cache the result- Parameters:
start
- - the start positionend
- - the end position- Returns:
- path from start to end
-
distance
public static double distance(SceneNode position)
Requests a distance to the position from the web server- Parameters:
position
- - the position- Returns:
- the distance to the position
-
distance
public static double distance(SceneNode start, SceneNode end)
Requests a distance between two positions from the web server- Parameters:
start
- - the start positionend
- - the end position- Returns:
- the distance between the two positions
-
closestTo
public static <T> T closestTo(SceneNode target, Function<T,Position> function, T... candidates)
-
setDebug
public static void setDebug(boolean debug)
-
disableWilderness
public static void disableWilderness()
-
enableWilderness
public static void enableWilderness()
-
isWildernessEnabled
public static boolean isWildernessEnabled()
-
getCachedPath
public static WebPath getCachedPath()
-
clearCachedPath
public static void clearCachedPath()
-
getHouseProfile
public static HouseProfile getHouseProfile()
-
setHouseProfile
public static void setHouseProfile(HouseProfile houseProfile)
-
-