109286 {
109287 if (Main.netMode == 2)
109288 {
109289 return;
109290 }
109291 if (
type == 611 && !Main.dayTime && Main.rand.Next(700) == 0)
109292 {
109294 }
109295 if (
type >= 602 &&
type <= 603 && Main.dayTime && Main.rand.Next(1200) == 0)
109296 {
109298 }
109300 {
109301 if (Main.dayTime && Main.rand.Next(200) == 0)
109302 {
109304 }
109305 }
109307 {
109308 if ((
double)
Math.Abs(
velocity.X) < 0.5 && (!Main.dayTime || (
double)
position.Y > Main.worldSurface * 16.0) && Main.rand.Next(200) == 0)
109309 {
109311 }
109312 }
109314 {
109315 if (!Main.dayTime || !(Main.time < 18000.0))
109316 {
109317 return;
109318 }
109320 if (Main.rand.Next(
maxValue) != 0)
109321 {
109322 return;
109323 }
109325 {
109326 if (Main.rand.Next(3) != 0)
109327 {
109329 }
109330 else
109331 {
109333 }
109334 }
109336 {
109338 }
109340 {
109341 if (Main.rand.Next(3) != 0)
109342 {
109344 }
109345 else
109346 {
109348 }
109349 }
109351 {
109353 }
109355 {
109357 }
109359 {
109361 }
109363 {
109364 switch (Main.rand.Next(5))
109365 {
109366 case 0:
109368 break;
109369 case 1:
109371 break;
109372 case 2:
109374 break;
109375 case 3:
109377 break;
109378 default:
109380 break;
109381 }
109382 }
109383 }
109384 else if ((
type == 300 ||
type == 447 ||
type == 610) && Main.rand.Next(1800) == 0)
109385 {
109387 }
109388 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Vector2 position
The position of this Entity in world coordinates.
int type
The NPC ID of this NPC. The NPC ID is a unique number assigned to each NPC loaded into the game....