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

◆ AttemptFossilShattering()

static void Terraria.WorldGen.AttemptFossilShattering ( int i,
int j,
Tile tileCache,
bool fail )
inlinestaticprivate

Definition at line 57721 of file WorldGen.cs.

57722 {
57723 if (tileCache.type != 404 || Main.netMode == 1 || fossilBreak)
57724 {
57725 return;
57726 }
57727 fossilBreak = true;
57728 for (int k = i - 1; k <= i + 1; k++)
57729 {
57730 for (int l = j - 1; l <= j + 1; l++)
57731 {
57732 int maxValue = 15;
57733 if (!SolidTile(k, l + 1))
57734 {
57735 maxValue = 4;
57736 }
57737 else if (k == i && l == j - 1 && !fail)
57738 {
57739 maxValue = 4;
57740 }
57741 if ((k != i || l != j) && Main.tile[k, l].active() && Main.tile[k, l].type == 404 && genRand.Next(maxValue) == 0)
57742 {
57744 if (Main.netMode == 2)
57745 {
57746 NetMessage.SendData(17, -1, -1, null, 0, k, l);
57747 }
57748 }
57749 }
57750 }
57751 fossilBreak = false;
57752 }
static void KillTile(int i, int j, bool fail=false, bool effectOnly=false, bool noItem=false)
static UnifiedRandom genRand
Definition WorldGen.cs:1455
static bool fossilBreak
Definition WorldGen.cs:1428

References Terraria.Main.netMode, Terraria.NetMessage.SendData(), Terraria.Enums.SolidTile, Terraria.Main.tile, and Terraria.Tile.type.

+ Here is the call graph for this function: