Class Tile

java.lang.Object
com.epicbot.api.shared.model.Tile
All Implemented Interfaces:
Actionable, Clickable, Interactable, Locatable, Renderable, Validatable

public class Tile extends Object implements Locatable, Interactable, Validatable
  • Field Details

  • Constructor Details

    • Tile

      public Tile(int x, int y)
    • Tile

      public Tile(int x, int y, int plane)
  • Method Details

    • isBlocked

      public static boolean isBlocked(int flag)
    • isValid

      public boolean isValid()
      Description copied from interface: Validatable
      Verifies whether this entity is valid and still exists.
      Specified by:
      isValid in interface Validatable
      Returns:
      true if it's still valid, false otherwise
    • getX

      public int getX()
      Description copied from interface: Locatable
      Gets the x-coordinate.
      Specified by:
      getX in interface Locatable
      Returns:
      int
    • getY

      public int getY()
      Description copied from interface: Locatable
      Gets the y-coordinate.
      Specified by:
      getY in interface Locatable
      Returns:
      int
    • getPlane

      public int getPlane()
      Description copied from interface: Locatable
      Gets the z-coordinate, also known as the floor or level.
      Specified by:
      getPlane in interface Locatable
      Returns:
      int
    • getLocation

      public Tile getLocation()
      Description copied from interface: Locatable
      Gets the tile that this entity is located on in the world.
      Specified by:
      getLocation in interface Locatable
      Returns:
      Tile
    • getSceneOffset

      public SceneOffset getSceneOffset()
      Description copied from interface: Locatable
      Gets the scene offset for this entity.
      Specified by:
      getSceneOffset in interface Locatable
      Returns:
      SceneOffset
    • isVisible

      public boolean isVisible()
      Description copied from interface: Renderable
      Gets if this entity is visible on screen.
      Specified by:
      isVisible in interface Renderable
      Returns:
      true if visible, false otherwise
    • click

      public boolean click(boolean rightClick)
      Description copied from interface: Clickable
      Click on the entity.
      Specified by:
      click in interface Clickable
      Parameters:
      rightClick - true to use the right mouse button to click
      Returns:
      true if the click succeeded, false otherwise
    • interact

      public boolean interact(String action)
      Description copied from interface: Interactable
      Interacts with the entity.
      Specified by:
      interact in interface Interactable
      Parameters:
      action - the action to select
      Returns:
      true if the interaction succeeded, false otherwise
    • interact

      public boolean interact(String action, String option)
      Description copied from interface: Interactable
      Interacts with the entity.
      Specified by:
      interact in interface Interactable
      Parameters:
      action - the action to select (e.g. Bank)
      option - the option to select (e.g. Bank booth)
      Returns:
      true if the interaction succeeded, false otherwise
    • hover

      public boolean hover()
      Description copied from interface: Clickable
      Hover on the entity.
      Specified by:
      hover in interface Clickable
      Returns:
      true if the hover succeeded, false otherwise
    • getCentralPoint

      public Point getCentralPoint()
      Description copied from interface: Renderable
      Gets the central point within the entity calculated using only visible model points.
      Specified by:
      getCentralPoint in interface Renderable
      Returns:
      Point
      See Also:
    • getRealCentralPoint

      public Point getRealCentralPoint()
      Description copied from interface: Renderable
      Gets the central point within the entity calculated using visible and non-visible model points.
      Specified by:
      getRealCentralPoint in interface Renderable
      Returns:
      Point
      See Also:
    • getRandomPoint

      public Point getRandomPoint()
      Description copied from interface: Renderable
      Get a random point within the entity.
      Specified by:
      getRandomPoint in interface Renderable
      Returns:
      Point
    • getPoint

      public Point getPoint(double x, double y, int plane)
    • getClickBounds

      public Polygon getClickBounds()
    • getBounds

      public Polygon getBounds()
    • contains

      public boolean contains(Point point)
      Description copied from interface: Renderable
      Determines if this entity contains the given point.
      Specified by:
      contains in interface Renderable
      Parameters:
      point - the point
      Returns:
      true if this entity contains the point, false otherwise
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • getActions

      public List<String> getActions()
      Description copied from interface: Actionable
      Gets the available actions.
      Specified by:
      getActions in interface Actionable
      Returns:
      list of actions
    • hasAction

      public boolean hasAction(String... actions)
      Description copied from interface: Actionable
      Determines if this entity has one of the given actions.
      Specified by:
      hasAction in interface Actionable
      Parameters:
      actions - one or multiple actions
      Returns:
      true if it has one of the given actions, false otherwise