tModLoader v2024.03
A mod to make and play Terraria mods
IEntitySource Interface Reference

This object encapsulates context information about the source of a particular spawning event of an Item/Projectile/NPC/etc. Aids in facilitating many modding situations and used in various OnSpawn hooks.
The IEntitySource Guideteaches how and why to use this. More...

Inherited by AEntitySource_Tile, EntitySource_BossSpawn, EntitySource_DebugCommand, EntitySource_Film, EntitySource_FishedOut, EntitySource_ItemOpen, EntitySource_Misc, EntitySource_OldOnesArmy, EntitySource_OverfullInventory, EntitySource_Parent, EntitySource_RevengeSystem, EntitySource_SpawnNPC, EntitySource_Sync, EntitySource_TileEntity, EntitySource_WorldEvent, and EntitySource_WorldGen.

Classes

struct  FallbackSourceRef
 

Properties

string? Context [get]
 Additional context identifier, particularly useful for set bonuses or accessory affects. See ItemSourceID and ProjectileSourceID for vanilla uses More...
 

Detailed Description

This object encapsulates context information about the source of a particular spawning event of an Item/Projectile/NPC/etc. Aids in facilitating many modding situations and used in various OnSpawn hooks.
The IEntitySource Guide

teaches how and why to use this.

Property Documentation

◆ Context

string? IEntitySource.Context
get