tModLoader v2024.11
A mod to make and play Terraria mods
TileEntitiesManager Class Reference

Public Member Functions

bool CheckValidTile (int id, int x, int y)
 
IReadOnlyDictionary< int, TileEntityEnumerateEntities ()
 
TileEntity GenerateInstance (int id)
 
TileEntity GetTileEntity< T > (int id)
 Gets the template TileEntity object with the given id (not the new instance which gets added to the world as the game is played). This method will throw exceptions on failure. More...
 
void NetPlaceEntity (int id, int x, int y)
 
void Register (TileEntity entity)
 
void RegisterAll ()
 
bool TryGetTileEntity< T > (int id, out T tileEntity)
 Attempts to get the template TileEntity object with the given id (not the new instance which gets added to the world as the game is played). More...
 

Static Public Attributes

static int VanillaTypeCount
 

Member Function Documentation

◆ GetTileEntity< T >()

TileEntity TileEntitiesManager.GetTileEntity< T > ( int  id)

Gets the template TileEntity object with the given id (not the new instance which gets added to the world as the game is played). This method will throw exceptions on failure.

Exceptions
KeyNotFoundException
Type Constraints
T :TileEntity 
T :_types 
T :id 
T :as 
T :T 

◆ TryGetTileEntity< T >()

bool TileEntitiesManager.TryGetTileEntity< T > ( int  id,
out T  tileEntity 
)

Attempts to get the template TileEntity object with the given id (not the new instance which gets added to the world as the game is played).

Type Constraints
T :TileEntity