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

◆ PaintTheTrees()

static void Terraria.WorldGen.PaintTheTrees ( )
inlinestaticprivate

Definition at line 16960 of file WorldGen.cs.

16961 {
16962 int num = 20;
16963 if (remixWorldGen)
16964 {
16965 num = (int)Main.worldSurface;
16966 }
16967 byte b = (byte)genRand.Next(1, 13);
16968 bool flag = false;
16969 for (int i = 20; i < Main.maxTilesX - 20; i++)
16970 {
16971 bool flag2 = false;
16972 for (int j = num; j < Main.maxTilesY - 20; j++)
16973 {
16974 Tile tile = Main.tile[i, j];
16975 if (tile.active() && (tile.type == 5 || tile.type == 323 || tile.type == 596 || tile.type == 616))
16976 {
16977 tile.color(b);
16978 flag2 = true;
16979 flag = true;
16980 }
16981 }
16982 if (flag && !flag2)
16983 {
16984 flag = false;
16985 b++;
16986 if (b > 12)
16987 {
16988 b = 1;
16989 }
16990 }
16991 }
16992 }
static bool remixWorldGen
Definition WorldGen.cs:1148
static UnifiedRandom genRand
Definition WorldGen.cs:1215

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