Package org.rspeer.game.web
Class Web
- java.lang.Object
-
- org.rspeer.game.web.Web
-
public class Web extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Web.WebSettingChange
-
Constructor Summary
Constructors Constructor Description Web()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addSettingsListener(Consumer<Web.WebSettingChange> change)
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
disableExperimental()
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
enableExperimental()
static 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
pathBetween(SceneNode start, Area end)
static WebPath
pathTo(SceneNode node)
Requests a path from the web server.static WebPath
pathTo(Area area)
static void
resetSettings()
static void
setDebug(boolean debug)
static void
setHouseProfile(HouseProfile houseProfile)
static void
setSetting(Setting setting, boolean val)
static void
setSetting(Setting setting, int val)
-
-
-
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)
-
enableExperimental
public static void enableExperimental()
-
disableExperimental
public static void disableExperimental()
-
disableWilderness
public static void disableWilderness()
-
enableWilderness
public static void enableWilderness()
-
setSetting
public static void setSetting(Setting setting, boolean val)
-
setSetting
public static void setSetting(Setting setting, int val)
-
addSettingsListener
public static void addSettingsListener(Consumer<Web.WebSettingChange> change)
-
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)
-
-