Interface ITileObjects

All Superinterfaces:
EntityProvider<ITileObject>, SceneEntityProvider<ITileObject>, TileEntityProvider<ITileObject>

public interface ITileObjects extends TileEntityProvider<ITileObject>
Provides access to all tile objects in the loaded scene.

This interface extends TileEntityProvider to provide tile object-specific querying capabilities. Tile objects are static objects placed on tiles in the game world, and include various types of game objects.

Tile objects encompass several categories:

  • Game Objects - Interactive objects like trees, rocks, doors, and furnaces
  • Wall Objects - Walls, fences, and boundary objects
  • Ground Objects - Floor decorations and ground-level objects
  • Decorative Objects - Visual decorations attached to walls or tiles

The provider maintains a cache that is updated when objects spawn, despawn, or change. Large game objects that span multiple tiles are accessible from any tile they occupy.

Example usage:

 
 ITileObjects tileObjects = Static.getTileObjects();

 // Find the nearest bank booth
 ITileObject booth = tileObjects.getNearest("Bank booth");

 // Get all trees in the area
 List<ITileObject> trees = tileObjects.getAll("Tree", "Oak tree", "Willow tree");

 // Find objects at a specific location
 ITileObject door = tileObjects.getFirstAt(worldPoint, "Door");

 // Get all objects within a radius
 List<ITileObject> nearby = tileObjects.getSurrounding(myLocation, 10, obj -> true);

 // Search within a defined area
 List<ITileObject> ores = tileObjects.getIn(miningArea, "Rocks");
 
 

See Also: