Package net.storm.api.entities
Interface ITileItems
- All Superinterfaces:
EntityProvider<ITileItem>,SceneEntityProvider<ITileItem>,TileEntityProvider<ITileItem>
Provides access to all ground items (tile items) in the loaded scene.
This interface extends TileEntityProvider to provide ground item-specific
querying capabilities. Ground items are items that have been dropped on the ground
or spawned by the game, and are visible on specific tiles in the game world.
Ground items can include:
- Items dropped by players
- Items dropped by NPCs upon death
- Static item spawns placed by the game
- Items from various game mechanics (e.g., bird nests falling from trees)
The provider maintains a cache that is updated when items spawn or despawn, allowing efficient queries for ground items at specific locations or matching certain criteria.
Example usage:
ITileItems tileItems = Static.getTileItems();
// Find the nearest valuable item
ITileItem bones = tileItems.getNearest("Bones");
// Get all items at a specific tile
List<ITileItem> items = tileItems.getAt(tile, item -> true);
// Find items within 5 tiles
List<ITileItem> nearby = tileItems.getSurrounding(myLocation, 5, item -> true);
// Get items in a specific area
List<ITileItem> areaItems = tileItems.getIn(bankArea, "Coins");
- See Also:
-
Method Summary
Methods inherited from interface net.storm.api.entities.SceneEntityProvider
getAll, getAll, getAll, getNearest, getNearest, getNearest, getNearest, getNearest, getNearestMethods inherited from interface net.storm.api.entities.TileEntityProvider
getAll, getAt, getAt, getAt, getAt, getAt, getAt, getFirstAt, getFirstAt, getFirstAt, getFirstAt, getFirstAt, getFirstAt, getFirstIn, getFirstIn, getFirstIn, getFirstIn, getFirstSurrounding, getFirstSurrounding, getFirstSurrounding, getFirstSurrounding, getFirstSurrounding, getFirstSurrounding, getIn, getIn, getIn, getNearestIn, getNearestIn, getNearestIn, getSurrounding, getSurrounding, getSurrounding, getSurrounding, getSurrounding, getSurrounding