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

◆ PaintTheSand()

static void Terraria.WorldGen.PaintTheSand ( byte tilePaintColor,
byte wallPaintColor )
inlinestaticprivate

Definition at line 18037 of file WorldGen.cs.

18038 {
18039 for (int i = 20; i < Main.maxTilesX - 20; i++)
18040 {
18041 for (int j = 20; j < Main.maxTilesY - 20; j++)
18042 {
18043 Tile tile = Main.tile[i, j];
18044 if (tile.active() && (tile.type == 53 || tile.type == 396 || tile.type == 397))
18045 {
18046 tile.color(tilePaintColor);
18047 if ((double)j > Main.worldSurface)
18048 {
18049 if (Main.tile[i, j - 1].type == 165 || Main.tile[i, j - 1].type == 185 || Main.tile[i, j - 1].type == 186 || Main.tile[i, j - 1].type == 187)
18050 {
18051 Main.tile[i, j - 1].color(tilePaintColor);
18052 }
18053 if (Main.tile[i, j - 2].type == 165 || Main.tile[i, j - 2].type == 185 || Main.tile[i, j - 2].type == 186 || Main.tile[i, j - 2].type == 187)
18054 {
18055 Main.tile[i, j - 2].color(tilePaintColor);
18056 }
18057 if (Main.tile[i, j + 1].type == 165)
18058 {
18059 Main.tile[i, j + 1].color(tilePaintColor);
18060 }
18061 if (Main.tile[i, j + 2].type == 165)
18062 {
18063 Main.tile[i, j + 2].color(tilePaintColor);
18064 }
18065 }
18066 }
18067 if (tile.wall == 187 || tile.wall == 216)
18068 {
18069 tile.wallColor(tilePaintColor);
18070 }
18071 }
18072 }
18073 }

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

+ Here is the call graph for this function: