Class WorldTile

  • All Implemented Interfaces:
    Positionable, Tile

    public final class WorldTile
    extends java.lang.Object
    implements Tile
    • Constructor Detail

      • WorldTile

        public WorldTile​(int x,
                         int y,
                         int plane)
      • WorldTile

        public WorldTile​(int x,
                         int y)
    • Method Detail

      • fromLocal

        public static WorldTile fromLocal​(int x,
                                          int y)
      • fromLocal

        public static WorldTile fromLocal​(int x,
                                          int y,
                                          int plane)
      • fromLocal

        public static WorldTile fromLocal​(int x,
                                          int y,
                                          int plane,
                                          RSWorldView worldView)
      • fromScene

        public static WorldTile fromScene​(int x,
                                          int y)
      • fromScene

        public static WorldTile fromScene​(int x,
                                          int y,
                                          int plane)
      • fromScene

        public static WorldTile fromScene​(int x,
                                          int y,
                                          int plane,
                                          RSWorldView worldView)
      • fromRegion

        public static WorldTile fromRegion​(int x,
                                           int y,
                                           int plane,
                                           int regionId)
      • fromCoord

        public static WorldTile fromCoord​(int packed)
        Creates a WorldTile from a packed Jagex Coordinate
      • deriveX

        public WorldTile deriveX​(int dx)
      • deriveY

        public WorldTile deriveY​(int dy)
      • derivePlane

        public WorldTile derivePlane​(int dp)
      • derive

        public WorldTile derive​(int dx,
                                int dy,
                                int dp)
      • deriveRotation

        public WorldTile deriveRotation​(int rotation)
      • toClosestLocalInstance

        public WorldTile toClosestLocalInstance()
        Get the closest occurrence of a tile on the scene, accounting for instances.
        Returns:
        The closest occurrence of the tile on the scene or null if the tile is not on the scene
      • toClosestLocalInstance

        public WorldTile toClosestLocalInstance​(RSWorldView wv)
        Get the closest occurrence of a tile on the scene, accounting for instances.
        Parameters:
        wv - The world view to use
        Returns:
        The closest occurrence of the tile on the scene or null if the tile is not on the scene
      • toLocalInstance

        public java.util.Collection<WorldTile> toLocalInstance()
        Get occurrences of a tile on the scene, accounting for instances. There may be more than one if the same template chunk occurs more than once on the scene.
      • toLocalInstance

        public java.util.Collection<WorldTile> toLocalInstance​(RSWorldView wv)
        Get occurrences of a tile on the scene, accounting for instances. There may be more than one if the same template chunk occurs more than once on the scene.
      • getX

        public int getX()
      • getY

        public int getY()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object