Package net.eternalclient.api.accessors
Class GroundItems
- java.lang.Object
-
- net.eternalclient.api.accessors.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.
-
-
-
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 GroundItemsskipPlaneCheck
- 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 GroundItemsskipPlaneCheck
- 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 GroundItemspositionable
- 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 GroundItemspositionable
- the Positionable object to find closest GameObject fromskipPlaneCheck
- 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 findpositionable
- 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 findpositionable
- the Positionable object to find closest GameObject fromskipPlaneCheck
- 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 findskipPlaneCheck
- 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 forskipPlaneCheck
- 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 findpositionable
- 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 findpositionable
- the Positionable object to find closest GameObject fromskipPlaneCheck
- true to skip the plane check, false otherwise- Returns:
- the closest GroundItem with the specified id to the given Positionable object
-
-