tModLoader v2025.03
A mod to make and play Terraria mods
All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
TileDrawInfo Class Reference

Contains info about a tile to be drawn. Tiles aren't necessarily drawn using the Tile.TileFrameX and Tile.TileFrameY values directly. The values contained are a result of changes made by various ModTile methods (ModTile.SetDrawPositions(int, int, ref int, ref int, ref int, ref short, ref short), ModTile.AnimateTile(ref int, ref int), ModTile.AnimateIndividualTile(int, int, int, ref int, ref int), ModTile.SetSpriteEffects(int, int, ref SpriteEffects), and finally ModTile.DrawEffects(int, int, SpriteBatch, ref Terraria.DataStructures.TileDrawInfo)). More...

Public Attributes

int addFrX
 An additional offset to tileFrameY corresponding to the animation of the tile. Defaults to modTile.AnimationFrameHeight * Main.tileFrame[type] (which itself is set in ModTile.AnimateTile(ref int, ref int)) and further changed by the frameXOffset parameter of ModTile.AnimateIndividualTile(int, int, int, ref int, ref int).
 
int addFrY
 An additional offset to tileFrameX corresponding to the animation of the tile. Defaults to 0 and further changed by the frameXOffset parameter of ModTile.AnimateIndividualTile(int, int, int, ref int, ref int).
 
Vector3[] colorSlices = new Vector3[9]
 
Color colorTint
 
Texture2D drawTexture
 
Color finalColor
 
Color glowColor
 
Rectangle glowSourceRect
 
Texture2D glowTexture
 
int halfBrickHeight
 
Tile tileCache
 The Tile to be drawn
 
short tileFrameX
 The X value for the frame of this tile to be drawn. Derived from Tile.TileFrameX and further changed by the tileFrameX parameter of ModTile.SetDrawPositions(int, int, ref int, ref int, ref int, ref short, ref short)
 
short tileFrameY
 The Y value for the frame of this tile to be drawn. Derived from Tile.TileFrameY and further changed by the tileFrameY parameter of ModTile.SetDrawPositions(int, int, ref int, ref int, ref int, ref short, ref short)
 
int tileHeight
 The height for the frame of this tile to be drawn. Derived from ObjectData.TileObjectData.CoordinateHeights and further changed by the height parameter of ModTile.SetDrawPositions(int, int, ref int, ref int, ref int, ref short, ref short).
 
Color tileLight
 
SpriteEffects tileSpriteEffect
 If the tile should be drawn flipped or not. Defaults to SpriteEffects.None and changed by the spriteEffects parameter of ModTile.SetSpriteEffects(int, int, ref SpriteEffects).
 
int tileTop
 Offsets the drawing of the tile vertically. Derived from ObjectData.TileObjectData.DrawYOffset and further changed by the offsetY parameter of ModTile.SetDrawPositions(int, int, ref int, ref int, ref int, ref short, ref short).
 
int tileWidth
 The width for the frame of this tile to be drawn. Derived from ObjectData.TileObjectData.CoordinateWidth and further changed by the width parameter of ModTile.SetDrawPositions(int, int, ref int, ref int, ref int, ref short, ref short).
 
ushort typeCache
 The Tile.TileType of this tile
 

Detailed Description

Contains info about a tile to be drawn. Tiles aren't necessarily drawn using the Tile.TileFrameX and Tile.TileFrameY values directly.

The values contained are a result of changes made by various ModTile methods (ModTile.SetDrawPositions(int, int, ref int, ref int, ref int, ref short, ref short), ModTile.AnimateTile(ref int, ref int), ModTile.AnimateIndividualTile(int, int, int, ref int, ref int), ModTile.SetSpriteEffects(int, int, ref SpriteEffects), and finally ModTile.DrawEffects(int, int, SpriteBatch, ref Terraria.DataStructures.TileDrawInfo)).