tModLoader v2025.10
A mod to make and play Terraria mods
LegacyPlayerRenderer Class Reference

Inherits IPlayerRenderer.

Public Member Functions

void DrawPlayer (Camera camera, Player drawPlayer, Vector2 position, float rotation, Vector2 rotationOrigin, float shadow=0f, float scale=1f)
 Draws a player fully.

When using this method for an armor set shadow effect, make sure shadow is never 0 so that only the main body renders with the item and other visual effects that are intended to only be drawn on the main body. A shadow value of 0 is fully opaque, while a value of 1 is fully transparent.

When using this method outside of the game world, such as in a UI, setting Player.isDisplayDollOrInanimate to true will avoid world lighting values affecting how the player is drawn. More...
 
void DrawPlayerHead (Camera camera, Player drawPlayer, Vector2 position, float alpha=1f, float scale=1f, Color borderColor=default(Color))
 
void DrawPlayers (Camera camera, IEnumerable< Player > players)
 
void DrawPlayer (Camera camera, Player drawPlayer, Vector2 position, float rotation, Vector2 rotationOrigin, float shadow=0f, float scale=1f)
 Draws a player fully.

When using this method for an armor set shadow effect, make sure shadow is never 0 so that only the main body renders with the item and other visual effects that are intended to only be drawn on the main body. A shadow value of 0 is fully opaque, while a value of 1 is fully transparent.

When using this method outside of the game world, such as in a UI, setting Player.isDisplayDollOrInanimate to true will avoid world lighting values affecting how the player is drawn. More...
 
void DrawPlayerHead (Camera camera, Player drawPlayer, Vector2 position, float alpha=1f, float scale=1f, Color borderColor=default(Color))
 
void DrawPlayers (Camera camera, IEnumerable< Player > players)
 

Properties

static SamplerState MountedSamplerState [get]
 

Member Function Documentation

◆ DrawPlayer()

void LegacyPlayerRenderer.DrawPlayer ( Camera  camera,
Player  drawPlayer,
Vector2  position,
float  rotation,
Vector2  rotationOrigin,
float  shadow = 0f,
float  scale = 1f 
)

Draws a player fully.

When using this method for an armor set shadow effect, make sure shadow is never 0 so that only the main body renders with the item and other visual effects that are intended to only be drawn on the main body. A shadow value of 0 is fully opaque, while a value of 1 is fully transparent.

When using this method outside of the game world, such as in a UI, setting Player.isDisplayDollOrInanimate to true will avoid world lighting values affecting how the player is drawn.

Implements IPlayerRenderer.

◆ DrawPlayerHead()

void LegacyPlayerRenderer.DrawPlayerHead ( Camera  camera,
Player  drawPlayer,
Vector2  position,
float  alpha = 1f,
float  scale = 1f,
Color  borderColor = default(Color) 
)

Implements IPlayerRenderer.

◆ DrawPlayers()

void LegacyPlayerRenderer.DrawPlayers ( Camera  camera,
IEnumerable< Player players 
)

Implements IPlayerRenderer.