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 classWeb.WebSettingChange
-
Constructor Summary
Constructors Constructor Description Web()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddSettingsListener(Consumer<Web.WebSettingChange> change)static voidclearCachedPath()static <T> TclosestTo(SceneNode target, Function<T,Position> function, T... candidates)static PositionclosestTo(SceneNode target, SceneNode... candidates)static voidconnect(io.netty.channel.EventLoopGroup bootstrap)static voiddebug(Object ctx, String msg)static voiddisableExperimental()static voiddisableWilderness()static doubledistance(SceneNode position)Requests a distance to the position from the web serverstatic doubledistance(SceneNode start, SceneNode end)Requests a distance between two positions from the web serverstatic voidenableExperimental()static voidenableWilderness()static WebPathgetCachedPath()static HouseProfilegetHouseProfile()static booleanisWildernessEnabled()static WebPathpathBetween(SceneNode start, SceneNode end)Requests a path from the web server Does not cache the resultstatic WebPathpathBetween(SceneNode start, Area end)static WebPathpathTo(SceneNode node)Requests a path from the web server.static WebPathpathTo(Area area)static voidresetSettings()static voidsetDebug(boolean debug)static voidsetHouseProfile(HouseProfile houseProfile)static voidsetSetting(Setting setting, boolean val)static voidsetSetting(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)
-
-