tModLoader v0.11.8.9
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...

+ Collaboration diagram for Terraria.ModLoader.TileLoader:

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 bool CreateDust (int i, int j, int type, ref int dustType)
 
static bool Dangersense (int i, int j, int type, Player player)
 
static void DisableSmartCursor (Tile tile, ref bool disable)
 
static void DisableSmartInteract (Tile tile, ref bool disable)
 
static void DrawEffects (int i, int j, int type, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
 
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 FixSmartInteractCoords (int type, ref int width, ref int height, ref int frameWidth, ref int frameHeight, ref int extraX, ref int extraY)
 
static void FloorVisuals (int type, Player player)
 
static Texture2D GetCactusTexture (int type)
 
static Texture2D GetPalmTreeTexture (Tile tile)
 
static Texture2D GetPalmTreeTopTextures (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 Texture2D GetTreeBranchTextures (int type, int i, int j, int trunkOffset, ref int frame)
 
static Texture2D GetTreeTexture (Tile tile)
 
static Texture2D GetTreeTopTextures (int type, int i, int j, ref int frame, ref int frameWidth, ref int frameHeight, ref int xOffsetLeft, ref int yOffset)
 
static bool HasSmartInteract (int type)
 
static bool HasWalkDust (int type)
 
static void HitWire (int i, int j, int type)
 
static bool IsClosedDoor (Tile tile)
 
static bool IsDresser (int type)
 
static bool IsLockedChest (int i, int j, int type)
 
static bool IsModBed (int type)
 
static bool IsModMusicBox (Tile tile)
 
static bool IsSapling (int type)
 
static bool IsTorch (int type)
 
static void KillMultiTile (int i, int j, int frameX, int frameY, int type)
 
static bool KillSound (int i, int j, int type)
 
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 string ModChestName (int type)
 
static string ModDresserName (int type)
 
static void ModifyLight (int i, int j, int type, ref float r, ref float g, ref float b)
 
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 PalmTreeGrowthFXGore (int type, ref int gore)
 
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 type, 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)
 
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 specX, int specY, SpriteBatch spriteBatch)
 Special Draw calls ModTile and GlobalTile SpecialDraw methods. Special Draw is called from DrawTiles after the draw loop, allowing for basically another layer above tiles. Main.specX and Main.specY are used to specify tiles to call SpecialDraw on. Use DrawEffects hook to queue for SpecialDraw. More...
 
static bool TileFrame (int i, int j, int type, ref bool resetFrame, ref bool noBreak)
 
static void TreeDust (Tile tile, ref int dust)
 
static void TreeGrowthFXGore (int type, ref int gore)
 
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]
 

Private Member Functions

delegate bool DelegateCanKillTile (int i, int j, int type, ref bool blockDamaged)
 
delegate void DelegateChangeWaterfallStyle (int type, ref int style)
 
delegate bool DelegateCreateDust (int i, int j, int type, ref int dustType)
 
delegate void DelegateDrawEffects (int i, int j, int type, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
 
delegate void DelegateDropCritterChance (int i, int j, int type, ref int wormChance, ref int grassHopperChance, ref int jungleGrubChance)
 
delegate void DelegateKillTile (int i, int j, int type, ref bool fail, ref bool effectOnly, ref bool noItem)
 
delegate void DelegateModifyLight (int i, int j, int type, ref float r, ref float g, ref float b)
 
delegate void DelegateNumDust (int i, int j, int type, bool fail, ref int num)
 
delegate int DelegateSaplingGrowthType (int type, ref int style)
 
delegate void DelegateSetSpriteEffects (int i, int j, int type, ref SpriteEffects spriteEffects)
 
delegate bool DelegateTileFrame (int i, int j, int type, ref bool resetFrame, ref bool noBreak)
 

Static Private Member Functions

static void Resize2DArray< T > (ref T[,] array, int newSize)
 

Static Private Attributes

static Func< int, int[]>[] HookAdjTiles
 
static Action[] HookAnimateTile
 
static Func< int, int, int, Item, bool >[] HookAutoSelect
 
static Func< int, int, int, bool >[] HookCanExplode
 
static DelegateCanKillTile[] HookCanKillTile
 
static Func< int, int, int, bool >[] HookCanPlace
 
static DelegateChangeWaterfallStyle[] HookChangeWaterfallStyle
 
static DelegateCreateDust[] HookCreateDust
 
static Func< int, int, int, Player, bool >[] HookDangersense
 
static DelegateDrawEffects[] HookDrawEffects
 
static Func< int, int, int, bool >[] HookDrop
 
static DelegateDropCritterChance[] HookDropCritterChance
 
static Action< int, Player >[] HookFloorVisuals
 
static Action< int, int, int >[] HookHitWire
 
static Func< int, int, int, bool >[] HookKillSound
 
static DelegateKillTile[] HookKillTile
 
static DelegateModifyLight[] HookModifyLight
 
static Action< int, int, int >[] HookMouseOver
 
static Action< int, int, int >[] HookMouseOverFar
 
static Action< int, int, int, bool >[] HookNearbyEffects
 
static DelegateNumDust[] HookNumDust
 
static Action< int, int, Item >[] HookPlaceInWorld
 
static Action< int, int, int, SpriteBatch >[] HookPostDraw
 
static Func< int, int, int, SpriteBatch, bool >[] HookPreDraw
 
static Func< int, int, int, bool >[] HookPreHitWire
 
static Action< int, int, int >[] HookRandomUpdate
 
static Action< int, int, int >[] HookRightClick
 
static DelegateSaplingGrowthType[] HookSaplingGrowthType
 
static DelegateSetSpriteEffects[] HookSetSpriteEffects
 
static Func< int, int, int, bool >[] HookSlope
 
static Action< int, int, int, SpriteBatch >[] HookSpecialDraw
 
static DelegateTileFrame[] HookTileFrame
 
static bool loaded = false
 
static int nextTile = TileID.Count
 
static readonly int vanillaChairCount = TileID.Sets.RoomNeeds.CountsAsChair.Length
 
static readonly int vanillaDoorCount = TileID.Sets.RoomNeeds.CountsAsDoor.Length
 
static readonly int vanillaTableCount = TileID.Sets.RoomNeeds.CountsAsTable.Length
 
static readonly int vanillaTorchCount = TileID.Sets.RoomNeeds.CountsAsTorch.Length
 

Detailed Description

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

Definition at line 14 of file TileLoader.cs.

Member Function Documentation

◆ AdjTiles()

static void Terraria.ModLoader.TileLoader.AdjTiles ( Player  player,
int  type 
)
static

Definition at line 796 of file TileLoader.cs.

796 {
797 ModTile modTile = GetTile(type);
798 if (modTile != null) {
799 foreach (int k in modTile.adjTiles) {
800 player.adjTile[k] = true;
801 }
802 }
803 foreach (var hook in HookAdjTiles) {
804 int[] adjTiles = hook(type);
805 foreach (int k in adjTiles) {
806 player.adjTile[k] = true;
807 }
808 }
809 }
static ModTile GetTile(int type)
Gets the ModTile instance with the given type. If no ModTile with the given type exists,...
Definition: TileLoader.cs:102
static Func< int, int[]>[] HookAdjTiles
Definition: TileLoader.cs:72

References Terraria.ModLoader.ModTile.adjTiles, Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.TileLoader.HookAdjTiles.

+ Here is the call graph for this function:

◆ AnimateTiles()

static void Terraria.ModLoader.TileLoader.AnimateTiles ( )
static

Definition at line 672 of file TileLoader.cs.

672 {
673 if (loaded) {
674 for (int i = 0; i < tiles.Count; i++) {
675 ModTile modTile = tiles[i];
676 modTile.AnimateTile(ref Main.tileFrame[modTile.Type], ref Main.tileFrameCounter[modTile.Type]);
677 }
678 foreach (var hook in HookAnimateTile) {
679 hook();
680 }
681 }
682 }
static Action[] HookAnimateTile
Definition: TileLoader.cs:62

References Terraria.ModLoader.ModTile.AnimateTile(), Terraria.ModLoader.TileLoader.HookAnimateTile, Terraria.ModLoader.TileLoader.loaded, and Terraria.ModLoader.ModTile.Type.

+ Here is the call graph for this function:

◆ AutoSelect()

static int Terraria.ModLoader.TileLoader.AutoSelect ( int  i,
int  j,
Player  player 
)
static

Definition at line 844 of file TileLoader.cs.

844 {
845 if (!Main.tile[i, j].active()) {
846 return -1;
847 }
848 int type = Main.tile[i, j].type;
849 ModTile modTile = GetTile(type);
850 for (int k = 0; k < 50; k++) {
851 Item item = player.inventory[k];
852 if (item.type == 0 || item.stack == 0) {
853 continue;
854 }
855 if (modTile != null && modTile.AutoSelect(i, j, item)) {
856 return k;
857 }
858 foreach (var hook in HookAutoSelect) {
859 if (hook(i, j, type, item)) {
860 return k;
861 }
862 }
863 }
864 return -1;
865 }
static Func< int, int, int, Item, bool >[] HookAutoSelect
Definition: TileLoader.cs:76

References Terraria.ModLoader.ModTile.AutoSelect(), Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookAutoSelect, and Terraria.ModLoader.Item.

+ Here is the call graph for this function:

◆ CanDropAcorn()

static bool Terraria.ModLoader.TileLoader.CanDropAcorn ( int  type)
static

Definition at line 968 of file TileLoader.cs.

968 {
969 return trees.ContainsKey(type) ? trees[type].CanDropAcorn() : false;
970 }

◆ CanExplode()

static bool Terraria.ModLoader.TileLoader.CanExplode ( int  i,
int  j 
)
static

Definition at line 595 of file TileLoader.cs.

595 {
596 int type = Main.tile[i, j].type;
597 ModTile modTile = GetTile(type);
598 if (modTile != null && !modTile.CanExplode(i, j)) {
599 return false;
600 }
601 foreach (var hook in HookCanExplode) {
602 if (!hook(i, j, type)) {
603 return false;
604 }
605 }
606 return true;
607 }
static Func< int, int, int, bool >[] HookCanExplode
Definition: TileLoader.cs:55

References Terraria.ModLoader.ModTile.CanExplode(), Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.TileLoader.HookCanExplode.

+ Here is the call graph for this function:

◆ CanGrowModCactus()

static bool Terraria.ModLoader.TileLoader.CanGrowModCactus ( int  type)
static

Definition at line 1022 of file TileLoader.cs.

1022 {
1023 return cacti.ContainsKey(type);
1024 }

◆ CanGrowModPalmTree()

static bool Terraria.ModLoader.TileLoader.CanGrowModPalmTree ( int  type)
static

Definition at line 992 of file TileLoader.cs.

992 {
993 return palmTrees.ContainsKey(type);
994 }

◆ CanGrowModTree()

static bool Terraria.ModLoader.TileLoader.CanGrowModTree ( int  type)
static

Definition at line 952 of file TileLoader.cs.

952 {
953 return trees.ContainsKey(type);
954 }

◆ CanKillTile()

static bool Terraria.ModLoader.TileLoader.CanKillTile ( int  i,
int  j,
int  type,
ref bool  blockDamaged 
)
static

Definition at line 573 of file TileLoader.cs.

573 {
574 foreach (var hook in HookCanKillTile) {
575 if (!hook(i, j, type, ref blockDamaged)) {
576 return false;
577 }
578 }
579 return GetTile(type)?.CanKillTile(i, j, ref blockDamaged) ?? true;
580 }
virtual bool CanKillTile(int i, int j, ref bool blockDamaged)
Allows you to determine whether or not the tile at the given coordinates can be hit by anything....
Definition: ModTile.cs:295
static DelegateCanKillTile[] HookCanKillTile
Definition: TileLoader.cs:52

References Terraria.ModLoader.ModTile.CanKillTile(), Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.TileLoader.HookCanKillTile.

+ Here is the call graph for this function:

◆ CanPlace()

static bool Terraria.ModLoader.TileLoader.CanPlace ( int  i,
int  j,
int  type 
)
static

Definition at line 786 of file TileLoader.cs.

786 {
787 foreach (var hook in HookCanPlace) {
788 if (!hook(i, j, type)) {
789 return false;
790 }
791 }
792 return GetTile(type)?.CanPlace(i, j) ?? true;
793 }
virtual bool CanPlace(int i, int j)
Allows you to stop this tile from being placed at the given coordinates. Return false to block the ti...
Definition: ModTile.cs:458
static Func< int, int, int, bool >[] HookCanPlace
Definition: TileLoader.cs:71

References Terraria.ModLoader.ModTile.CanPlace(), Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.TileLoader.HookCanPlace.

+ Here is the call graph for this function:

◆ ChangeWaterfallStyle()

static void Terraria.ModLoader.TileLoader.ChangeWaterfallStyle ( int  type,
ref int  style 
)
static

Definition at line 913 of file TileLoader.cs.

913 {
914 GetTile(type)?.ChangeWaterfallStyle(ref style);
915 foreach (var hook in HookChangeWaterfallStyle) {
916 hook(type, ref style);
917 }
918 }
virtual void ChangeWaterfallStyle(ref int style)
Allows you to change the style of waterfall that passes through or over this type of tile.
Definition: ModTile.cs:550
static DelegateChangeWaterfallStyle[] HookChangeWaterfallStyle
Definition: TileLoader.cs:82

References Terraria.ModLoader.ModTile.ChangeWaterfallStyle(), Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.TileLoader.HookChangeWaterfallStyle.

+ Here is the call graph for this function:

◆ CheckModTile()

static void Terraria.ModLoader.TileLoader.CheckModTile ( int  i,
int  j,
int  type 
)
static

Definition at line 297 of file TileLoader.cs.

297 {
298 if (WorldGen.destroyObject) {
299 return;
300 }
301 TileObjectData tileData = TileObjectData.GetTileData(type, 0, 0);
302 if (tileData == null) {
303 return;
304 }
305 int frameX = Main.tile[i, j].frameX;
306 int frameY = Main.tile[i, j].frameY;
307 int subX = frameX / tileData.CoordinateFullWidth;
308 int subY = frameY / tileData.CoordinateFullHeight;
309 int wrap = tileData.StyleWrapLimit;
310 if (wrap == 0) {
311 wrap = 1;
312 }
313 int subTile = tileData.StyleHorizontal ? subY * wrap + subX : subX * wrap + subY;
314 int style = subTile / tileData.StyleMultiplier;
315 int alternate = subTile % tileData.StyleMultiplier;
316 for (int k = 0; k < tileData.AlternatesCount; k++) {
317 if (alternate >= tileData.Alternates[k].Style && alternate <= tileData.Alternates[k].Style + tileData.RandomStyleRange) {
318 alternate = k;
319 break;
320 }
321 }
322 tileData = TileObjectData.GetTileData(type, style, alternate + 1);
323 int partFrameX = frameX % tileData.CoordinateFullWidth;
324 int partFrameY = frameY % tileData.CoordinateFullHeight;
325 int partX = partFrameX / (tileData.CoordinateWidth + tileData.CoordinatePadding);
326 int partY = 0;
327 int remainingFrameY = partFrameY;
328 while (remainingFrameY > 0) {
329 remainingFrameY -= tileData.CoordinateHeights[partY] + tileData.CoordinatePadding;
330 partY++;
331 }
332 i -= partX;
333 j -= partY;
334 int originX = i + tileData.Origin.X;
335 int originY = j + tileData.Origin.Y;
336 TileObject objectData;
337 bool partiallyDestroyed = false;
338 for (int x = i; x < i + tileData.Width; x++) {
339 for (int y = j; y < j + tileData.Height; y++) {
340 if (!Main.tile[x, y].active() || Main.tile[x, y].type != type) {
341 partiallyDestroyed = true;
342 break;
343 }
344 }
345 if (partiallyDestroyed) {
346 break;
347 }
348 }
349 if (partiallyDestroyed || !TileObject.CanPlace(originX, originY, type, style, 0, out objectData, true, true)) {
350 WorldGen.destroyObject = true;
351 for (int x = i; x < i + tileData.Width; x++) {
352 for (int y = j; y < j + tileData.Height; y++) {
353 if (Main.tile[x, y].type == type && Main.tile[x, y].active()) {
354 WorldGen.KillTile(x, y, false, false, false);
355 }
356 }
357 }
358 KillMultiTile(i, j, frameX - partFrameX, frameY - partFrameY, type);
359 WorldGen.destroyObject = false;
360 for (int x = i - 1; x < i + tileData.Width + 2; x++) {
361 for (int y = j - 1; y < j + tileData.Height + 2; y++) {
362 WorldGen.TileFrame(x, y, false, false);
363 }
364 }
365 }
366 TileObject.objectPreview.Active = false;
367 }
static void KillMultiTile(int i, int j, int frameX, int frameY, int type)
Definition: TileLoader.cs:591

References Terraria.ModLoader.TileLoader.KillMultiTile().

+ Here is the call graph for this function:

◆ CloseDoorID()

static int Terraria.ModLoader.TileLoader.CloseDoorID ( Tile  tile)
static

Definition at line 403 of file TileLoader.cs.

403 {
404 ModTile modTile = GetTile(tile.type);
405 if (modTile != null) {
406 return modTile.closeDoorID;
407 }
408 if (tile.type == TileID.OpenDoor) {
409 return TileID.ClosedDoor;
410 }
411 return -1;
412 }

References Terraria.ModLoader.ModTile.closeDoorID, and Terraria.ModLoader.TileLoader.GetTile().

+ Here is the call graph for this function:

◆ CreateDust()

static bool Terraria.ModLoader.TileLoader.CreateDust ( int  i,
int  j,
int  type,
ref int  dustType 
)
static

Definition at line 533 of file TileLoader.cs.

533 {
534 foreach (var hook in HookCreateDust) {
535 if (!hook(i, j, type, ref dustType)) {
536 return false;
537 }
538 }
539 return GetTile(type)?.CreateDust(i, j, ref dustType) ?? true;
540 }
virtual bool CreateDust(int i, int j, ref int type)
Allows you to modify the default type of dust created when the tile at the given coordinates is hit....
Definition: ModTile.cs:268
static DelegateCreateDust[] HookCreateDust
Definition: TileLoader.cs:47

References Terraria.ModLoader.ModTile.CreateDust(), Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.TileLoader.HookCreateDust.

+ Here is the call graph for this function:

◆ Dangersense()

static bool Terraria.ModLoader.TileLoader.Dangersense ( int  i,
int  j,
int  type,
Player  player 
)
static

Definition at line 630 of file TileLoader.cs.

630 {
631 ModTile modTile = GetTile(type);
632 if (modTile != null && modTile.Dangersense(i, j, player)) {
633 return true;
634 }
635 foreach (var hook in HookDangersense) {
636 if (hook(i, j, type, player)) {
637 return true;
638 }
639 }
640 return false;
641 }
static Func< int, int, int, Player, bool >[] HookDangersense
Definition: TileLoader.cs:59

References Terraria.ModLoader.ModTile.Dangersense(), Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.TileLoader.HookDangersense.

+ Here is the call graph for this function:

◆ DelegateCanKillTile()

delegate bool Terraria.ModLoader.TileLoader.DelegateCanKillTile ( int  i,
int  j,
int  type,
ref bool  blockDamaged 
)
private

◆ DelegateChangeWaterfallStyle()

delegate void Terraria.ModLoader.TileLoader.DelegateChangeWaterfallStyle ( int  type,
ref int  style 
)
private

◆ DelegateCreateDust()

delegate bool Terraria.ModLoader.TileLoader.DelegateCreateDust ( int  i,
int  j,
int  type,
ref int  dustType 
)
private

◆ DelegateDrawEffects()

delegate void Terraria.ModLoader.TileLoader.DelegateDrawEffects ( int  i,
int  j,
int  type,
SpriteBatch  spriteBatch,
ref Color  drawColor,
ref int  nextSpecialDrawIndex 
)
private

◆ DelegateDropCritterChance()

delegate void Terraria.ModLoader.TileLoader.DelegateDropCritterChance ( int  i,
int  j,
int  type,
ref int  wormChance,
ref int  grassHopperChance,
ref int  jungleGrubChance 
)
private

◆ DelegateKillTile()

delegate void Terraria.ModLoader.TileLoader.DelegateKillTile ( int  i,
int  j,
int  type,
ref bool  fail,
ref bool  effectOnly,
ref bool  noItem 
)
private

◆ DelegateModifyLight()

delegate void Terraria.ModLoader.TileLoader.DelegateModifyLight ( int  i,
int  j,
int  type,
ref float  r,
ref float  g,
ref float  b 
)
private

◆ DelegateNumDust()

delegate void Terraria.ModLoader.TileLoader.DelegateNumDust ( int  i,
int  j,
int  type,
bool  fail,
ref int  num 
)
private

◆ DelegateSaplingGrowthType()

delegate int Terraria.ModLoader.TileLoader.DelegateSaplingGrowthType ( int  type,
ref int  style 
)
private

◆ DelegateSetSpriteEffects()

delegate void Terraria.ModLoader.TileLoader.DelegateSetSpriteEffects ( int  i,
int  j,
int  type,
ref SpriteEffects  spriteEffects 
)
private

◆ DelegateTileFrame()

delegate bool Terraria.ModLoader.TileLoader.DelegateTileFrame ( int  i,
int  j,
int  type,
ref bool  resetFrame,
ref bool  noBreak 
)
private

◆ DisableSmartCursor()

static void Terraria.ModLoader.TileLoader.DisableSmartCursor ( Tile  tile,
ref bool  disable 
)
static

Definition at line 369 of file TileLoader.cs.

369 {
370 if (tile.active()) {
371 ModTile modTile = GetTile(tile.type);
372 if (modTile != null) {
373 disable = modTile.disableSmartCursor;
374 }
375 }
376 }

References Terraria.ModLoader.ModTile.disableSmartCursor, and Terraria.ModLoader.TileLoader.GetTile().

+ Here is the call graph for this function:

◆ DisableSmartInteract()

static void Terraria.ModLoader.TileLoader.DisableSmartInteract ( Tile  tile,
ref bool  disable 
)
static

Definition at line 378 of file TileLoader.cs.

378 {
379 if (tile.active()) {
380 ModTile modTile = GetTile(tile.type);
381 if (modTile != null) {
382 disable = modTile.disableSmartInteract;
383 }
384 }
385 }

References Terraria.ModLoader.ModTile.disableSmartInteract, and Terraria.ModLoader.TileLoader.GetTile().

+ Here is the call graph for this function:

◆ DrawEffects()

static void Terraria.ModLoader.TileLoader.DrawEffects ( int  i,
int  j,
int  type,
SpriteBatch  spriteBatch,
ref Color  drawColor,
ref int  nextSpecialDrawIndex 
)
static

Definition at line 714 of file TileLoader.cs.

714 {
715 GetTile(type)?.DrawEffects(i, j, spriteBatch, ref drawColor, ref nextSpecialDrawIndex);
716 foreach (var hook in HookDrawEffects) {
717 hook(i, j, type, spriteBatch, ref drawColor, ref nextSpecialDrawIndex);
718 }
719 }
virtual void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref Color drawColor, ref int nextSpecialDrawIndex)
Allows you to make stuff happen whenever the tile at the given coordinates is drawn....
Definition: ModTile.cs:408
static DelegateDrawEffects[] HookDrawEffects
Definition: TileLoader.cs:65

References Terraria.ModLoader.ModTile.DrawEffects(), Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.TileLoader.HookDrawEffects.

+ Here is the call graph for this function:

◆ Drop()

static bool Terraria.ModLoader.TileLoader.Drop ( int  i,
int  j,
int  type 
)
static

Definition at line 553 of file TileLoader.cs.

553 {
554 foreach (var hook in HookDrop) {
555 if (!hook(i, j, type)) {
556 return false;
557 }
558 }
559 ModTile modTile = GetTile(type);
560 if (modTile != null) {
561 if (!modTile.Drop(i, j)) {
562 return false;
563 }
564 if (modTile.drop > 0) {
565 Item.NewItem(i * 16, j * 16, 16, 16, modTile.drop, 1, false, -1);
566 }
567 return false;
568 }
569 return true;
570 }
static Func< int, int, int, bool >[] HookDrop
Definition: TileLoader.cs:50

References Terraria.ModLoader.ModTile.drop, Terraria.ModLoader.ModTile.Drop(), Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookDrop, and Terraria.ModLoader.Item.

+ Here is the call graph for this function:

◆ DropCritterChance()

static void Terraria.ModLoader.TileLoader.DropCritterChance ( int  i,
int  j,
int  type,
ref int  wormChance,
ref int  grassHopperChance,
ref int  jungleGrubChance 
)
static

Definition at line 543 of file TileLoader.cs.

543 {
544 GetTile(type)?.DropCritterChance(i, j, ref wormChance, ref grassHopperChance, ref jungleGrubChance);
545
546 foreach (var hook in HookDropCritterChance) {
547 hook(i, j, type, ref wormChance, ref grassHopperChance, ref jungleGrubChance);
548 }
549 }
virtual void DropCritterChance(int i, int j, ref int wormChance, ref int grassHopperChance, ref int jungleGrubChance)
Allows you to modify the chance the tile at the given coordinates has of spawning a certain critter w...
Definition: ModTile.cs:278
static DelegateDropCritterChance[] HookDropCritterChance
Definition: TileLoader.cs:49

References Terraria.ModLoader.ModTile.DropCritterChance(), Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.TileLoader.HookDropCritterChance.

+ Here is the call graph for this function:

◆ DropPalmTreeWood()

static void Terraria.ModLoader.TileLoader.DropPalmTreeWood ( int  type,
ref int  wood 
)
static

Definition at line 1008 of file TileLoader.cs.

1008 {
1009 if (palmTrees.ContainsKey(type)) {
1010 wood = palmTrees[type].DropWood();
1011 }
1012 }

◆ DropTreeWood()

static void Terraria.ModLoader.TileLoader.DropTreeWood ( int  type,
ref int  wood 
)
static

Definition at line 972 of file TileLoader.cs.

972 {
973 if (trees.ContainsKey(type)) {
974 wood = trees[type].DropWood();
975 }
976 }

◆ FixSmartInteractCoords()

static void Terraria.ModLoader.TileLoader.FixSmartInteractCoords ( int  type,
ref int  width,
ref int  height,
ref int  frameWidth,
ref int  frameHeight,
ref int  extraX,
ref int  extraY 
)
static

Definition at line 493 of file TileLoader.cs.

493 {
494 ModTile modTile = GetTile(type);
495 if (modTile != null) {
496 TileObjectData data = TileObjectData.GetTileData(type, 0);
497 width = data.Width;
498 height = data.Height;
499 frameWidth = data.CoordinateWidth + data.CoordinatePadding;
500 frameHeight = data.CoordinateHeights[0] + data.CoordinatePadding;
501 extraY = data.CoordinateFullHeight % frameHeight;
502 }
503 }

References Terraria.ModLoader.TileLoader.GetTile().

+ Here is the call graph for this function:

◆ FloorVisuals()

static void Terraria.ModLoader.TileLoader.FloorVisuals ( int  type,
Player  player 
)
static

Definition at line 887 of file TileLoader.cs.

887 {
888 GetTile(type)?.FloorVisuals(player);
889
890 foreach (var hook in HookFloorVisuals) {
891 hook(type, player);
892 }
893 }
virtual void FloorVisuals(Player player)
Allows you to make something happen when a player stands on this type of tile. For example,...
Definition: ModTile.cs:527
static Action< int, Player >[] HookFloorVisuals
Definition: TileLoader.cs:80

References Terraria.ModLoader.ModTile.FloorVisuals(), Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.TileLoader.HookFloorVisuals.

+ Here is the call graph for this function:

◆ GetCactusTexture()

static Texture2D Terraria.ModLoader.TileLoader.GetCactusTexture ( int  type)
static

Definition at line 1026 of file TileLoader.cs.

1026 {
1027 return cacti.ContainsKey(type) ? cacti[type].GetTexture() : null;
1028 }

◆ GetPalmTreeTexture()

static Texture2D Terraria.ModLoader.TileLoader.GetPalmTreeTexture ( Tile  tile)
static

Definition at line 1014 of file TileLoader.cs.

1014 {
1015 return tile.active() && palmTrees.ContainsKey(tile.type) ? palmTrees[tile.type].GetTexture() : null;
1016 }

◆ GetPalmTreeTopTextures()

static Texture2D Terraria.ModLoader.TileLoader.GetPalmTreeTopTextures ( int  type)
static

Definition at line 1018 of file TileLoader.cs.

1018 {
1019 return palmTrees.ContainsKey(type) ? palmTrees[type].GetTopTextures() : null;
1020 }

◆ 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.

Definition at line 102 of file TileLoader.cs.

102 {
103 return type >= TileID.Count && type < TileCount ? tiles[type - TileID.Count] : null;
104 }

References Terraria.ModLoader.TileLoader.TileCount.

Referenced by Terraria.ModLoader.Mod.AddMusicBox(), Terraria.ModLoader.TileLoader.AdjTiles(), Terraria.ModLoader.TileLoader.AutoSelect(), Terraria.ModLoader.TileLoader.CanExplode(), Terraria.ModLoader.TileLoader.CanKillTile(), Terraria.ModLoader.TileLoader.CanPlace(), Terraria.ModLoader.TileLoader.ChangeWaterfallStyle(), Terraria.ModLoader.TileLoader.CloseDoorID(), Terraria.ModLoader.TileLoader.CreateDust(), Terraria.ModLoader.TileLoader.Dangersense(), Terraria.ModLoader.TileLoader.DisableSmartCursor(), Terraria.ModLoader.TileLoader.DisableSmartInteract(), Terraria.ModLoader.TileLoader.DrawEffects(), Terraria.ModLoader.TileLoader.Drop(), Terraria.ModLoader.TileLoader.DropCritterChance(), Terraria.ModLoader.TileLoader.FixSmartInteractCoords(), Terraria.ModLoader.TileLoader.FloorVisuals(), Terraria.ModLoader.TileLoader.HasSmartInteract(), Terraria.ModLoader.TileLoader.HasWalkDust(), Terraria.ModLoader.TileLoader.HitWire(), Terraria.ModLoader.TileLoader.IsClosedDoor(), Terraria.ModLoader.TileLoader.IsLockedChest(), Terraria.ModLoader.TileLoader.IsModBed(), Terraria.ModLoader.TileLoader.IsSapling(), Terraria.ModLoader.TileLoader.IsTorch(), Terraria.ModLoader.TileLoader.KillMultiTile(), Terraria.ModLoader.TileLoader.KillSound(), Terraria.ModLoader.TileLoader.KillTile(), Terraria.ModLoader.TileLoader.MineDamage(), Terraria.ModLoader.TileLoader.ModChestName(), Terraria.ModLoader.TileLoader.ModDresserName(), Terraria.ModLoader.TileLoader.ModifyLight(), Terraria.ModLoader.TileLoader.MouseOver(), Terraria.ModLoader.TileLoader.MouseOverFar(), Terraria.ModLoader.TileLoader.NearbyEffects(), Terraria.ModLoader.TileLoader.NumDust(), Terraria.ModLoader.TileLoader.OpenDoorID(), Terraria.ModLoader.TileLoader.PickPowerCheck(), Terraria.ModLoader.TileLoader.PlaceInWorld(), Terraria.ModLoader.TileLoader.PostDraw(), Terraria.ModLoader.TileLoader.PreDraw(), Terraria.ModLoader.TileLoader.RandomUpdate(), Terraria.ModLoader.TileLoader.RightClick(), Terraria.ModLoader.TileLoader.SaplingGrowthType(), Terraria.ModLoader.TileLoader.SetAnimationFrame(), Terraria.ModLoader.TileLoader.SetDrawPositions(), Terraria.ModLoader.TileLoader.SetSpriteEffects(), Terraria.ModLoader.TileLoader.Slope(), Terraria.ModLoader.TileLoader.SpecialDraw(), Terraria.ModLoader.TileLoader.TileFrame(), Terraria.ModLoader.TileLoader.UnlockChest(), and Terraria.ModLoader.TileLoader.WalkDust().

◆ GetTreeBranchTextures()

static Texture2D Terraria.ModLoader.TileLoader.GetTreeBranchTextures ( int  type,
int  i,
int  j,
int  trunkOffset,
ref int  frame 
)
static

Definition at line 988 of file TileLoader.cs.

988 {
989 return trees.ContainsKey(type) ? trees[type].GetBranchTextures(i, j, trunkOffset, ref frame) : null;
990 }

◆ GetTreeTexture()

static Texture2D Terraria.ModLoader.TileLoader.GetTreeTexture ( Tile  tile)
static

Definition at line 978 of file TileLoader.cs.

978 {
979 return tile.active() && trees.ContainsKey(tile.type) ? trees[tile.type].GetTexture() : null;
980 }

◆ GetTreeTopTextures()

static Texture2D Terraria.ModLoader.TileLoader.GetTreeTopTextures ( int  type,
int  i,
int  j,
ref int  frame,
ref int  frameWidth,
ref int  frameHeight,
ref int  xOffsetLeft,
ref int  yOffset 
)
static

Definition at line 982 of file TileLoader.cs.

983 {
984 return trees.ContainsKey(type) ? trees[type].GetTopTextures(i, j, ref frame,
985 ref frameWidth, ref frameHeight, ref xOffsetLeft, ref yOffset) : null;
986 }

◆ HasSmartInteract()

static bool Terraria.ModLoader.TileLoader.HasSmartInteract ( int  type)
static

Definition at line 489 of file TileLoader.cs.

489 {
490 return GetTile(type)?.HasSmartInteract() ?? false;
491 }
virtual bool HasSmartInteract()
Whether or not the smart interact function can select this tile. Useful for things like chests....
Definition: ModTile.cs:242

References Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.ModTile.HasSmartInteract().

+ Here is the call graph for this function:

◆ HasWalkDust()

static bool Terraria.ModLoader.TileLoader.HasWalkDust ( int  type)
static

Definition at line 905 of file TileLoader.cs.

905 {
906 return GetTile(type)?.HasWalkDust() ?? false;
907 }
virtual bool HasWalkDust()
Whether or not this tile creates dust when the player walks on it. Returns false by default.
Definition: ModTile.cs:533

References Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.ModTile.HasWalkDust().

+ Here is the call graph for this function:

◆ HitWire()

static void Terraria.ModLoader.TileLoader.HitWire ( int  i,
int  j,
int  type 
)
static

Definition at line 879 of file TileLoader.cs.

879 {
880 GetTile(type)?.HitWire(i, j);
881
882 foreach (var hook in HookHitWire) {
883 hook(i, j, type);
884 }
885 }
virtual void HitWire(int i, int j)
Allows you to make something happen when a wire current passes through this tile.
Definition: ModTile.cs:511
static Action< int, int, int >[] HookHitWire
Definition: TileLoader.cs:78

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.ModTile.HitWire(), and Terraria.ModLoader.TileLoader.HookHitWire.

+ Here is the call graph for this function:

◆ IsClosedDoor()

static bool Terraria.ModLoader.TileLoader.IsClosedDoor ( Tile  tile)
static

Definition at line 413 of file TileLoader.cs.

413 {
414 ModTile modTile = GetTile(tile.type);
415 if (modTile != null) {
416 return modTile.openDoorID > -1;
417 }
418 return tile.type == TileID.ClosedDoor;
419 }

References Terraria.ModLoader.TileLoader.GetTile().

+ Here is the call graph for this function:

◆ IsDresser()

static bool Terraria.ModLoader.TileLoader.IsDresser ( int  type)
static

Definition at line 429 of file TileLoader.cs.

429 {
430 if (type == TileID.Dressers) {
431 return true;
432 }
433 return ModDresserName(type).Length > 0;
434 }
static string ModDresserName(int type)
Definition: TileLoader.cs:436

References Terraria.ModLoader.TileLoader.ModDresserName().

+ Here is the call graph for this function:

◆ IsLockedChest()

static bool Terraria.ModLoader.TileLoader.IsLockedChest ( int  i,
int  j,
int  type 
)
static

Definition at line 1042 of file TileLoader.cs.

1042 {
1043 return GetTile(type)?.IsLockedChest(i, j) ?? false;
1044 }
virtual bool IsLockedChest(int i, int j)
Return true if this Tile corresponds to a chest that is locked. Prevents Quick Stacking items into th...

References Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.ModTile.IsLockedChest().

+ Here is the call graph for this function:

◆ IsModBed()

static bool Terraria.ModLoader.TileLoader.IsModBed ( int  type)
static

Definition at line 444 of file TileLoader.cs.

444 {
445 ModTile modTile = GetTile(type);
446 if (modTile == null) {
447 return false;
448 }
449 return modTile.bed;
450 }

References Terraria.ModLoader.ModTile.bed, and Terraria.ModLoader.TileLoader.GetTile().

+ Here is the call graph for this function:

◆ IsModMusicBox()

static bool Terraria.ModLoader.TileLoader.IsModMusicBox ( Tile  tile)
static

Definition at line 468 of file TileLoader.cs.

468 {
469 return SoundLoader.tileToMusic.ContainsKey(tile.type)
470 && SoundLoader.tileToMusic[tile.type].ContainsKey(tile.frameY / 36 * 36);
471 }

◆ IsSapling()

static bool Terraria.ModLoader.TileLoader.IsSapling ( int  type)
static

Definition at line 460 of file TileLoader.cs.

460 {
461 ModTile modTile = GetTile(type);
462 if (modTile == null) {
463 return type == TileID.Saplings;
464 }
465 return modTile.sapling;
466 }

References Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.ModTile.sapling.

Referenced by Terraria.ModLoader.TileLoader.SaplingGrowthType().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsTorch()

static bool Terraria.ModLoader.TileLoader.IsTorch ( int  type)
static

Definition at line 452 of file TileLoader.cs.

452 {
453 ModTile modTile = GetTile(type);
454 if (modTile == null) {
455 return type == TileID.Torches;
456 }
457 return modTile.torch;
458 }

References Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.ModTile.torch.

+ Here is the call graph for this function:

◆ KillMultiTile()

static void Terraria.ModLoader.TileLoader.KillMultiTile ( int  i,
int  j,
int  frameX,
int  frameY,
int  type 
)
static

Definition at line 591 of file TileLoader.cs.

591 {
592 GetTile(type)?.KillMultiTile(i, j, frameX, frameY);
593 }
virtual void KillMultiTile(int i, int j, int frameX, int frameY)
This hook is called exactly once whenever a block encompassing multiple tiles is destroyed....
Definition: ModTile.cs:312

References Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.ModTile.KillMultiTile().

Referenced by Terraria.ModLoader.TileLoader.CheckModTile().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ KillSound()

static bool Terraria.ModLoader.TileLoader.KillSound ( int  i,
int  j,
int  type 
)
static

Definition at line 506 of file TileLoader.cs.

506 {
507 foreach (var hook in HookKillSound) {
508 if (!hook(i, j, type)) {
509 return false;
510 }
511 }
512 ModTile modTile = GetTile(type);
513 if (modTile != null) {
514 if (!modTile.KillSound(i, j)) {
515 return false;
516 }
517 Main.PlaySound(modTile.soundType, i * 16, j * 16, modTile.soundStyle);
518 return false;
519 }
520 return true;
521 }
static Func< int, int, int, bool >[] HookKillSound
Definition: TileLoader.cs:43

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookKillSound, Terraria.ModLoader.ModTile.KillSound(), Terraria.ModLoader.ModTile.soundStyle, and Terraria.ModLoader.ModTile.soundType.

+ Here is the call graph for this function:

◆ KillTile()

static void Terraria.ModLoader.TileLoader.KillTile ( int  i,
int  j,
int  type,
ref bool  fail,
ref bool  effectOnly,
ref bool  noItem 
)
static

Definition at line 583 of file TileLoader.cs.

583 {
584 GetTile(type)?.KillTile(i, j, ref fail, ref effectOnly, ref noItem);
585
586 foreach (var hook in HookKillTile) {
587 hook(i, j, type, ref fail, ref effectOnly, ref noItem);
588 }
589 }
virtual void KillTile(int i, int j, ref bool fail, ref bool effectOnly, ref bool noItem)
Allows you to determine what happens when the tile at the given coordinates is killed or hit with a p...
Definition: ModTile.cs:304
static DelegateKillTile[] HookKillTile
Definition: TileLoader.cs:54

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookKillTile, and Terraria.ModLoader.ModTile.KillTile().

+ Here is the call graph for this function:

◆ MineDamage()

static void Terraria.ModLoader.TileLoader.MineDamage ( int  minePower,
ref int  damage 
)
static

Definition at line 771 of file TileLoader.cs.

771 {
772 Tile target = Main.tile[Player.tileTargetX, Player.tileTargetY];
773 ModTile modTile = GetTile(target.type);
774 damage += modTile != null ? (int)(minePower / modTile.mineResist) : minePower;
775 }

References Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.ModTile.mineResist.

+ Here is the call graph for this function:

◆ ModChestName()

static string Terraria.ModLoader.TileLoader.ModChestName ( int  type)
static

Definition at line 421 of file TileLoader.cs.

421 {
422 ModTile modTile = GetTile(type);
423 if (modTile != null) {
424 return modTile.chest;
425 }
426 return "";
427 }

References Terraria.ModLoader.ModTile.chest, and Terraria.ModLoader.TileLoader.GetTile().

+ Here is the call graph for this function:

◆ ModDresserName()

static string Terraria.ModLoader.TileLoader.ModDresserName ( int  type)
static

Definition at line 436 of file TileLoader.cs.

436 {
437 ModTile modTile = GetTile(type);
438 if (modTile != null) {
439 return modTile.dresser;
440 }
441 return "";
442 }

References Terraria.ModLoader.ModTile.dresser, and Terraria.ModLoader.TileLoader.GetTile().

Referenced by Terraria.ModLoader.TileLoader.IsDresser().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ModifyLight()

static void Terraria.ModLoader.TileLoader.ModifyLight ( int  i,
int  j,
int  type,
ref float  r,
ref float  g,
ref float  b 
)
static

Definition at line 619 of file TileLoader.cs.

619 {
620 if (!Main.tileLighted[type]) {
621 return;
622 }
623 GetTile(type)?.ModifyLight(i, j, ref r, ref g, ref b);
624
625 foreach (var hook in HookModifyLight) {
626 hook(i, j, type, ref r, ref g, ref b);
627 }
628 }
virtual void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
Allows you to determine how much light this block emits. Make sure you set Main.tileLighted[Type] to ...
Definition: ModTile.cs:337
static DelegateModifyLight[] HookModifyLight
Definition: TileLoader.cs:58

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookModifyLight, and Terraria.ModLoader.ModTile.ModifyLight().

+ Here is the call graph for this function:

◆ MouseOver()

static void Terraria.ModLoader.TileLoader.MouseOver ( int  i,
int  j 
)
static

Definition at line 826 of file TileLoader.cs.

826 {
827 int type = Main.tile[i, j].type;
828 GetTile(type)?.MouseOver(i, j);
829
830 foreach (var hook in HookMouseOver) {
831 hook(i, j, type);
832 }
833 }
virtual void MouseOver(int i, int j)
Allows you to make something happen when the mouse hovers over this tile. Useful for showing item ico...
Definition: ModTile.cs:486
static Action< int, int, int >[] HookMouseOver
Definition: TileLoader.cs:74

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookMouseOver, and Terraria.ModLoader.ModTile.MouseOver().

+ Here is the call graph for this function:

◆ MouseOverFar()

static void Terraria.ModLoader.TileLoader.MouseOverFar ( int  i,
int  j 
)
static

Definition at line 835 of file TileLoader.cs.

835 {
836 int type = Main.tile[i, j].type;
837 GetTile(type)?.MouseOverFar(i, j);
838
839 foreach (var hook in HookMouseOverFar) {
840 hook(i, j, type);
841 }
842 }
virtual void MouseOverFar(int i, int j)
Allows you to make something happen when the mouse hovers over this tile, even when the player is far...
Definition: ModTile.cs:494
static Action< int, int, int >[] HookMouseOverFar
Definition: TileLoader.cs:75

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookMouseOverFar, and Terraria.ModLoader.ModTile.MouseOverFar().

+ Here is the call graph for this function:

◆ NearbyEffects()

static void Terraria.ModLoader.TileLoader.NearbyEffects ( int  i,
int  j,
int  type,
bool  closer 
)
static

Definition at line 610 of file TileLoader.cs.

610 {
611 GetTile(type)?.NearbyEffects(i, j, closer);
612
613 foreach (var hook in HookNearbyEffects) {
614 hook(i, j, type, closer);
615 }
616 }
virtual void NearbyEffects(int i, int j, bool closer)
Allows you to make things happen when this tile is within a certain range of the player (around the s...
Definition: ModTile.cs:329
static Action< int, int, int, bool >[] HookNearbyEffects
Definition: TileLoader.cs:56

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookNearbyEffects, and Terraria.ModLoader.ModTile.NearbyEffects().

+ Here is the call graph for this function:

◆ NumDust()

static void Terraria.ModLoader.TileLoader.NumDust ( int  i,
int  j,
int  type,
bool  fail,
ref int  numDust 
)
static

Definition at line 524 of file TileLoader.cs.

524 {
525 GetTile(type)?.NumDust(i, j, fail, ref numDust);
526
527 foreach (var hook in HookNumDust) {
528 hook(i, j, type, fail, ref numDust);
529 }
530 }
virtual void NumDust(int i, int j, bool fail, ref int num)
Allows you to change how many dust particles are created when the tile at the given coordinates is hi...
Definition: ModTile.cs:260
static DelegateNumDust[] HookNumDust
Definition: TileLoader.cs:45

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookNumDust, and Terraria.ModLoader.ModTile.NumDust().

+ Here is the call graph for this function:

◆ OpenDoorID()

static int Terraria.ModLoader.TileLoader.OpenDoorID ( Tile  tile)
static

Definition at line 389 of file TileLoader.cs.

389 {
390 ModTile modTile = GetTile(tile.type);
391 if (modTile != null) {
392 return modTile.openDoorID;
393 }
394 if (tile.type == TileID.ClosedDoor && (tile.frameY < 594 || tile.frameY > 646 || tile.frameX >= 54)) {
395 return TileID.OpenDoor;
396 }
397 return -1;
398 }

References Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.ModTile.openDoorID.

+ Here is the call graph for this function:

◆ PalmTreeDust()

static void Terraria.ModLoader.TileLoader.PalmTreeDust ( Tile  tile,
ref int  dust 
)
static

Definition at line 996 of file TileLoader.cs.

996 {
997 if (tile.active() && palmTrees.ContainsKey(tile.type)) {
998 dust = palmTrees[tile.type].CreateDust();
999 }
1000 }

◆ PalmTreeGrowthFXGore()

static void Terraria.ModLoader.TileLoader.PalmTreeGrowthFXGore ( int  type,
ref int  gore 
)
static

Definition at line 1002 of file TileLoader.cs.

1002 {
1003 if (palmTrees.ContainsKey(type)) {
1004 gore = palmTrees[type].GrowthFXGore();
1005 }
1006 }

◆ PickPowerCheck()

static void Terraria.ModLoader.TileLoader.PickPowerCheck ( Tile  target,
int  pickPower,
ref int  damage 
)
static

Definition at line 778 of file TileLoader.cs.

778 {
779 ModTile modTile = GetTile(target.type);
780 if (modTile != null && pickPower < modTile.minPick) {
781 damage = 0;
782 }
783 }

References Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.ModTile.minPick.

+ Here is the call graph for this function:

◆ PlaceInWorld()

static void Terraria.ModLoader.TileLoader.PlaceInWorld ( int  i,
int  j,
Item  item 
)
static

Definition at line 1030 of file TileLoader.cs.

1030 {
1031 int type = item.createTile;
1032 if (type < 0)
1033 return;
1034
1035 foreach (var hook in HookPlaceInWorld) {
1036 hook(i, j, item);
1037 }
1038
1039 GetTile(type)?.PlaceInWorld(i, j, item);
1040 }
virtual void PlaceInWorld(int i, int j, Item item)
Allows you to do something when this tile is placed. Called on the local Client and Single Player.
Definition: ModTile.cs:568
static Action< int, int, Item >[] HookPlaceInWorld
Definition: TileLoader.cs:85

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookPlaceInWorld, and Terraria.ModLoader.ModTile.PlaceInWorld().

+ Here is the call graph for this function:

◆ PostDraw()

static void Terraria.ModLoader.TileLoader.PostDraw ( int  i,
int  j,
int  type,
SpriteBatch  spriteBatch 
)
static

Definition at line 722 of file TileLoader.cs.

722 {
723 GetTile(type)?.PostDraw(i, j, spriteBatch);
724
725 foreach (var hook in HookPostDraw) {
726 hook(i, j, type, spriteBatch);
727 }
728 }
virtual void PostDraw(int i, int j, SpriteBatch spriteBatch)
Allows you to draw things in front of the tile at the given coordinates. This can also be used to do ...
Definition: ModTile.cs:416
static Action< int, int, int, SpriteBatch >[] HookPostDraw
Definition: TileLoader.cs:66

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookPostDraw, and Terraria.ModLoader.ModTile.PostDraw().

+ Here is the call graph for this function:

◆ PreDraw()

static bool Terraria.ModLoader.TileLoader.PreDraw ( int  i,
int  j,
int  type,
SpriteBatch  spriteBatch 
)
static

Definition at line 705 of file TileLoader.cs.

705 {
706 foreach (var hook in HookPreDraw) {
707 if (!hook(i, j, type, spriteBatch)) {
708 return false;
709 }
710 }
711 return GetTile(type)?.PreDraw(i, j, spriteBatch) ?? true;
712 }
virtual bool PreDraw(int i, int j, SpriteBatch spriteBatch)
Allows you to draw things behind the tile at the given coordinates. Return false to stop the game fro...
Definition: ModTile.cs:398
static Func< int, int, int, SpriteBatch, bool >[] HookPreDraw
Definition: TileLoader.cs:63

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookPreDraw, and Terraria.ModLoader.ModTile.PreDraw().

+ Here is the call graph for this function:

◆ PreHitWire()

static bool Terraria.ModLoader.TileLoader.PreHitWire ( int  i,
int  j,
int  type 
)
static

Definition at line 867 of file TileLoader.cs.

867 {
868 foreach (var hook in HookPreHitWire) {
869 if (!hook(i, j, type)) {
870 return false;
871 }
872 }
873 return true;
874 }
static Func< int, int, int, bool >[] HookPreHitWire
Definition: TileLoader.cs:77

References Terraria.ModLoader.TileLoader.HookPreHitWire.

◆ RandomUpdate()

static void Terraria.ModLoader.TileLoader.RandomUpdate ( int  i,
int  j,
int  type 
)
static

Definition at line 744 of file TileLoader.cs.

744 {
745 if (!Main.tile[i, j].active()) {
746 return;
747 }
748 GetTile(type)?.RandomUpdate(i, j);
749
750 foreach (var hook in HookRandomUpdate) {
751 hook(i, j, type);
752 }
753 }
virtual void RandomUpdate(int i, int j)
Called whenever the world randomly decides to update this tile in a given tick. Useful for things suc...
Definition: ModTile.cs:441
static Action< int, int, int >[] HookRandomUpdate
Definition: TileLoader.cs:68

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookRandomUpdate, and Terraria.ModLoader.ModTile.RandomUpdate().

+ Here is the call graph for this function:

◆ Resize2DArray< T >()

static void Terraria.ModLoader.TileLoader.Resize2DArray< T > ( ref T  array[,],
int  newSize 
)
staticprivate

Definition at line 106 of file TileLoader.cs.

106 {
107 int dim1 = array.GetLength(0);
108 int dim2 = array.GetLength(1);
109 T[,] newArray = new T[newSize, dim2];
110 for (int j = 0; j < newSize && j < dim1; j++) {
111 for (int k = 0; k < dim2; k++) {
112 newArray[j, k] = array[j, k];
113 }
114 }
115 array = newArray;
116 }

◆ RightClick()

static bool Terraria.ModLoader.TileLoader.RightClick ( int  i,
int  j 
)
static

Definition at line 812 of file TileLoader.cs.

812 {
813 bool returnValue = false;
814 int type = Main.tile[i, j].type;
815 GetTile(type)?.RightClick(i, j);
816 if (GetTile(type)?.NewRightClick(i, j) ?? false)
817 returnValue = true;
818
819 foreach (var hook in HookRightClick) {
820 hook(i, j, type);
821 }
822 return returnValue;
823 }
virtual void RightClick(int i, int j)
Allows you to make something happen when this tile is right-clicked by the player.
Definition: ModTile.cs:468
static Action< int, int, int >[] HookRightClick
Definition: TileLoader.cs:73

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookRightClick, and Terraria.ModLoader.ModTile.RightClick().

+ Here is the call graph for this function:

◆ SaplingGrowthType()

static bool Terraria.ModLoader.TileLoader.SaplingGrowthType ( int  type,
ref int  saplingType,
ref int  style 
)
static

Definition at line 920 of file TileLoader.cs.

920 {
921 int originalType = saplingType;
922 int originalStyle = style;
923 bool flag = false;
924 ModTile modTile = GetTile(type);
925 if (modTile != null) {
926 saplingType = modTile.SaplingGrowthType(ref style);
927 if (IsSapling(saplingType)) {
928 originalType = saplingType;
929 originalStyle = style;
930 flag = true;
931 }
932 else {
933 saplingType = originalType;
934 style = originalStyle;
935 }
936 }
937 foreach (var hook in HookSaplingGrowthType) {
938 saplingType = hook(type, ref style);
939 if (IsSapling(saplingType)) {
940 originalType = saplingType;
941 originalStyle = style;
942 flag = true;
943 }
944 else {
945 saplingType = originalType;
946 style = originalStyle;
947 }
948 }
949 return flag;
950 }
static DelegateSaplingGrowthType[] HookSaplingGrowthType
Definition: TileLoader.cs:84
static bool IsSapling(int type)
Definition: TileLoader.cs:460

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookSaplingGrowthType, Terraria.ModLoader.TileLoader.IsSapling(), and Terraria.ModLoader.ModTile.SaplingGrowthType().

+ Here is the call graph for this function:

◆ 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.

Definition at line 694 of file TileLoader.cs.

694 {
695 ModTile modTile = GetTile(type);
696 if (modTile != null) {
697 frameYOffset = modTile.animationFrameHeight * Main.tileFrame[type];
698 modTile.AnimateIndividualTile(type, i, j, ref frameXOffset, ref frameYOffset);
699 }
700 }

References Terraria.ModLoader.ModTile.AnimateIndividualTile(), and Terraria.ModLoader.TileLoader.GetTile().

+ Here is the call graph for this function:

◆ SetDrawPositions()

static void Terraria.ModLoader.TileLoader.SetDrawPositions ( int  i,
int  j,
ref int  width,
ref int  offsetY,
ref int  height 
)
static

Definition at line 653 of file TileLoader.cs.

653 {
654 Tile tile = Main.tile[i, j];
655 if (tile.type >= TileID.Count) {
656 TileObjectData tileData = TileObjectData.GetTileData(tile.type, 0, 0);
657 if (tileData != null) {
658 int partFrameY = tile.frameY % tileData.CoordinateFullHeight;
659 int partY = 0;
660 while (partFrameY > 0) {
661 partFrameY -= tileData.CoordinateHeights[partY] + tileData.CoordinatePadding;
662 partY++;
663 }
664 width = tileData.CoordinateWidth;
665 offsetY = tileData.DrawYOffset;
666 height = tileData.CoordinateHeights[partY];
667 }
668 GetTile(tile.type).SetDrawPositions(i, j, ref width, ref offsetY, ref height);
669 }
670 }
virtual void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height)
Allows you to customize the position in which this tile is drawn. Width refers to the width of one fr...
Definition: ModTile.cs:362

References Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.ModTile.SetDrawPositions().

+ Here is the call graph for this function:

◆ SetSpriteEffects()

static void Terraria.ModLoader.TileLoader.SetSpriteEffects ( int  i,
int  j,
int  type,
ref SpriteEffects  spriteEffects 
)
static

Definition at line 644 of file TileLoader.cs.

644 {
645 GetTile(type)?.SetSpriteEffects(i, j, ref spriteEffects);
646
647 foreach (var hook in HookSetSpriteEffects) {
648 hook(i, j, type, ref spriteEffects);
649 }
650 }
virtual void SetSpriteEffects(int i, int j, ref SpriteEffects spriteEffects)
Allows you to determine whether or not the tile will draw itself flipped in the world.
Definition: ModTile.cs:354
static DelegateSetSpriteEffects[] HookSetSpriteEffects
Definition: TileLoader.cs:61

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookSetSpriteEffects, and Terraria.ModLoader.ModTile.SetSpriteEffects().

+ Here is the call graph for this function:

◆ Slope()

static bool Terraria.ModLoader.TileLoader.Slope ( int  i,
int  j,
int  type 
)
static

Definition at line 896 of file TileLoader.cs.

896 {
897 foreach (var hook in HookSlope) {
898 if (!hook(i, j, type)) {
899 return true;
900 }
901 }
902 return !GetTile(type)?.Slope(i, j) ?? false;
903 }
virtual bool Slope(int i, int j)
Allows you to control how hammers slope this tile. Return true to allow it to slope normally....
Definition: ModTile.cs:519
static Func< int, int, int, bool >[] HookSlope
Definition: TileLoader.cs:79

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookSlope, and Terraria.ModLoader.ModTile.Slope().

+ Here is the call graph for this function:

◆ SpecialDraw()

static void Terraria.ModLoader.TileLoader.SpecialDraw ( int  type,
int  specX,
int  specY,
SpriteBatch  spriteBatch 
)
static

Special Draw calls ModTile and GlobalTile SpecialDraw methods. Special Draw is called from DrawTiles after the draw loop, allowing for basically another layer above tiles. Main.specX and Main.specY are used to specify tiles to call SpecialDraw on. Use DrawEffects hook to queue for SpecialDraw.

Definition at line 733 of file TileLoader.cs.

733 {
734 GetTile(type)?.SpecialDraw(specX, specY, spriteBatch);
735
736 foreach (var hook in HookSpecialDraw) {
737 hook(specX, specY, type, spriteBatch);
738 }
739 }
virtual void SpecialDraw(int i, int j, SpriteBatch spriteBatch)
Special Draw. Only called if coordinates are placed in Main.specX/Y during DrawEffects....
Definition: ModTile.cs:424
static Action< int, int, int, SpriteBatch >[] HookSpecialDraw
Definition: TileLoader.cs:67

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookSpecialDraw, and Terraria.ModLoader.ModTile.SpecialDraw().

+ Here is the call graph for this function:

◆ TileFrame()

static bool Terraria.ModLoader.TileLoader.TileFrame ( int  i,
int  j,
int  type,
ref bool  resetFrame,
ref bool  noBreak 
)
static

Definition at line 756 of file TileLoader.cs.

756 {
757 ModTile modTile = GetTile(type);
758 bool flag = true;
759 if (modTile != null) {
760 flag = modTile.TileFrame(i, j, ref resetFrame, ref noBreak);
761 }
762 foreach (var hook in HookTileFrame) {
763 flag &= hook(i, j, type, ref resetFrame, ref noBreak);
764 }
765 return flag;
766 }
static DelegateTileFrame[] HookTileFrame
Definition: TileLoader.cs:70

References Terraria.ModLoader.TileLoader.GetTile(), Terraria.ModLoader.TileLoader.HookTileFrame, and Terraria.ModLoader.ModTile.TileFrame().

+ Here is the call graph for this function:

◆ TreeDust()

static void Terraria.ModLoader.TileLoader.TreeDust ( Tile  tile,
ref int  dust 
)
static

Definition at line 956 of file TileLoader.cs.

956 {
957 if (tile.active() && trees.ContainsKey(tile.type)) {
958 dust = trees[tile.type].CreateDust();
959 }
960 }

◆ TreeGrowthFXGore()

static void Terraria.ModLoader.TileLoader.TreeGrowthFXGore ( int  type,
ref int  gore 
)
static

Definition at line 962 of file TileLoader.cs.

962 {
963 if (trees.ContainsKey(type)) {
964 gore = trees[type].GrowthFXGore();
965 }
966 }

