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

◆ Statue()

static bool Terraria.WorldGen.Statue ( int x,
int y,
byte paint )
inlinestatic

Definition at line 7357 of file WorldGen.cs.

7358 {
7359 int num = genRand.Next(2, GenVars.statueList.Length);
7360 int x2 = GenVars.statueList[num].X;
7361 int y2 = GenVars.statueList[num].Y;
7362 while (!Main.tile[x, y].active())
7363 {
7364 y++;
7365 if (y >= Main.maxTilesY)
7366 {
7367 break;
7368 }
7369 }
7370 if (y >= Main.maxTilesY)
7371 {
7372 return false;
7373 }
7374 y--;
7375 if (PlaceTile(x, y, x2, mute: true, forced: true, -1, y2))
7376 {
7377 for (int i = 0; i < 2; i++)
7378 {
7379 for (int j = 0; j < 3; j++)
7380 {
7381 Main.tile[x + i, y + j - 2].color(paint);
7382 }
7383 }
7384 return true;
7385 }
7386 return false;
7387 }
static Point16[] statueList
Definition GenVars.cs:304
static bool PlaceTile(int i, int j, int Type, bool mute=false, bool forced=false, int plr=-1, int style=0)
static UnifiedRandom genRand
Definition WorldGen.cs:1455

References Terraria.WorldGen.genRand, Terraria.Main.maxTilesY, Terraria.WorldGen.PlaceTile(), Terraria.WorldBuilding.GenVars.statueList, and Terraria.Main.tile.

Referenced by Terraria.WorldGen.MarblePileWithStatues().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: