Uses of Record Class
dev.twilite.game.common.Coord
Packages that use Coord
Package
Description
-
Uses of Coord in dev.twilite.game.common
Methods in dev.twilite.game.common that return CoordModifier and TypeMethodDescriptionRect.center()Returns the center coordinate of this area, rounded down for even dimensions.Converts this fine coordinate to an absolute world tile coordinate.Converts this map-local coordinate to an absolute world coordinate.Rect.coord()Returns the southwest/base coordinate of this area.Coord.dx(int x) Returns a coordinate offset on the x axis.Coord.dy(int y) Returns a coordinate offset on the y axis.static CoordCoord.fromFine(World world, Coord.Fine fine) Converts a fine coordinate into an absolute world coordinate.static CoordConverts a map-local coordinate into an absolute world coordinate.static CoordCoord.fromPacked(int packed) Decodes a packed RuneScape coordinate.static CoordCoord.fromRegion(int regionId, int regionX, int regionY, int floor) Creates an absolute world tile coordinate from a region id and region-local x/y offsets.Rect.random()Returns a random coordinate contained by this area.Coord.toInstance()Converts this template coordinate to its matching loaded instance coordinate.static CoordWorldTemplateSpace.toInstance(Coord coord) Converts a template coordinate to its matching loaded instance coordinate.Coord.toTemplate()Converts this loaded instance coordinate to its source template coordinate.static CoordWorldTemplateSpace.toTemplate(Coord coord) Converts a loaded instance coordinate to its source template coordinate.Coord.translate(int x, int y) Returns a coordinate offset by the supplied x/y deltas.Methods in dev.twilite.game.common that return types with arguments of type CoordModifier and TypeMethodDescriptionRect.border()Returns every border tile coordinate contained by this area.Rect.coords()Returns every tile coordinate contained by this area.Rect.corners()Returns the corner coordinates of this area.Coord.directPathTo(Coord coord) Returns the direct greedy/dumb walk path from this coordinate to another coordinate in the currently loaded world.Coord.directPathTo(Rect rect) Returns the direct greedy/dumb walk path from this coordinate to an area in the currently loaded world.Coord.directPathTo(Unit unit) Returns the direct greedy/dumb walk path from this coordinate to a unit in the currently loaded world.Rect.directPathTo(Coord coord) Returns the direct greedy/dumb walk path from this area to a coordinate in the currently loaded world.Rect.directPathTo(Rect rect) Returns the direct greedy/dumb walk path from this area to another area in the currently loaded world.Rect.directPathTo(Unit unit) Returns the direct greedy/dumb walk path from this area to a unit in the currently loaded world.Coord.neighbors(boolean cardinal) Returns neighboring coordinates on the same floor.Rect.surrounding()Returns the coordinates immediately surrounding this area.Rect.surrounding(int radius) Returns the coordinates around this area at the supplied radius.Methods in dev.twilite.game.common with parameters of type CoordModifier and TypeMethodDescriptionbooleanCasts a spell on an NPC, walking tofallbackif the NPC is not available.booleanInteractionScope.castSpellOnNpc(Spell spell, Function<NpcView, Optional<Npc>> query, Coord fallback, boolean skipReachableCheck) Casts a spell on an NPC with optional local reachability checks.booleanInteractionScope.castSpellOnObject(Spell spell, Function<SceneObjectView, Optional<SceneObject>> query, Coord fallback) Casts a spell on an object, walking tofallbackif the object is not available.booleanInteractionScope.castSpellOnObject(Spell spell, Function<SceneObjectView, Optional<SceneObject>> query, Coord fallback, boolean skipReachableCheck) Casts a spell on an object with optional local reachability checks.booleanInteractionScope.castSpellOnPlayer(Spell spell, Function<PlayerView, Optional<Player>> query, Coord fallback) Casts a spell on a player, walking tofallbackif the player is not available.booleanInteractionScope.castSpellOnPlayer(Spell spell, Function<PlayerView, Optional<Player>> query, Coord fallback, boolean skipReachableCheck) Casts a spell on a player with optional local reachability checks.booleanInteractionScope.castSpellOnTileItem(Spell spell, Function<TileItemView, Optional<TileItem>> query, Coord fallback) Casts a spell on a ground item, walking tofallbackif the item is not available.booleanInteractionScope.castSpellOnTileItem(Spell spell, Function<TileItemView, Optional<TileItem>> query, Coord fallback, boolean skipReachableCheck) Casts a spell on a ground item with optional local reachability checks.booleanReturns whether this area contains the coordinate.Coord.directPathTo(Coord coord) Returns the direct greedy/dumb walk path from this coordinate to another coordinate in the currently loaded world.Rect.directPathTo(Coord coord) Returns the direct greedy/dumb walk path from this area to a coordinate in the currently loaded world.intCoord.distanceTo(Coord coord) Returns Chebyshev tile distance to another coordinate.intRect.distanceTo(Coord coord) Returns Chebyshev tile distance from this area to a coordinate.static RectCreates an area starting atcoord.booleanCoord.lineOfSightTo(Coord coord) Returns whether line of sight is clear from this coordinate to another coordinate in the currently loaded world.booleanRect.lineOfSightTo(Coord coord) Returns whether line of sight is clear from this area to a coordinate in the currently loaded world.booleanCoord.lineOfWalkTo(Coord coord) Returns whether a direct line of walk is clear from this coordinate to another coordinate in the currently loaded world.booleanRect.lineOfWalkTo(Coord coord) Returns whether a direct line of walk is clear from this area to a coordinate in the currently loaded world.intCoord.manhattanDistanceTo(Coord coord) Returns Manhattan/taxicab tile distance to another coordinate.intRect.manhattanDistanceTo(Coord coord) Returns Manhattan/taxicab tile distance from this area to a coordinate.booleanInteracts with an NPC, walking tofallbackif the NPC is not available.booleanInteractionScope.npc(Function<NpcView, Optional<Npc>> query, Coord fallback, String op, boolean skipReachableCheck) Interacts with an NPC using optional local reachability checks.booleanInteractionScope.npc(Function<NpcView, Optional<Npc>> query, Coord fallback, String op, boolean skipReachableCheck, int distance) Interacts with an NPC using optional reachability checks and a custom walk distance.booleanInteractionScope.object(Function<SceneObjectView, Optional<SceneObject>> query, Coord fallback, String op) Interacts with an object, walking tofallbackif the object is not available.booleanInteractionScope.object(Function<SceneObjectView, Optional<SceneObject>> query, Coord fallback, String op, boolean skipReachableCheck) Interacts with an object using optional local reachability checks.booleanInteractionScope.object(Function<SceneObjectView, Optional<SceneObject>> query, Coord fallback, String op, boolean skipReachableCheck, int distance) Interacts with an object using optional reachability checks and a custom walk distance.booleanPicks up the nearest matching ground item tofallback.booleanPicks up the nearest matching ground item with optional local reachability checks.booleanInteractionScope.pickUp(int item, Function<TileItemView, Optional<TileItem>> query, Coord fallback, boolean skipReachableCheck) Picks up a ground item selected from this scope's tile-item view.booleanInteracts with a player, walking tofallbackif the player is not available.booleanInteractionScope.player(Function<PlayerView, Optional<Player>> query, Coord fallback, String op, boolean skipReachableCheck) Interacts with a player using optional local reachability checks.booleanInteractionScope.player(Function<PlayerView, Optional<Player>> query, Coord fallback, String op, boolean skipReachableCheck, int distance) Interacts with a player using optional reachability checks and a custom walk distance.booleanInteractionScope.talkTo(Function<NpcView, Optional<Npc>> query, Coord fallback, boolean skipReachableCheck, String... dialog) Selects matching dialogue or talks to an NPC with optional local reachability checks.booleanSelects matching dialogue or talks to an NPC, walking tofallbackif the NPC is not available.booleanInteractionScope.tileItem(Function<TileItemView, Optional<TileItem>> query, Coord fallback, String op) Interacts with a ground item, walking tofallbackif the item is not available.booleanInteractionScope.tileItem(Function<TileItemView, Optional<TileItem>> query, Coord fallback, String op, boolean skipReachableCheck) Interacts with a ground item using optional local reachability checks.booleanInteractionScope.tileItem(Function<TileItemView, Optional<TileItem>> query, Coord fallback, String op, boolean skipReachableCheck, int distance) Interacts with a ground item using optional reachability checks and a custom walk distance.static CoordWorldTemplateSpace.toInstance(Coord coord) Converts a template coordinate to its matching loaded instance coordinate.static CoordWorldTemplateSpace.toTemplate(Coord coord) Converts a loaded instance coordinate to its source template coordinate.booleanUses an inventory item on an NPC, walking tofallbackif the NPC is not available.booleanInteractionScope.useItemOnNpc(int item, Function<NpcView, Optional<Npc>> query, Coord fallback, boolean skipReachableCheck) Uses an inventory item on an NPC with optional local reachability checks.booleanInteractionScope.useItemOnObject(int item, Function<SceneObjectView, Optional<SceneObject>> query, Coord fallback) Uses an inventory item on an object, walking tofallbackif the object is not available.booleanInteractionScope.useItemOnObject(int item, Function<SceneObjectView, Optional<SceneObject>> query, Coord fallback, boolean skipReachableCheck) Uses an inventory item on an object with optional local reachability checks.booleanInteractionScope.useItemOnPlayer(int item, Function<PlayerView, Optional<Player>> query, Coord fallback) Uses an inventory item on a player, walking tofallbackif the player is not available.booleanInteractionScope.useItemOnPlayer(int item, Function<PlayerView, Optional<Player>> query, Coord fallback, boolean skipReachableCheck) Uses an inventory item on a player with optional local reachability checks.Method parameters in dev.twilite.game.common with type arguments of type CoordModifier and TypeMethodDescriptionbooleanReturns whether this area contains all of the supplied coordinates.booleanReturns whether this area contains any of the supplied coordinates.Rect.transform(UnaryOperator<Coord> transform) Transforms all coords in a rect and returns the transformed rectConstructors in dev.twilite.game.common with parameters of type Coord -
Uses of Coord in dev.twilite.game.facade
Methods in dev.twilite.game.facade that return CoordModifier and TypeMethodDescriptionstatic CoordAvatar.coord()Returns the local player's coordinate, or(-1, -1, 0)when unavailable.BankLocation.coord()Methods in dev.twilite.game.facade with parameters of type CoordModifier and TypeMethodDescriptionstatic intAvatar.distanceTo(Coord coord) Returns Chebyshev distance from the local player to a coordinate, orInteger.MAX_VALUEwhen unavailable.static booleanAvatar.lineOfSightTo(Coord coord) Returns whether the local player has line of sight to a coordinate.static booleanAvatar.lineOfWalkTo(Coord coord) Returns whether the local player has line of walk to a coordinate.static intAvatar.manhattanDistanceTo(Coord coord) Returns Manhattan distance from the local player to a coordinate, orInteger.MAX_VALUEwhen unavailable.static Optional<BankLocation> Returns the nearest unlocked withdrawable bank location by flat x/y tile distance.static intHud.wildernessLevel(Coord coord) Returns the Wilderness level at a coordinate, or0outside the Wilderness. -
Uses of Coord in dev.twilite.game.simulation
Methods in dev.twilite.game.simulation with parameters of type CoordModifier and TypeMethodDescriptionRuns the simulation fromstartand returns the best reachable movement candidate.default booleanSimulationTask.step(I input, SimulationGrid grid, Coord from, Coord to, int tick) Decides whether expansion may traverse the edge fromfromtotoontick. -
Uses of Coord in dev.twilite.game.simulation.model
Methods in dev.twilite.game.simulation.model that return CoordModifier and TypeMethodDescriptionSimulationResult.firstStep()Returns the value of thefirstSteprecord component.SimulationNode.parent()Returns the previous coordinate on the path to this candidate.SimulationNode.position()Returns this candidate's coordinate in the simulation grid.SimulationGrid.start()Returns the coordinate the current simulation run started from.SimulationResult.start()Returns the value of thestartrecord component.Methods in dev.twilite.game.simulation.model that return types with arguments of type CoordModifier and TypeMethodDescriptionSimulationGrid.neighbours(Coord position) Returns adjacent coordinates for a position using this grid's diagonal movement setting.SimulationResult.path()Returns the value of thepathrecord component.Methods in dev.twilite.game.simulation.model with parameters of type CoordModifier and TypeMethodDescriptionbooleanReturns whether a coordinate is inside the grid bounds.booleanReturns whether a coordinate is inside the configured grid bounds.SimulationGrid.neighbours(Coord position) Returns adjacent coordinates for a position using this grid's diagonal movement setting.Returns mutable state for a coordinate in the grid.voidConstructors in dev.twilite.game.simulation.model with parameters of type CoordModifierConstructorDescriptionSimulationGrid(SimulationOptions options, Coord start) SimulationNode(Coord position) SimulationResult(Coord start, SimulationNode destination, Coord firstStep, List<Coord> path, SimulationTimeline timeline) Creates an instance of aSimulationResultrecord class.Constructor parameters in dev.twilite.game.simulation.model with type arguments of type CoordModifierConstructorDescriptionSimulationResult(Coord start, SimulationNode destination, Coord firstStep, List<Coord> path, SimulationTimeline timeline) Creates an instance of aSimulationResultrecord class. -
Uses of Coord in dev.twilite.game.simulation.model.threat
Methods in dev.twilite.game.simulation.model.threat that return CoordModifier and TypeMethodDescriptionSimulationMovingThreat.Builder.position()Returns the value of thepositionrecord component.SimulationMovingThreat.position()Returns the value of thepositionrecord component.SimulationThreat.Builder.position()Returns the value of thepositionrecord component.SimulationThreat.position()Returns the value of thepositionrecord component.Methods in dev.twilite.game.simulation.model.threat with parameters of type CoordModifier and TypeMethodDescriptionStarts a builder for a moving threat.static SimulationThreat.BuilderStarts a builder for a coordinate threat.static SimulationThreatCreates a one-tick coordinate threat that is not tied to a specific source id.static SimulationThreatSimulationThreat.at(Coord position, int startTick, int duration, int radius, int penalty, boolean avoid) Creates a coordinate threat that is not tied to a specific source id.static SimulationThreatSimulationThreat.at(SimulationThreatKind kind, int id, Coord position, int startTick, int radius, int penalty, boolean avoid) Creates a one-tick coordinate threat with an explicit source kind and id.static SimulationThreatSimulationThreat.at(SimulationThreatKind kind, int id, Coord position, int startTick, int duration, int radius, int penalty, boolean avoid) Creates a coordinate threat with an explicit source kind and id.static SimulationThreatCreates a one-tick coordinate threat that should be avoided as a final destination.static SimulationThreatCreates a coordinate threat that should be avoided as a final destination.Returns a copy at a new position.static SimulationMovingThreatCreates a moving threat with an explicit source id.static SimulationMovingThreatCreates a moving threat that is not tied to a specific source id.static SimulationMovingThreatSimulationMovingThreat.movingAvoid(Coord position, int radius, int penalty) Creates a moving threat that should be avoided as a final destination.Constructors in dev.twilite.game.simulation.model.threat with parameters of type CoordModifierConstructorDescriptionCreates an instance of aBuilderrecord class.Builder(SimulationThreatKind kind, int id, Coord position, int startTick, int duration, int radius, int penalty) Creates an instance of aBuilderrecord class.SimulationMovingThreat(int id, Coord position, int radius, int penalty, boolean avoid) Creates an instance of aSimulationMovingThreatrecord class.SimulationThreat(SimulationThreatKind kind, int id, Coord position, int startTick, int duration, int radius, int penalty, boolean avoid) Creates an instance of aSimulationThreatrecord class. -
Uses of Coord in dev.twilite.game.simulation.rules.blocking
Method parameters in dev.twilite.game.simulation.rules.blocking with type arguments of type CoordModifier and TypeMethodDescriptionstatic <I> SimulationTask<I> Blocked.coordinates(Function<I, ? extends Collection<Coord>> coordinates) Blocks static coordinates before path expansion. -
Uses of Coord in dev.twilite.game.simulation.rules.threat
Method parameters in dev.twilite.game.simulation.rules.threat with type arguments of type CoordModifier and TypeMethodDescriptionMovingThreats.Builder.stepWith(BiFunction<Coord, Coord, Coord> stepper) Builds a moving threat task with the supplied movement stepper.MovingThreats.Builder.stepWith(BiFunction<Coord, Coord, Coord> stepper) Builds a moving threat task with the supplied movement stepper.MovingThreats.Builder.stepWith(BiFunction<Coord, Coord, Coord> stepper) Builds a moving threat task with the supplied movement stepper. -
Uses of Coord in dev.twilite.game.stream
Methods in dev.twilite.game.stream with parameters of type CoordModifier and TypeMethodDescriptionReturns the nearest unit to the coordinate.Filters to units whose occupied area contains any of the coordinates.Filters to units within Chebyshev distance of a coordinate. -
Uses of Coord in dev.twilite.game.trait
Methods in dev.twilite.game.trait that return CoordMethods in dev.twilite.game.trait that return types with arguments of type CoordModifier and TypeMethodDescriptionUnit.directPathTo(Coord coord) Returns the direct greedy/dumb walk path from this unit to a coordinate in the currently loaded world.Unit.directPathTo(Rect rect) Returns the direct greedy/dumb walk path from this unit to an area in the currently loaded world.Unit.directPathTo(Unit unit) Returns the direct greedy/dumb walk path from this unit to another unit in the currently loaded world.Methods in dev.twilite.game.trait with parameters of type CoordModifier and TypeMethodDescriptionUnit.directPathTo(Coord coord) Returns the direct greedy/dumb walk path from this unit to a coordinate in the currently loaded world.default intUnit.distanceTo(Coord coord) Returns Chebyshev tile distance from this unit's occupied area to a coordinate.default booleanUnit.lineOfSightTo(Coord coord) Returns whether line of sight is clear from this unit to a coordinate in the currently loaded world.default booleanUnit.lineOfWalkTo(Coord coord) Returns whether a direct line of walk is clear from this unit to a coordinate in the currently loaded world.default intUnit.manhattanDistanceTo(Coord coord) Returns Manhattan/taxicab tile distance from this unit's occupied area to a coordinate. -
Uses of Coord in dev.twilite.game.wrapper
Methods in dev.twilite.game.wrapper that return CoordModifier and TypeMethodDescriptionActor.coord()Effect.coord()HintArrow.coord()Projectile.coord()SceneObject.coord()TileItem.coord()WorldEntity.coord()World.origin()Returns the absolute origin of this loaded world area.Projectile.originCoord()Returns the projectile origin coordinate from its origin fields.WorldEntity.projectCoord(Coord.Fine fine) Projects a fine coordinate from this entity's child world to the root world.WorldEntity.projectCoord(Coord.Fine fine, boolean definition) Projects a fine coordinate from this entity's child world to the root world.WorldEntity.projectCoord(Coord.Fine fine, World childWorld) Projects a fine coordinate from the supplied child world to the root world.Projectile.targetCoord()Returns the projectile target coordinate from its target fields.Methods in dev.twilite.game.wrapper that return types with arguments of type CoordModifier and TypeMethodDescriptionSceneObject.approach()Returns coords from which this object can be interacted with.Methods in dev.twilite.game.wrapper with parameters of type CoordModifier and TypeMethodDescriptionvoidWorld.directWalk(Coord coord) Sets the next walk target to the supplied world coordinate.