Class MovementPackets


  • public class MovementPackets
    extends java.lang.Object
    Utility class for creating and queuing movement packets.
    • Constructor Summary

      Constructors 
      Constructor Description
      MovementPackets()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static RSPacketBufferNode createMovementViewport​(int worldPointX, int worldPointY, boolean ctrlDown)
      Creates a movement viewport packet buffer node.
      static void sendMovementViewport​(int worldX, int worldY)
      Sends the movement viewport coordinates to the server.
      static void sendMovementViewport​(int worldPointX, int worldPointY, boolean ctrlDown)
      Sends the movement viewport data based on the given world point coordinates and control key status.
      static void sendMovementViewport​(Positionable tile)
      Sends the movement viewport for the specified tile coordinates.
      static void sendMovementViewport​(Positionable tile, boolean ctrlDown)
      Sends a movement viewport with the specified tile and whether the control key is down.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MovementPackets

        public MovementPackets()
    • Method Detail

      • sendMovementViewport

        public static void sendMovementViewport​(int worldX,
                                                int worldY)
        Sends the movement viewport coordinates to the server.
        Parameters:
        worldX - X-coordinate of the movement viewport
        worldY - Y-coordinate of the movement viewport
      • sendMovementViewport

        public static void sendMovementViewport​(int worldPointX,
                                                int worldPointY,
                                                boolean ctrlDown)
        Sends the movement viewport data based on the given world point coordinates and control key status.
        Parameters:
        worldPointX - the x-coordinate of the world point
        worldPointY - the y-coordinate of the world point
        ctrlDown - true if the control key is pressed, false otherwise
      • sendMovementViewport

        public static void sendMovementViewport​(Positionable tile)
        Sends the movement viewport for the specified tile coordinates.
        Parameters:
        tile - the tile to send the movement viewport for
      • sendMovementViewport

        public static void sendMovementViewport​(Positionable tile,
                                                boolean ctrlDown)
        Sends a movement viewport with the specified tile and whether the control key is down.
        Parameters:
        tile - the tile to send the movement viewport for
        ctrlDown - true if the control key is down, false otherwise
      • createMovementViewport

        public static RSPacketBufferNode createMovementViewport​(int worldPointX,
                                                                int worldPointY,
                                                                boolean ctrlDown)
        Creates a movement viewport packet buffer node.
        Parameters:
        worldPointX - The x-coordinate of the world point.
        worldPointY - The y-coordinate of the world point.
        ctrlDown - True if the control key is held down, false otherwise.
        Returns:
        The created RSPacketBufferNode object.