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

◆ MatureTheHerbPlants()

static void Terraria.WorldGen.MatureTheHerbPlants ( )
inlinestaticprivate

Definition at line 36679 of file WorldGen.cs.

36680 {
36681 for (int i = 10; i < Main.maxTilesX - 10; i++)
36682 {
36683 for (int j = 10; j < Main.maxTilesY - 10; j++)
36684 {
36685 if ((double)j > Main.rockLayer && (Main.tile[i, j + 1].type == 59 || Main.tile[i, j + 1].type == 0) && SolidTile(i, j + 1) && !Main.tile[i, j].active() && Main.tile[i, j].liquid == 0 && genRand.Next(25) == 0)
36686 {
36687 Main.tile[i, j].active(active: true);
36688 Main.tile[i, j].type = 82;
36689 Main.tile[i, j].frameX = 36;
36690 Main.tile[i, j].frameY = 0;
36691 }
36692 if (Main.tile[i, j].type == 82 && genRand.Next(3) == 0)
36693 {
36694 Main.tile[i, j].type = 83;
36695 if (Main.tile[i, j].frameX == 36 && genRand.Next(2) == 0)
36696 {
36697 Main.tile[i, j].type = 84;
36698 }
36699 if (Main.tile[i, j].frameX == 108 && genRand.Next(3) == 0)
36700 {
36701 Main.tile[i, j].type = 84;
36702 }
36703 }
36704 }
36705 }
36706 }
static UnifiedRandom genRand
Definition WorldGen.cs:1215

References Terraria.Main.rockLayer, Terraria.Enums.SolidTile, and Terraria.Main.tile.