tModLoader v2022.09
A mod to make and play Terraria mods
Terraria.ModLoader.TileLoader Class Reference

This serves as the central class from which tile-related functions are supported and carried out. More...

Static Public Member Functions

static void AdjTiles (Player player, int type)
 
static void AnimateTiles ()
 
static int AutoSelect (int i, int j, Player player)
 
static bool CanDropAcorn (int type)
 
static bool CanExplode (int i, int j)
 
static bool CanGrowModCactus (int type)
 
static bool CanGrowModPalmTree (int type)
 
static bool CanGrowModTree (int type)
 
static bool CanKillTile (int i, int j, int type, ref bool blockDamaged)
 
static bool CanPlace (int i, int j, int type)
 
static void ChangeWaterfallStyle (int type, ref int style)
 
static void CheckModTile (int i, int j, int type)
 
static int CloseDoorID (Tile tile)
 
static string ContainerName (int type)
 
static bool CreateDust (int i, int j, int type, ref int dustType)
 
static void DrawEffects (int i, int j, int type, SpriteBatch spriteBatch, ref TileDrawInfo drawData)
 
static bool Drop (int i, int j, int type)
 
static void DropCritterChance (int i, int j, int type, ref int wormChance, ref int grassHopperChance, ref int jungleGrubChance)
 
static void DropPalmTreeWood (int type, ref int wood)
 
static void DropTreeWood (int type, ref int wood)
 
static void FloorVisuals (int type, Player player)
 
static Texture2D GetCactusTexture (int type)
 
static ModTile GetTile (int type)
 Gets the ModTile instance with the given type. If no ModTile with the given type exists, returns null. More...
 
static bool HasSmartInteract (int i, int j, int type, SmartInteractScanSettings settings)
 
static bool HasWalkDust (int type)
 
static void HitWire (int i, int j, int type)
 
static bool IsClosedDoor (Tile tile)
 Returns true if the tile is a vanilla or modded closed door.
 
static bool IsLockedChest (int i, int j, int type)
 
static bool IsModMusicBox (Tile tile)
 
static ? bool IsTileDangerous (int i, int j, int type, Player player)
 
static ? bool IsTileSpelunkable (int i, int j, int type)
 
static void KillMultiTile (int i, int j, int frameX, int frameY, int type)
 
static bool KillSound (int i, int j, int type, bool fail)
 
static void KillTile (int i, int j, int type, ref bool fail, ref bool effectOnly, ref bool noItem)
 
static void MineDamage (int minePower, ref int damage)
 
static void ModifyLight (int i, int j, int type, ref float r, ref float g, ref float b)
 
static void ModifySittingTargetInfo (int i, int j, int type, ref TileRestingInfo info)
 
static void ModifySleepingTargetInfo (int i, int j, int type, ref TileRestingInfo info)
 
static void ModifySmartInteractCoords (int type, ref int width, ref int height, ref int frameWidth, ref int frameHeight, ref int extraY)
 
static void ModifyTorchLuck (Player player, ref float positiveLuck, ref float negativeLuck)
 
static void MouseOver (int i, int j)
 
static void MouseOverFar (int i, int j)
 
static void NearbyEffects (int i, int j, int type, bool closer)
 
static void NumDust (int i, int j, int type, bool fail, ref int numDust)
 
static int OpenDoorID (Tile tile)
 
static void PalmTreeDust (Tile tile, ref int dust)
 
static void PickPowerCheck (Tile target, int pickPower, ref int damage)
 
static void PlaceInWorld (int i, int j, Item item)
 
static void PostDraw (int i, int j, int type, SpriteBatch spriteBatch)
 
static bool PreDraw (int i, int j, int type, SpriteBatch spriteBatch)
 
static bool PreHitWire (int i, int j, int type)
 
static void RandomUpdate (int i, int j, int type)
 
static bool RightClick (int i, int j)
 
static bool SaplingGrowthType (int soilType, ref int saplingType, ref int style)
 
static void SetAnimationFrame (int type, int i, int j, ref int frameXOffset, ref int frameYOffset)
 Sets the animation frame. Sets frameYOffset = modTile.animationFrameHeight * Main.tileFrame[type]; and then calls ModTile.AnimateIndividualTile More...
 
static void SetDrawPositions (int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY)
 
static void SetSpriteEffects (int i, int j, int type, ref SpriteEffects spriteEffects)
 
static bool Slope (int i, int j, int type)
 
static void SpecialDraw (int type, int specialTileX, int specialTileY, SpriteBatch spriteBatch)
 Special Draw calls ModTile and GlobalTile SpecialDraw methods. Special Draw is called at the end of the DrawSpecialTilesLegacy loop, allowing for basically another layer above tiles. Use DrawEffects hook to queue for SpecialDraw.
 
static bool TileFrame (int i, int j, int type, ref bool resetFrame, ref bool noBreak)
 
static void TreeDust (Tile tile, ref int dust)
 
static bool UnlockChest (int i, int j, int type, ref short frameXAdjustment, ref int dustType, ref bool manual)
 
static void WalkDust (int type, ref int dustType, ref bool makeDust, ref Color color)
 

Properties

static int TileCount [get]
 

Detailed Description

This serves as the central class from which tile-related functions are supported and carried out.

Member Function Documentation

◆ GetTile()

static ModTile Terraria.ModLoader.TileLoader.GetTile ( int  type)
static

Gets the ModTile instance with the given type. If no ModTile with the given type exists, returns null.

Parameters
typeThe type of the ModTile
Returns
The ModTile instance in the tiles array, null if not found.

◆ SetAnimationFrame()

static void Terraria.ModLoader.TileLoader.SetAnimationFrame ( int  type,
int  i,
int  j,
ref int  frameXOffset,
ref int  frameYOffset 
)
static

Sets the animation frame. Sets frameYOffset = modTile.animationFrameHeight * Main.tileFrame[type]; and then calls ModTile.AnimateIndividualTile

Parameters
typeThe tile type.
iThe x position in tile coordinates.
jThe y position in tile coordinates.
frameXOffsetThe offset to frameX.
frameYOffsetThe offset to frameY.