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

◆ Spawning_SandstoneCheck()

static bool Terraria.NPC.Spawning_SandstoneCheck ( int x,
int y )
inlinestatic

Definition at line 85903 of file NPC.cs.

85904 {
85905 if (!WorldGen.InWorld(x, y, 10))
85906 {
85907 return false;
85908 }
85909 int num = 0;
85910 for (int i = 0; i < 8; i++)
85911 {
85912 Tile tile = Main.tile[x, y + i];
85913 if (!tile.active() || !TileID.Sets.Conversion.Sand[tile.type])
85914 {
85915 break;
85916 }
85917 num++;
85918 for (int j = 1; j <= 4; j++)
85919 {
85920 tile = Main.tile[x + j, y + i];
85921 if (!tile.active() || !TileID.Sets.Conversion.Sand[tile.type])
85922 {
85923 break;
85924 }
85925 num++;
85926 }
85927 for (int k = 1; k <= 4; k++)
85928 {
85929 tile = Main.tile[x - k, y + i];
85930 if (!tile.active() || !TileID.Sets.Conversion.Sand[tile.type])
85931 {
85932 break;
85933 }
85934 num++;
85935 }
85936 }
85937 if (Main.remixWorld)
85938 {
85939 return num >= 10;
85940 }
85941 return num >= 40;
85942 }

References Terraria.Tile.active(), Terraria.WorldGen.InWorld(), Terraria.Main.remixWorld, Terraria.ID.TileID.Sets.Conversion.Sand, Terraria.Main.tile, and Terraria.Tile.type.

Referenced by Terraria.ModLoader.Utilities.SpawnCondition.SpawnCondition().

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