TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ TryKillingReplaceableTile()

static bool Terraria.WorldGen.TryKillingReplaceableTile ( int x,
int y,
int tileType )
inlinestatic

Definition at line 53633 of file WorldGen.cs.

53634 {
53635 if (!InWorld(x, y, 2))
53636 {
53637 return false;
53638 }
53639 if (Main.tile[x, y].active() && (Main.tileCut[Main.tile[x, y].type] || TileID.Sets.BreakableWhenPlacing[Main.tile[x, y].type] || (Main.tile[x, y].type >= 373 && Main.tile[x, y].type <= 375) || Main.tile[x, y].type == 461))
53640 {
53641 if (Main.tile[x, y].type != tileType)
53642 {
53643 bool num = Main.tile[x, y + 1].type != 78 && Main.tile[x, y + 1].type != 380 && Main.tile[x, y + 1].type != 579;
53644 bool flag = Main.tile[x, y].type == 3 || Main.tile[x, y].type == 73;
53645 bool flag2 = Main.tileAlch[Main.tile[x, y].type] && IsHarvestableHerbWithSeed(Main.tile[x, y].type, Main.tile[x, y].frameX / 18);
53646 bool flag3 = Main.tileAlch[tileType];
53647 if (num || ((flag || flag2) && flag3))
53648 {
53649 KillTile(x, y);
53650 if (!Main.tile[x, y].active() && Main.netMode != 0)
53651 {
53652 NetMessage.SendData(17, -1, -1, null, 0, x, y);
53653 }
53654 return true;
53655 }
53656 return false;
53657 }
53658 return false;
53659 }
53660 return false;
53661 }
static bool[] BreakableWhenPlacing
Definition TileID.cs:344
static void KillTile(int i, int j, bool fail=false, bool effectOnly=false, bool noItem=false)
static bool InWorld(int x, int y, int fluff=0)
Definition WorldGen.cs:6481
static bool IsHarvestableHerbWithSeed(int type, int style)

References Terraria.ID.TileID.Sets.BreakableWhenPlacing, Terraria.Main.netMode, Terraria.NetMessage.SendData(), Terraria.Main.tile, Terraria.Main.tileAlch, and Terraria.Main.tileCut.

Referenced by Terraria.DelegateMethods.SpreadDirt().

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