Class PointDestination


  • public class PointDestination
    extends Destination
    A bare canvas coordinate with a small tolerance around it.

    Used when a caller already knows exactly where it wants to click, and for the idle behaviours that move the cursor somewhere unremarkable. The radius exists so that even an explicit point is not clicked pixel-identically twice.

    • Constructor Detail

      • PointDestination

        public PointDestination​(int x,
                                int y)
      • PointDestination

        public PointDestination​(net.runelite.api.Point point)
      • PointDestination

        public PointDestination​(int x,
                                int y,
                                int radius,
                                java.lang.String label)
    • Method Detail

      • shape

        public java.awt.Shape shape()
        Description copied from class: Destination
        The raw clickable outline in canvas pixels, or null when the target has no projection at all.

        This is unclipped on purpose. The client projects actors and objects that are behind or beside the camera to coordinates far outside the canvas rather than returning null, so a non-null shape here is not a claim that anything is on screen. Use Destination.visibleShape() for that.

        Specified by:
        shape in class Destination
      • describe

        public java.lang.String describe()
        Description copied from class: Destination
        A short label for logging and the overlay.
        Specified by:
        describe in class Destination
      • cameraCanHelp

        public boolean cameraCanHelp()
        Description copied from class: Destination
        Whether the camera can plausibly fix this destination at all. A dropped item four hundred tiles away needs walking, not rotating, and the backend should not spin the camera pointlessly before giving up.
        Overrides:
        cameraCanHelp in class Destination
      • needsCamera

        public boolean needsCamera()
        Description copied from class: Destination
        Whether reaching this destination needs the camera moved first. Targets that are simply off screen answer true; fixed screen furniture such as an inventory slot never does.
        Overrides:
        needsCamera in class Destination