tModLoader v2025.08
A mod to make and play Terraria mods
TileObjectPreviewData Class Reference

Public Member Functions

void AllInvalid ()
 
void CopyFrom (TileObjectPreviewData copy)
 
void Reset ()
 

Static Public Attributes

const int InvalidSpot = 2
 
const int None = 0
 
static TileObjectPreviewData placementCache
 
static TileObjectPreviewData randomCache
 
const int ValidSpot = 1
 

Properties

bool Active [get, set]
 
int Alternate [get, set]
 
Point16 Coordinates [get, set]
 The top left tile coordinate of this preview. Not necessarily the top left of the tile itself since the dimensions of this object also include space for the anchors of the selected placement style. Add ObjectStart to get the top left tile. this[int, int]
 
Point16 ObjectStart [get, set]
 
int Random [get, set]
 
Point16 Size [get, set]
 
short Style [get, set]
 
int this[int x, int y] [get, set]
 The placement validity data. Values of 0 are ignored, 1 means the tile or anchor at the tile coordinate offset by Coordinates is valid, and 2 means it is invalid.
 
ushort Type [get, set]