Class DangerousTile


  • public class DangerousTile
    extends java.lang.Object
    Represents a dangerous area in the game world with configurable damage and reaction radii. Used for pathfinding algorithms to calculate safe paths around hazardous tiles.
    • Constructor Summary

      Constructors 
      Constructor Description
      DangerousTile​(net.runelite.api.coords.LocalPoint point)
      Creates a blocking tile (with no damage/reaction area) at the specified local point
      DangerousTile​(net.runelite.api.coords.LocalPoint point, int damageRadius, int reactRadius)
      Creates a dangerous tile with specified damage and reaction radii
      DangerousTile​(net.runelite.api.coords.WorldPoint point)
      Creates a blocking tile (with no damage/reaction area) at the specified world point
      DangerousTile​(net.runelite.api.coords.WorldPoint point, int damageRadius, int reactRadius)
      Creates a dangerous tile with specified damage and reaction radii
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static double distanceTo​(net.runelite.api.coords.LocalPoint a, net.runelite.api.coords.LocalPoint b)
      Calculates the Euclidean distance between two local points
      boolean equals​(java.lang.Object obj)
      Checks if this dangerous tile equals another object
      int getDamageRadius()
      Gets the damage radius of this dangerous tile
      net.runelite.api.coords.WorldPoint getPoint()
      Gets the world point location of this dangerous tile
      int getReactRadius()
      Gets the reaction radius of this dangerous tile
      int hashCode()
      Computes a hash code for this dangerous tile
      boolean isWithinDamageRadius​(net.runelite.api.coords.WorldPoint other)
      Checks if a world point is within the damage radius of this dangerous tile
      boolean isWithinReactRadius​(net.runelite.api.coords.WorldPoint other)
      Checks if a world point is within the reaction radius of this dangerous tile
      boolean isWithinReactRadius​(net.runelite.api.coords.WorldPoint other, int extraRadius)
      Checks if a world point is within the reaction radius plus an additional buffer
      java.lang.String toString()
      Gets a string representation of this dangerous tile
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DangerousTile

        public DangerousTile​(net.runelite.api.coords.WorldPoint point,
                             int damageRadius,
                             int reactRadius)
        Creates a dangerous tile with specified damage and reaction radii
        Parameters:
        point - The world point location of the danger
        damageRadius - The radius (in tiles) where damage occurs
        reactRadius - The radius (in tiles) where the player should react
        Throws:
        java.lang.IllegalArgumentException - if point is null or radii are negative
      • DangerousTile

        public DangerousTile​(net.runelite.api.coords.LocalPoint point,
                             int damageRadius,
                             int reactRadius)
        Creates a dangerous tile with specified damage and reaction radii
        Parameters:
        point - The local point location of the danger
        damageRadius - The radius (in tiles) where damage occurs
        reactRadius - The radius (in tiles) where the player should react
        Throws:
        java.lang.IllegalArgumentException - if point is null or radii are negative
      • DangerousTile

        public DangerousTile​(net.runelite.api.coords.WorldPoint point)
        Creates a blocking tile (with no damage/reaction area) at the specified world point
        Parameters:
        point - The world point location to block
        Throws:
        java.lang.IllegalArgumentException - if point is null
      • DangerousTile

        public DangerousTile​(net.runelite.api.coords.LocalPoint point)
        Creates a blocking tile (with no damage/reaction area) at the specified local point
        Parameters:
        point - The local point location to block
        Throws:
        java.lang.IllegalArgumentException - if point is null
    • Method Detail

      • getPoint

        public net.runelite.api.coords.WorldPoint getPoint()
        Gets the world point location of this dangerous tile
        Returns:
        The world point of this dangerous tile
      • getDamageRadius

        public int getDamageRadius()
        Gets the damage radius of this dangerous tile
        Returns:
        The radius (in tiles) where damage occurs
      • getReactRadius

        public int getReactRadius()
        Gets the reaction radius of this dangerous tile
        Returns:
        The radius (in tiles) where the player should react
      • distanceTo

        public static double distanceTo​(net.runelite.api.coords.LocalPoint a,
                                        net.runelite.api.coords.LocalPoint b)
        Calculates the Euclidean distance between two local points
        Parameters:
        a - The first local point
        b - The second local point
        Returns:
        The distance between the two points
      • isWithinDamageRadius

        public boolean isWithinDamageRadius​(net.runelite.api.coords.WorldPoint other)
        Checks if a world point is within the damage radius of this dangerous tile
        Parameters:
        other - The world point to check
        Returns:
        true if the point is within the damage radius
      • isWithinReactRadius

        public boolean isWithinReactRadius​(net.runelite.api.coords.WorldPoint other)
        Checks if a world point is within the reaction radius of this dangerous tile
        Parameters:
        other - The world point to check
        Returns:
        true if the point is within the reaction radius
      • isWithinReactRadius

        public boolean isWithinReactRadius​(net.runelite.api.coords.WorldPoint other,
                                           int extraRadius)
        Checks if a world point is within the reaction radius plus an additional buffer
        Parameters:
        other - The world point to check
        extraRadius - Additional radius to add to the reaction radius
        Returns:
        true if the point is within the expanded reaction radius
      • toString

        public java.lang.String toString()
        Gets a string representation of this dangerous tile
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string with position and radius information
      • equals

        public boolean equals​(java.lang.Object obj)
        Checks if this dangerous tile equals another object
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - The object to compare with
        Returns:
        true if the objects are equal
      • hashCode

        public int hashCode()
        Computes a hash code for this dangerous tile
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A hash code value