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

◆ PaintTheTrees()

static void Terraria.WorldGen.PaintTheTrees ( )
inlinestaticprivate

Definition at line 18003 of file WorldGen.cs.

18004 {
18005 int num = 20;
18006 if (remixWorldGen)
18007 {
18008 num = (int)Main.worldSurface;
18009 }
18010 byte b = (byte)genRand.Next(1, 13);
18011 bool flag = false;
18012 for (int i = 20; i < Main.maxTilesX - 20; i++)
18013 {
18014 bool flag2 = false;
18015 for (int j = num; j < Main.maxTilesY - 20; j++)
18016 {
18017 Tile tile = Main.tile[i, j];
18018 if (tile.active() && (tile.type == 5 || tile.type == 323 || tile.type == 596 || tile.type == 616))
18019 {
18020 tile.color(b);
18021 flag2 = true;
18022 flag = true;
18023 }
18024 }
18025 if (flag && !flag2)
18026 {
18027 flag = false;
18028 b++;
18029 if (b > 12)
18030 {
18031 b = 1;
18032 }
18033 }
18034 }
18035 }
static bool remixWorldGen
Definition WorldGen.cs:1386
static UnifiedRandom genRand
Definition WorldGen.cs:1455

References Terraria.Tile.active(), Terraria.Tile.color(), Terraria.Main.tile, and Terraria.Main.worldSurface.

+ Here is the call graph for this function: