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

Contains the Texture2D assets used by the game, each stored as an Asset<Texture2D>. Note that the vanilla entries in Item, Npc, Projectile, Gore, Wall, Tile, ItemFlame, Background, and all of the player equipment and hair related fields are not necessarily loaded. Use the Main.LoadItem(int) or similar methods before attempting to use those texture assets. Modded content in these arrays are always preloaded during mod loading. For example, the following code could be used to access the Acorn item texture asset. More...

Classes

class  RenderTargets
 

Static Public Attributes

static Asset< Texture2D >[] AccBack = new Asset<Texture2D>[ArmorIDs.Back.Count]
 
static Asset< Texture2D >[] AccBalloon = new Asset<Texture2D>[ArmorIDs.Balloon.Count]
 
static Asset< Texture2D >[] AccBeard = new Asset<Texture2D>[ArmorIDs.Beard.Count]
 
static Asset< Texture2D >[] AccFace = new Asset<Texture2D>[ArmorIDs.Face.Count]
 
static Asset< Texture2D >[] AccFront = new Asset<Texture2D>[ArmorIDs.Front.Count]
 
static Asset< Texture2D >[] AccHandsOff = new Asset<Texture2D>[ArmorIDs.HandOff.Count]
 
static Asset< Texture2D >[] AccHandsOffComposite = new Asset<Texture2D>[ArmorIDs.HandOff.Count]
 
static Asset< Texture2D >[] AccHandsOn = new Asset<Texture2D>[ArmorIDs.HandOn.Count]
 
static Asset< Texture2D >[] AccHandsOnComposite = new Asset<Texture2D>[ArmorIDs.HandOn.Count]
 
static Asset< Texture2D >[] AccNeck = new Asset<Texture2D>[ArmorIDs.Neck.Count]
 
static Asset< Texture2D >[] AccShield = new Asset<Texture2D>[ArmorIDs.Shield.Count]
 
static Asset< Texture2D >[] AccShoes = new Asset<Texture2D>[ArmorIDs.Shoe.Count]
 
static Asset< Texture2D >[] AccWaist = new Asset<Texture2D>[ArmorIDs.Waist.Count]
 
static Asset< Texture2D > Actuator
 
static Asset< Texture2D > AntLion
 
static Asset< Texture2D >[] ArmorArm = new Asset<Texture2D>[ArmorIDs.Body.Count]
 
static Asset< Texture2D >[] ArmorBody = new Asset<Texture2D>[ArmorIDs.Body.Count]
 
static Asset< Texture2D >[] ArmorBodyComposite = new Asset<Texture2D>[ArmorIDs.Body.Count]
 
static Asset< Texture2D >[] ArmorHead = new Asset<Texture2D>[ArmorIDs.Head.Count]
 
static Asset< Texture2D >[] ArmorLeg = new Asset<Texture2D>[ArmorIDs.Legs.Count]
 
static Asset< Texture2D >[] Background = new Asset<Texture2D>[Main.maxBackgrounds]
 
static Asset< Texture2D >[] BackPack = new Asset<Texture2D>[10]
 
static Asset< Texture2D > BasiliskMount
 
static Asset< Texture2D >[] BeeMount = new Asset<Texture2D>[2]
 
static Asset< Texture2D > Beetle
 
static Asset< Texture2D > BestiaryMenuButton
 
static Asset< Texture2D > BlackTile
 
static Asset< Texture2D >[] blockReplaceIcon = new Asset<Texture2D>[2]
 
static Asset< Texture2D > BoneArm
 
static Asset< Texture2D > BoneArm2
 
static Asset< Texture2D > BoneEyes
 
static Asset< Texture2D > BoneLaser
 
static Asset< Texture2D > Bubble
 
static Asset< Texture2D >[] Buff = new Asset<Texture2D>[BuffID.Count]
 
static Asset< Texture2D > BuilderAcc
 
static Asset< Texture2D > BunnyMount
 
static Asset< Texture2D >[] CageTop = new Asset<Texture2D>[5]
 
static Asset< Texture2D >[] Camera = new Asset<Texture2D>[8]
 
static Asset< Texture2D > Cd
 
static Asset< Texture2D > Chain
 
static Asset< Texture2D > Chain10
 
static Asset< Texture2D > Chain11
 
static Asset< Texture2D > Chain12
 
static Asset< Texture2D > Chain13
 
static Asset< Texture2D > Chain14
 
static Asset< Texture2D > Chain15
 
static Asset< Texture2D > Chain16
 
static Asset< Texture2D > Chain17
 
static Asset< Texture2D > Chain18
 
static Asset< Texture2D > Chain19
 
static Asset< Texture2D > Chain2
 
static Asset< Texture2D > Chain20
 
static Asset< Texture2D > Chain21
 
static Asset< Texture2D > Chain22
 
static Asset< Texture2D > Chain23
 
static Asset< Texture2D > Chain24
 
static Asset< Texture2D > Chain25
 
static Asset< Texture2D > Chain26
 
static Asset< Texture2D > Chain27
 
static Asset< Texture2D > Chain28
 
static Asset< Texture2D > Chain29
 
static Asset< Texture2D > Chain3
 
static Asset< Texture2D > Chain30
 
static Asset< Texture2D > Chain31
 
static Asset< Texture2D > Chain32
 
static Asset< Texture2D > Chain33
 
static Asset< Texture2D > Chain34
 
static Asset< Texture2D > Chain35
 
static Asset< Texture2D > Chain36
 
static Asset< Texture2D > Chain37
 
static Asset< Texture2D > Chain38
 
static Asset< Texture2D > Chain39
 
static Asset< Texture2D > Chain4
 
static Asset< Texture2D > Chain40
 
static Asset< Texture2D > Chain41
 
static Asset< Texture2D > Chain42
 
static Asset< Texture2D > Chain43
 
static Asset< Texture2D > Chain5
 
static Asset< Texture2D > Chain6
 
static Asset< Texture2D > Chain7
 
static Asset< Texture2D > Chain8
 
static Asset< Texture2D > Chain9
 
static Asset< Texture2D >[] Chains = new Asset<Texture2D>[ChainID.Count]
 
static Asset< Texture2D > Chaos
 
static Asset< Texture2D > Chat
 
static Asset< Texture2D > Chat2
 
static Asset< Texture2D > ChatBack
 
static Asset< Texture2D >[] ChestStack = new Asset<Texture2D>[2]
 
static Asset< Texture2D >[] Clothes = new Asset<Texture2D>[6]
 
static Asset< Texture2D > ClothesStyleBack
 
static Asset< Texture2D >[] Cloud = new Asset<Texture2D>[CloudID.Count]
 
static Asset< Texture2D >[] Coin = new Asset<Texture2D>[4]
 
static Asset< Texture2D > ColorBar
 
static Asset< Texture2D > ColorBlip
 
static Asset< Texture2D > ColorHighlight
 
static Asset< Texture2D > ColorSlider
 
static Asset< Texture2D > Confuse
 
static Asset< Texture2D > CraftDownButton
 
static Asset< Texture2D >[] CraftToggle = new Asset<Texture2D>[4]
 
static Asset< Texture2D > CraftUpButton
 
static Asset< Texture2D > CrimsonCactus
 
static Asset< Texture2D > CursorRadial
 
static Asset< Texture2D >[] Cursors = new Asset<Texture2D>[18]
 
static Asset< Texture2D >[] CuteFishronMount = new Asset<Texture2D>[2]
 
static Asset< Texture2D > DesertMinecartMount
 
static Asset< Texture2D >[] Dest = new Asset<Texture2D>[3]
 
static Asset< Texture2D >[] DrillMount = new Asset<Texture2D>[6]
 
static Asset< Texture2D > DukeFishron
 
static Asset< Texture2D > Dust
 
static Asset< Texture2D > EmoteMenuButton
 
static Asset< Texture2D >[] EquipPage = new Asset<Texture2D>[11]
 
static Asset< Texture2D > EvilCactus
 
static Asset< Texture2D >[] Extra = new Asset<Texture2D>[ExtrasID.Count]
 
static Asset< Texture2D > EyeLaser
 
static Asset< Texture2D > EyeLaserSmall
 
static Asset< Texture2D > Fade
 
static Asset< Texture2D >[] FemaleBody = new Asset<Texture2D>[ArmorIDs.Body.Count]
 
static Asset< Texture2D > Firefly
 
static Asset< Texture2D > FireflyJar
 
static Asset< Texture2D > FishingLine
 
static Asset< Texture2D > FishMinecartMount
 
static Asset< Texture2D > Flame
 
static Asset< Texture2D > FlameRing
 
static Asset< Texture2D >[] Flames = new Asset<Texture2D>[18]
 
static Asset< Texture2D > FlyingCarpet
 
static Asset< Texture2D > Frozen
 
static Asset< Texture2D >[] Gem = new Asset<Texture2D>[7]
 
static Asset< Texture2D >[] GemChain = new Asset<Texture2D>[7]
 
static Asset< Texture2D > Ghost
 
static Asset< Texture2D >[] GlowMask = new Asset<Texture2D>[GlowMaskID.Count]
 
static Asset< Texture2D > GlowSnail
 
static Asset< Texture2D >[] Golem = new Asset<Texture2D>[4]
 
static Asset< Texture2D > GolfBallArrow
 
static Asset< Texture2D > GolfBallArrowShadow
 
static Asset< Texture2D > GolfBallOutline
 
static Asset< Texture2D > GolfSwingBarFill
 
