tModLoader v2024.03
A mod to make and play Terraria mods
ILoadable Interface Referenceabstract

Allows for implementing types to be loaded and unloaded. More...

Inherited by ModType< EmoteBubble, ModEmoteBubble >, ModType< Item, ModItem >, ModType< Mount.MountData, ModMount >, ModType< NPC, ModNPC >, ModType< Player, ModPlayer >, ModType< Projectile, ModProjectile >, ModType< TEntity >, AShoppingBiome, IPlant, ModTileEntity, and ModType< TEntity, TModType >.

Public Member Functions

virtual bool IsLoadingEnabled (Mod mod)
 Whether or not this type should be loaded when it's told to. Returning false disables Mod.AddContent from actually loading this type. More...
 
abstract void Load (Mod mod)
 Called when loading the type. More...
 
abstract void Unload ()
 Called during unloading when needed. More...
 

Detailed Description

Allows for implementing types to be loaded and unloaded.

Member Function Documentation

◆ IsLoadingEnabled()

virtual bool ILoadable.IsLoadingEnabled ( Mod  mod)
virtual

Whether or not this type should be loaded when it's told to. Returning false disables Mod.AddContent from actually loading this type.

Parameters
modThe mod instance trying to add this content

Implemented in ModTileEntity, ModType< TEntity, TModType >, ModType< EmoteBubble, ModEmoteBubble >, ModType< Item, ModItem >, ModType< Mount.MountData, ModMount >, ModType< NPC, ModNPC >, ModType< Player, ModPlayer >, ModType< Projectile, ModProjectile >, and ModType< TEntity >.

◆ Load()

abstract void ILoadable.Load ( Mod  mod)
pure virtual

Called when loading the type.

Parameters
modThe mod instance associated with this type.

Implemented in IPlant, and ModTileEntity.

◆ Unload()