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

◆ CountTileTypesInWorld()

static int[] Terraria.WorldGen.CountTileTypesInWorld ( params int[] oreTypes)
inlinestatic

Definition at line 80617 of file WorldGen.cs.

80618 {
80619 int[] array = new int[oreTypes.Length];
80620 for (int i = 0; i < Main.maxTilesX; i++)
80621 {
80622 for (int j = 0; j < Main.maxTilesY; j++)
80623 {
80624 Tile tile = Main.tile[i, j];
80625 if (!tile.active())
80626 {
80627 continue;
80628 }
80629 for (int k = 0; k < oreTypes.Length; k++)
80630 {
80631 if (oreTypes[k] == tile.type)
80632 {
80633 array[k]++;
80634 break;
80635 }
80636 }
80637 }
80638 }
80639 return array;
80640 }

References Terraria.Tile.active(), Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Main.tile, and Terraria.Tile.type.

Referenced by Terraria.IO.WorldFile.CheckSavedOreTiers().

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