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

◆ HellRoom()

static void Terraria.WorldGen.HellRoom ( int i,
int j,
int width,
int height,
byte type = 76,
byte wall = 13 )
inlinestatic

Definition at line 26418 of file WorldGen.cs.

26419 {
26420 if (j > Main.maxTilesY - 40)
26421 {
26422 return;
26423 }
26424 for (int k = i - width / 2; k <= i + width / 2; k++)
26425 {
26426 for (int l = j - height; l <= j; l++)
26427 {
26428 try
26429 {
26430 Main.tile[k, l].active(active: true);
26431 Main.tile[k, l].type = type;
26432 Main.tile[k, l].liquid = 0;
26433 Main.tile[k, l].lava(lava: false);
26434 }
26435 catch
26436 {
26437 }
26438 }
26439 }
26440 for (int m = i - width / 2 + 1; m <= i + width / 2 - 1; m++)
26441 {
26442 for (int n = j - height + 1; n <= j - 1; n++)
26443 {
26444 try
26445 {
26446 Main.tile[m, n].active(active: false);
26447 Main.tile[m, n].wall = wall;
26448 Main.tile[m, n].liquid = 0;
26449 Main.tile[m, n].lava(lava: false);
26450 }
26451 catch
26452 {
26453 }
26454 }
26455 }
26456 }

References Terraria.Main.maxTilesY, and Terraria.Main.tile.