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

◆ paintTile()

static bool Terraria.WorldGen.paintTile ( int x,
int y,
byte color,
bool broadCast = false )
inlinestatic

Definition at line 35262 of file WorldGen.cs.

35263 {
35264 Tile tile = Main.tile[x, y];
35265 if (tile == null || !tile.active())
35266 {
35267 return false;
35268 }
35269 byte b = tile.color();
35270 if (b == color)
35271 {
35272 return false;
35273 }
35274 paintEffect(x, y, color, b);
35275 tile.color(color);
35276 if (broadCast)
35277 {
35278 NetMessage.SendData(63, -1, -1, null, x, y, (int)color);
35279 }
35280 return true;
35281 }
static void paintEffect(int x, int y, byte color, byte oldColor)

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

Referenced by Terraria.Player.ApplyPaint(), Terraria.MessageBuffer.GetData(), and Terraria.Player.PlaceThing_PaintScrapper_TryScrapping().