Class RegionTile

  • All Implemented Interfaces:
    Positionable, Tile

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

      • RegionTile

        public RegionTile​(int x,
                          int y,
                          int plane,
                          int regionId)
    • Method Detail

      • fromWorld

        public static RegionTile fromWorld​(int x,
                                           int y)
      • fromWorld

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

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

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

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

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

        public int getBaseX()
      • getBaseY

        public int getBaseY()
      • derivePlane

        public RegionTile derivePlane​(int dp)
      • derive

        public RegionTile derive​(int dx,
                                 int dy,
                                 int dp)
      • toClosestLocalInstance

        public RegionTile 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 RegionTile 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<RegionTile> 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<RegionTile> 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