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

◆ Find< T >()

T Terraria.ModLoader.Mod.Find< T > ( string name)
inlineinherited

Attempts to find the template instance from this mod with the specified name (not the clone/new instance which gets added to Items/Players/NPCs etc. as the game is played). Caching the result is recommended.

This will throw exceptions on failure.

Exceptions
T:System.Collections.Generic.KeyNotFoundException
Type Constraints
T :IModType 

Definition at line 216 of file Mod.cs.

216 : IModType
217 {
218 return ModContent.Find<T>(Name, name);
219 }
virtual string Name
Stores the name of the mod. This name serves as the mod's identification, and also helps with saving ...
Definition Mod.cs:66

References Terraria.ModLoader.Mod.Name.