static Asset< Texture2D > GolfSwingBarPanel
 
static Asset< Texture2D > GoodCactus
 
static Asset< Texture2D >[] Gore = new Asset<Texture2D>[GoreID.Count]
 
static Asset< Texture2D > Grid
 
static Asset< Texture2D > HairStyleBack
 
static Asset< Texture2D > Hb1
 
static Asset< Texture2D > Hb2
 
static Asset< Texture2D >[] HbLock = new Asset<Texture2D>[2]
 
static Asset< Texture2D > Heart
 
static Asset< Texture2D > Heart2
 
static Asset< Texture2D >[] HighlightMask = new Asset<Texture2D>[TileID.Count]
 
static Asset< Texture2D >[] HotbarRadial = new Asset<Texture2D>[3]
 
static Asset< Texture2D > HouseBanner
 
static Asset< Texture2D > Hue
 
static Asset< Texture2D > IceBarrier
 
static Asset< Texture2D > IceQueen
 
static Asset< Texture2D >[] InfoIcon = new Asset<Texture2D>[14]
 
static Asset< Texture2D > InventoryBack
 
static Asset< Texture2D > InventoryBack10
 
static Asset< Texture2D > InventoryBack11
 
static Asset< Texture2D > InventoryBack12
 
static Asset< Texture2D > InventoryBack13
 
static Asset< Texture2D > InventoryBack14
 
static Asset< Texture2D > InventoryBack15
 
static Asset< Texture2D > InventoryBack16
 
static Asset< Texture2D > InventoryBack17
 
static Asset< Texture2D > InventoryBack18
 
static Asset< Texture2D > InventoryBack19
 
static Asset< Texture2D > InventoryBack2
 
static Asset< Texture2D > InventoryBack3
 
static Asset< Texture2D > InventoryBack4
 
static Asset< Texture2D > InventoryBack5
 
static Asset< Texture2D > InventoryBack6
 
static Asset< Texture2D > InventoryBack7
 
static Asset< Texture2D > InventoryBack8
 
static Asset< Texture2D > InventoryBack9
 
static Asset< Texture2D >[] InventorySort = new Asset<Texture2D>[2]
 
static Asset< Texture2D > InventoryTickOff
 
static Asset< Texture2D > InventoryTickOn
 
static Asset< Texture2D >[] Item = new Asset<Texture2D>[ItemID.Count]
 
static Asset< Texture2D >[] ItemFlame = new Asset<Texture2D>[ItemID.Count]
 
static Asset< Texture2D > JackHat
 
static Asset< Texture2D >[] JellyfishBowl = new Asset<Texture2D>[3]
 
static Asset< Texture2D > LightDisc
 
static Asset< Texture2D > Lightningbug
 
static Asset< Texture2D > LightningbugJar
 
static Asset< Texture2D >[] Liquid = new Asset<Texture2D>[15]
 
static Asset< Texture2D >[] LiquidSlope = new Asset<Texture2D>[15]
 
static Asset< Texture2D > LoadingSunflower
 
static Asset< Texture2D > LockOnCursor
 
static Asset< Texture2D > Logo
 
static Asset< Texture2D > Logo2
 
static Asset< Texture2D > Logo3
 
static Asset< Texture2D > Logo4
 
static Asset< Texture2D > MagicPixel
 
static Asset< Texture2D > Mana
 
static Asset< Texture2D > Map
 
static Asset< Texture2D >[] MapBGs = new Asset<Texture2D>[42]
 
static Asset< Texture2D > MapDeath
 
static Asset< Texture2D >[] MapIcon = new Asset<Texture2D>[9]
 
static Asset< Texture2D > MapPing
 
static Asset< Texture2D >[] MinecartMechMount = new Asset<Texture2D>[2]
 
static Asset< Texture2D > MinecartMount
 
static Asset< Texture2D > MinecartWoodMount
 
static Asset< Texture2D > MiniMinotaur
 
static Asset< Texture2D >[] Moon = new Asset<Texture2D>[9]
 
static Asset< Texture2D > Ninja
 
static Asset< Texture2D >[] Npc = new Asset<Texture2D>[NPCID.Count]
 
static Asset< Texture2D >[] NpcHead = new Asset<Texture2D>[NPCHeadID.Count]
 
static Asset< Texture2D >[] NpcHeadBoss = new Asset<Texture2D>[40]
 
static Asset< Texture2D >[] NpcToggle = new Asset<Texture2D>[2]
 
static Asset< Texture2D > OneDropLogo
 
static Asset< Texture2D > PigronMount
 
static Asset< Texture2D >[] PlayerHair = new Asset<Texture2D>[165]
 
static Asset< Texture2D >[] PlayerHairAlt = new Asset<Texture2D>[165]
 
static Asset< Texture2D >[,] Players
 
static Asset< Texture2D > Probe
 
static Asset< Texture2D >[] Projectile = new Asset<Texture2D>[ProjectileID.Count]
 
static Asset< Texture2D > Pulley
 
static Asset< Texture2D > PumpkingArm
 
static Asset< Texture2D > PumpkingCloak
 
static Asset< Texture2D > PumpkingFace
 
static Asset< Texture2D > PumpkinMoon
 
static Asset< Texture2D >[] Pvp = new Asset<Texture2D>[3]
 
static Asset< Texture2D > QuicksIcon
 
static Asset< Texture2D > Ra
 
static Asset< Texture2D > Rain
 
static Asset< Texture2D > Re
 
static Asset< Texture2D > ReaperEye
 
static Asset< Texture2D >[] Reforge = new Asset<Texture2D>[2]
 
static Asset< Texture2D >[] RudolphMount = new Asset<Texture2D>[3]
 
static Asset< Texture2D > SantaTank
 
static Asset< Texture2D > ScrollLeftButton
 
static Asset< Texture2D > ScrollRightButton
 
static Asset< Texture2D >[] ScutlixMount = new Asset<Texture2D>[3]
 
static Asset< Texture2D > SettingsPanel
 
static Asset< Texture2D > SettingsPanel2
 
static Asset< Texture2D > ShroomCap
 
static Asset< Texture2D > SlimeMount
 
static Asset< Texture2D > SmartDig
 
static Asset< Texture2D > SmileyMoon
 
static Asset< Texture2D > SnowMoon
 
static Asset< Texture2D > SpawnBed
 
static Asset< Texture2D > SpawnPoint
 
static Asset< Texture2D > SpikeBase
 
static Asset< Texture2D > Splash
 
static Asset< Texture2D > SplashTexture16x9
 
static Asset< Texture2D > SplashTexture4x3
 
static Asset< Texture2D > SplashTextureLegoBack
 
static Asset< Texture2D > SplashTextureLegoFront
 
static Asset< Texture2D > SplashTextureLegoResonanace
 
static Asset< Texture2D > SplashTextureLegoTree
 
static Asset< Texture2D >[] Star = new Asset<Texture2D>[4]
 
static Asset< Texture2D > Sun
 
static Asset< Texture2D > Sun2
 
static Asset< Texture2D > Sun3
 
static Asset< Texture2D > SunAltar
 
static Asset< Texture2D > SunOrb
 
static Asset< Texture2D > Team
 
static Asset< Texture2D > TextBack
 
static Asset< Texture2D >[] TextGlyph = new Asset<Texture2D>[1]
 
static Asset< Texture2D >[] Tile = new Asset<Texture2D>[TileID.Count]
 
static Asset< Texture2D > TileCrack
 
static Asset< Texture2D > Timer
 
static Asset< Texture2D > Trash
 
static Asset< Texture2D >[] TreeBranch = new Asset<Texture2D>[32]
 
static Asset< Texture2D > TreeFace
 
static Asset< Texture2D >[] TreeTop = new Asset<Texture2D>[32]
 
static Asset< Texture2D > TurtleMount
 
static Asset< Texture2D >[] UfoMount = new Asset<Texture2D>[2]
 
static Asset< Texture2D >[] Underworld = new Asset<Texture2D>[14]
 
static Asset< Texture2D > UnicornMount
 
static Asset< Texture2D >[] Wall = new Asset<Texture2D>[WallID.Count]
 
static Asset< Texture2D > WallOutline
 
static Asset< Texture2D >[] Wings = new Asset<Texture2D>[ArmorIDs.Wing.Count]
 
static Asset< Texture2D > Wire
 
static Asset< Texture2D > Wire2
 
static Asset< Texture2D > Wire3
 
static Asset< Texture2D > Wire4
 
static Asset< Texture2D > WireNew
 
static Asset< Texture2D >[] WireUi = new Asset<Texture2D>[12]
 
static Asset< Texture2D > Wof
 
static Asset< Texture2D >[] Wood = new Asset<Texture2D>[7]
 
static Asset< Texture2D > WraithEye
 
static Asset< Texture2D > XmasLight
 
static Asset< Texture2D >[] XmasTree = new Asset<Texture2D>[5]
 

Detailed Description

Contains the Texture2D assets used by the game, each stored as an Asset<Texture2D>.

Note that the vanilla entries in Item, Npc, Projectile, Gore, Wall, Tile, ItemFlame, Background, and all of the player equipment and hair related fields are not necessarily loaded. Use the Main.LoadItem(int) or similar methods before attempting to use those texture assets. Modded content in these arrays are always preloaded during mod loading.

For example, the following code could be used to access the Acorn item texture asset.

Main.instance.LoadItem(ItemID.Acorn); var acornTexture = TextureAssets.Item[ItemID.Acorn];

See the Asset wiki page

for more information.