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

◆ SpawnNPC_SpawnLavaBaitCritters()

static int Terraria.NPC.SpawnNPC_SpawnLavaBaitCritters ( int spawnTileX,
int spawnTileY )
inlinestaticprivate

Definition at line 90354 of file NPC.cs.

90355 {
90356 if (Main.rand.Next(3) != 0)
90357 {
90358 if (Main.dayTime)
90359 {
90360 return NewNPC(GetSpawnSourceForNaturalSpawn(), spawnTileX * 16 + 8, spawnTileY * 16, 653);
90361 }
90362 if (Main.rand.Next(fireFlyMultiple) == 0)
90363 {
90364 NewNPC(GetSpawnSourceForNaturalSpawn(), spawnTileX * 16 + 8 - 16, spawnTileY * 16, 654);
90365 }
90366 if (Main.rand.Next(fireFlyMultiple) == 0)
90367 {
90368 NewNPC(GetSpawnSourceForNaturalSpawn(), spawnTileX * 16 + 8 + 16, spawnTileY * 16, 654);
90369 }
90370 if (Main.rand.Next(fireFlyMultiple) == 0)
90371 {
90372 NewNPC(GetSpawnSourceForNaturalSpawn(), spawnTileX * 16 + 8, spawnTileY * 16 - 16, 654);
90373 }
90374 if (Main.rand.Next(fireFlyMultiple) == 0)
90375 {
90376 NewNPC(GetSpawnSourceForNaturalSpawn(), spawnTileX * 16 + 8, spawnTileY * 16 + 16, 654);
90377 }
90378 return NewNPC(GetSpawnSourceForNaturalSpawn(), spawnTileX * 16 + 8, spawnTileY * 16, 654);
90379 }
90380 return NewNPC(GetSpawnSourceForNaturalSpawn(), spawnTileX * 16 + 8, spawnTileY * 16, 655);
90381 }
static int NewNPC(IEntitySource source, int X, int Y, int Type, int Start=0, float ai0=0f, float ai1=0f, float ai2=0f, float ai3=0f, int Target=255)
Spawns an NPC into the game world with the given type. This method should not be called on multipla...
Definition NPC.cs:91239
static IEntitySource GetSpawnSourceForNaturalSpawn()
Definition NPC.cs:107538
static int fireFlyMultiple
Definition NPC.cs:568

References Terraria.Main.dayTime, and Terraria.Main.rand.