Class GroundItems


  • public class GroundItems
    extends java.lang.Object
    This class provides utility methods for retrieving and manipulating ground items.
    • Constructor Summary

      Constructors 
      Constructor Description
      GroundItems()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<GroundItem> all()
      Retrieves all ground items.
      static java.util.List<GroundItem> all​(boolean skipPlaneCheck)
      Returns a list of all GroundItems in the cache, optionally skipping the plane check.
      static java.util.List<GroundItem> all​(java.util.function.Predicate<GroundItem> predicate)
      Returns a list of all GroundItems that satisfy the given predicate.
      static java.util.List<GroundItem> all​(java.util.function.Predicate<GroundItem> predicate, boolean skipPlaneCheck)
      Returns a list of all GroundItems that satisfy the given predicate, optionally skipping the plane check.
      static GroundItem closest​(int ID)
      Returns the closest GroundItem object with the specified ID.
      static GroundItem closest​(int ID, boolean skipPlaneCheck)
      Returns the closest GroundItem with the given ID, optionally skipping the plane check.
      static GroundItem closest​(int id, Positionable positionable)
      Finds the closest GroundItem with the specified id to the given Positionable object.
      static GroundItem closest​(int id, Positionable positionable, boolean skipPlaneCheck)
      Finds the closest GroundItem with the specified id to the given Positionable object, optionally skipping the plane check.
      static GroundItem closest​(java.lang.String name)
      Returns the closest GroundItem object with the specified name.
      static GroundItem closest​(java.lang.String name, boolean skipPlaneCheck)
      Returns the closest GroundItem object with the specified name, optionally skipping plane check.
      static GroundItem closest​(java.lang.String name, Positionable positionable)
      Finds the closest GroundItem with the specified name to the given Positionable object.
      static GroundItem closest​(java.lang.String name, Positionable positionable, boolean skipPlaneCheck)
      Finds the closest GroundItem with the specified name to the given Positionable object, optionally skipping the plane check.
      static GroundItem closest​(java.util.function.Predicate<GroundItem> predicate)
      Returns the closest GroundItem that satisfies the given predicate.
      static GroundItem closest​(java.util.function.Predicate<GroundItem> predicate, boolean skipPlaneCheck)
      Finds the closest GroundItem that matches the given Predicate and skips plane check if specified.
      static GroundItem closest​(java.util.function.Predicate<GroundItem> predicate, Positionable positionable)
      Finds the closest GroundItem to the given Positionable object that matches the given Predicate.
      static GroundItem closest​(java.util.function.Predicate<GroundItem> predicate, Positionable positionable, boolean skipPlaneCheck)
      Finds the closest GroundItem to the given Positionable object that matches the given Predicate, optionally skipping the plane check.
      • Methods inherited from class java.lang.Object

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

      • GroundItems

        public GroundItems()
    • Method Detail

      • all

        public static java.util.List<GroundItem> all()
        Retrieves all ground items.
        Returns:
        a list of ground items
      • all

        public static java.util.List<GroundItem> all​(boolean skipPlaneCheck)
        Returns a list of all GroundItems in the cache, optionally skipping the plane check.
        Parameters:
        skipPlaneCheck - true to skip the plane check, false otherwise.
        Returns:
        a list of all GroundItems.
      • all

        public static java.util.List<GroundItem> all​(java.util.function.Predicate<GroundItem> predicate)
        Returns a list of all GroundItems that satisfy the given predicate.
        Parameters:
        predicate - the predicate used to filter the GroundItems
        Returns:
        a list of GroundItems that satisfy the predicate
      • all

        public static java.util.List<GroundItem> all​(java.util.function.Predicate<GroundItem> predicate,
                                                     boolean skipPlaneCheck)
        Returns a list of all GroundItems that satisfy the given predicate, optionally skipping the plane check.
        Parameters:
        predicate - a predicate to filter the GroundItems
        skipPlaneCheck - true to skip the plane check, false otherwise
        Returns:
        a list of GroundItems that satisfy the predicate
      • closest

        public static GroundItem closest​(java.util.function.Predicate<GroundItem> predicate)
        Returns the closest GroundItem that satisfies the given predicate.
        Parameters:
        predicate - the predicate to test GroundItems against
        Returns:
        the closest GroundItem that satisfies the predicate, or null if no such GroundItem exists
      • closest

        public static GroundItem closest​(java.util.function.Predicate<GroundItem> predicate,
                                         boolean skipPlaneCheck)
        Finds the closest GroundItem that matches the given Predicate and skips plane check if specified.
        Parameters:
        predicate - the Predicate used to filter GroundItems
        skipPlaneCheck - whether to skip the plane check
        Returns:
        the closest GroundItem matching the Predicate, or null if no match is found
      • closest

        public static GroundItem closest​(java.util.function.Predicate<GroundItem> predicate,
                                         Positionable positionable)
        Finds the closest GroundItem to the given Positionable object that matches the given Predicate.
        Parameters:
        predicate - the Predicate used to filter GroundItems
        positionable - the Positionable object to find closest GameObject from
        Returns:
        the closest GroundItem with the specified id to the given Positionable object
      • closest

        public static GroundItem closest​(java.util.function.Predicate<GroundItem> predicate,
                                         Positionable positionable,
                                         boolean skipPlaneCheck)
        Finds the closest GroundItem to the given Positionable object that matches the given Predicate, optionally skipping the plane check.
        Parameters:
        predicate - the Predicate used to filter GroundItems
        positionable - the Positionable object to find closest GameObject from
        skipPlaneCheck - true to skip the plane check, false otherwise
        Returns:
        the closest GroundItem with the specified id to the given Positionable object
      • closest

        public static GroundItem closest​(java.lang.String name)
        Returns the closest GroundItem object with the specified name.
        Parameters:
        name - the name of the GroundItem to search for
        Returns:
        the closest GroundItem object matching the specified name
      • closest

        public static GroundItem closest​(java.lang.String name,
                                         Positionable positionable)
        Finds the closest GroundItem with the specified name to the given Positionable object.
        Parameters:
        name - the name of the GameObject to find
        positionable - the Positionable object to find closest GameObject from
        Returns:
        the closest GroundItem with the specified id to the given Positionable object
      • closest

        public static GroundItem closest​(java.lang.String name,
                                         Positionable positionable,
                                         boolean skipPlaneCheck)
        Finds the closest GroundItem with the specified name to the given Positionable object, optionally skipping the plane check.
        Parameters:
        name - the name of the GameObject to find
        positionable - the Positionable object to find closest GameObject from
        skipPlaneCheck - true to skip the plane check, false otherwise
        Returns:
        the closest GroundItem with the specified id to the given Positionable object
      • closest

        public static GroundItem closest​(java.lang.String name,
                                         boolean skipPlaneCheck)
        Returns the closest GroundItem object with the specified name, optionally skipping plane check.
        Parameters:
        name - the name of the GroundItem to find
        skipPlaneCheck - if true, skips the plane check while searching
        Returns:
        the closest GroundItem object with the specified name
      • closest

        public static GroundItem closest​(int ID)
        Returns the closest GroundItem object with the specified ID.
        Parameters:
        ID - the ID of the GroundItem to search for
        Returns:
        the closest GroundItem object with the specified ID, or null if no match is found
      • closest

        public static GroundItem closest​(int ID,
                                         boolean skipPlaneCheck)
        Returns the closest GroundItem with the given ID, optionally skipping the plane check.
        Parameters:
        ID - the ID of the GroundItem to search for
        skipPlaneCheck - true to skip the plane check, false otherwise
        Returns:
        the closest GroundItem with the given ID
      • closest

        public static GroundItem closest​(int id,
                                         Positionable positionable)
        Finds the closest GroundItem with the specified id to the given Positionable object.
        Parameters:
        id - the id of the GameObject to find
        positionable - the Positionable object to find closest GameObject from
        Returns:
        the closest GroundItem with the specified id to the given Positionable object
      • closest

        public static GroundItem closest​(int id,
                                         Positionable positionable,
                                         boolean skipPlaneCheck)
        Finds the closest GroundItem with the specified id to the given Positionable object, optionally skipping the plane check.
        Parameters:
        id - the id of the GameObject to find
        positionable - the Positionable object to find closest GameObject from
        skipPlaneCheck - true to skip the plane check, false otherwise
        Returns:
        the closest GroundItem with the specified id to the given Positionable object