◆ UnlockChest()

static bool Terraria.ModLoader.TileLoader.UnlockChest ( int  i,
int  j,
int  type,
ref short  frameXAdjustment,
ref int  dustType,
ref bool  manual 
)
static

Definition at line 1046 of file TileLoader.cs.

1046 {
1047 return GetTile(type)?.UnlockChest(i, j, ref frameXAdjustment, ref dustType, ref manual) ?? false;
1048 }
virtual bool UnlockChest(int i, int j, ref short frameXAdjustment, ref int dustType, ref bool manual)
Allows customization of how a chest unlock is accomplished. By default, frameXAdjustment will be -36,...

References Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.ModTile.UnlockChest().

+ Here is the call graph for this function:

◆ WalkDust()

static void Terraria.ModLoader.TileLoader.WalkDust ( int  type,
ref int  dustType,
ref bool  makeDust,
ref Color  color 
)
static

Definition at line 909 of file TileLoader.cs.

909 {
910 GetTile(type)?.WalkDust(ref dustType, ref makeDust, ref color);
911 }
virtual void WalkDust(ref int dustType, ref bool makeDust, ref Color color)
Allows you to modify the dust created when the player walks on this tile. The makeDust parameter is w...
Definition: ModTile.cs:543

References Terraria.ModLoader.TileLoader.GetTile(), and Terraria.ModLoader.ModTile.WalkDust().

+ Here is the call graph for this function:

Member Data Documentation

◆ HookAdjTiles

Func<int, int[]> [] Terraria.ModLoader.TileLoader.HookAdjTiles
staticprivate

Definition at line 72 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.AdjTiles().

◆ HookAnimateTile

Action [] Terraria.ModLoader.TileLoader.HookAnimateTile
staticprivate

Definition at line 62 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.AnimateTiles().

◆ HookAutoSelect

Func<int, int, int, Item, bool> [] Terraria.ModLoader.TileLoader.HookAutoSelect
staticprivate

Definition at line 76 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.AutoSelect().

◆ HookCanExplode

Func<int, int, int, bool> [] Terraria.ModLoader.TileLoader.HookCanExplode
staticprivate

Definition at line 55 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.CanExplode().

◆ HookCanKillTile

DelegateCanKillTile [] Terraria.ModLoader.TileLoader.HookCanKillTile
staticprivate

Definition at line 52 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.CanKillTile().

◆ HookCanPlace

Func<int, int, int, bool> [] Terraria.ModLoader.TileLoader.HookCanPlace
staticprivate

Definition at line 71 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.CanPlace().

◆ HookChangeWaterfallStyle

DelegateChangeWaterfallStyle [] Terraria.ModLoader.TileLoader.HookChangeWaterfallStyle
staticprivate

Definition at line 82 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.ChangeWaterfallStyle().

◆ HookCreateDust

DelegateCreateDust [] Terraria.ModLoader.TileLoader.HookCreateDust
staticprivate

Definition at line 47 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.CreateDust().

◆ HookDangersense

Func<int, int, int, Player, bool> [] Terraria.ModLoader.TileLoader.HookDangersense
staticprivate

Definition at line 59 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.Dangersense().

◆ HookDrawEffects

DelegateDrawEffects [] Terraria.ModLoader.TileLoader.HookDrawEffects
staticprivate

Definition at line 65 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.DrawEffects().

◆ HookDrop

Func<int, int, int, bool> [] Terraria.ModLoader.TileLoader.HookDrop
staticprivate

Definition at line 50 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.Drop().

◆ HookDropCritterChance

DelegateDropCritterChance [] Terraria.ModLoader.TileLoader.HookDropCritterChance
staticprivate

Definition at line 49 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.DropCritterChance().

◆ HookFloorVisuals

Action<int, Player> [] Terraria.ModLoader.TileLoader.HookFloorVisuals
staticprivate

Definition at line 80 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.FloorVisuals().

◆ HookHitWire

Action<int, int, int> [] Terraria.ModLoader.TileLoader.HookHitWire
staticprivate

Definition at line 78 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.HitWire().

◆ HookKillSound

Func<int, int, int, bool> [] Terraria.ModLoader.TileLoader.HookKillSound
staticprivate

Definition at line 43 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.KillSound().

◆ HookKillTile

DelegateKillTile [] Terraria.ModLoader.TileLoader.HookKillTile
staticprivate

Definition at line 54 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.KillTile().

◆ HookModifyLight

DelegateModifyLight [] Terraria.ModLoader.TileLoader.HookModifyLight
staticprivate

Definition at line 58 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.ModifyLight().

◆ HookMouseOver

Action<int, int, int> [] Terraria.ModLoader.TileLoader.HookMouseOver
staticprivate

Definition at line 74 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.MouseOver().

◆ HookMouseOverFar

Action<int, int, int> [] Terraria.ModLoader.TileLoader.HookMouseOverFar
staticprivate

Definition at line 75 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.MouseOverFar().

◆ HookNearbyEffects

Action<int, int, int, bool> [] Terraria.ModLoader.TileLoader.HookNearbyEffects
staticprivate

Definition at line 56 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.NearbyEffects().

◆ HookNumDust

DelegateNumDust [] Terraria.ModLoader.TileLoader.HookNumDust
staticprivate

Definition at line 45 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.NumDust().

◆ HookPlaceInWorld

Action<int, int, Item> [] Terraria.ModLoader.TileLoader.HookPlaceInWorld
staticprivate

Definition at line 85 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.PlaceInWorld().

◆ HookPostDraw

Action<int, int, int, SpriteBatch> [] Terraria.ModLoader.TileLoader.HookPostDraw
staticprivate

Definition at line 66 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.PostDraw().

◆ HookPreDraw

Func<int, int, int, SpriteBatch, bool> [] Terraria.ModLoader.TileLoader.HookPreDraw
staticprivate

Definition at line 63 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.PreDraw().

◆ HookPreHitWire

Func<int, int, int, bool> [] Terraria.ModLoader.TileLoader.HookPreHitWire
staticprivate

Definition at line 77 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.PreHitWire().

◆ HookRandomUpdate

Action<int, int, int> [] Terraria.ModLoader.TileLoader.HookRandomUpdate
staticprivate

Definition at line 68 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.RandomUpdate().

◆ HookRightClick

Action<int, int, int> [] Terraria.ModLoader.TileLoader.HookRightClick
staticprivate

Definition at line 73 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.RightClick().

◆ HookSaplingGrowthType

DelegateSaplingGrowthType [] Terraria.ModLoader.TileLoader.HookSaplingGrowthType
staticprivate

Definition at line 84 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.SaplingGrowthType().

◆ HookSetSpriteEffects

DelegateSetSpriteEffects [] Terraria.ModLoader.TileLoader.HookSetSpriteEffects
staticprivate

Definition at line 61 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.SetSpriteEffects().

◆ HookSlope

Func<int, int, int, bool> [] Terraria.ModLoader.TileLoader.HookSlope
staticprivate

Definition at line 79 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.Slope().

◆ HookSpecialDraw

Action<int, int, int, SpriteBatch> [] Terraria.ModLoader.TileLoader.HookSpecialDraw
staticprivate

Definition at line 67 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.SpecialDraw().

◆ HookTileFrame

DelegateTileFrame [] Terraria.ModLoader.TileLoader.HookTileFrame
staticprivate

Definition at line 70 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.TileFrame().

◆ loaded

bool Terraria.ModLoader.TileLoader.loaded = false
staticprivate

Definition at line 37 of file TileLoader.cs.

Referenced by Terraria.ModLoader.TileLoader.AnimateTiles().

◆ nextTile

int Terraria.ModLoader.TileLoader.nextTile = TileID.Count
staticprivate

Definition at line 31 of file TileLoader.cs.

◆ vanillaChairCount

readonly int Terraria.ModLoader.TileLoader.vanillaChairCount = TileID.Sets.RoomNeeds.CountsAsChair.Length
staticprivate

Definition at line 38 of file TileLoader.cs.

◆ vanillaDoorCount

readonly int Terraria.ModLoader.TileLoader.vanillaDoorCount = TileID.Sets.RoomNeeds.CountsAsDoor.Length
staticprivate

Definition at line 41 of file TileLoader.cs.

◆ vanillaTableCount

readonly int Terraria.ModLoader.TileLoader.vanillaTableCount = TileID.Sets.RoomNeeds.CountsAsTable.Length
staticprivate

Definition at line 39 of file TileLoader.cs.

◆ vanillaTorchCount

readonly int Terraria.ModLoader.TileLoader.vanillaTorchCount = TileID.Sets.RoomNeeds.CountsAsTorch.Length
staticprivate

Definition at line 40 of file TileLoader.cs.

Property Documentation

◆ TileCount