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

◆ NPCType< T >()

static int Terraria.ModLoader.ModContent.NPCType< T > ( )
inlinestatic

Get the id (type) of a ModNPC by class. Assumes one instance per class.

Type Constraints
T :ModNPC 

Definition at line 370 of file ModContent.cs.

370 : ModNPC
371 {
372 return GetInstance<T>()?.Type ?? 0;
373 }
static T GetInstance< T >()
Returns the template instance of the provided content type (not the clone/new instance which gets add...
Definition ModContent.cs:42

References Terraria.ModLoader.ModContent.GetInstance< T >().

+ Here is the call graph for this function: