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

◆ ItemType< T >()

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

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

Type Constraints
T :ModItem 

Definition at line 297 of file ModContent.cs.

297 : ModItem
298 {
299 return GetInstance<T>()?.Type ?? 0;
300 }
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: