![]() |
tModLoader v2025.08
A mod to make and play Terraria mods
|
Public Member Functions | |
delegate void | ItemCraftEvent (short itemId, int count) |
delegate void | ItemPickupEvent (Player player, short itemId, int count) |
delegate void | NPCKilledEvent (Player player, short npcId) |
delegate void | ProgressionEventEvent (int eventID) |
delegate void | TileDestroyedEvent (Player player, ushort tileId) |
Static Public Member Functions | |
static void | CheckMechaMayhem (int justKilled=-1) |
static void | HandleAnglerService () |
static void | HandleMining () |
static void | HandleNurseService (int coinsSpent) |
static void | HandleOnEquip (Player player, Item item, int context) |
static void | HandleRunning (float pixelsMoved) |
static void | HandleSpecialEvent (Player player, int eventID) |
static void | Initialize () |
static void | NotifyItemCraft (Recipe recipe) |
static void | NotifyItemPickup (Player player, Item item) |
static void | NotifyItemPickup (Player player, Item item, int customStack) |
static void | NotifyNPCKilled (NPC npc) |
static void | NotifyNPCKilledDirect (Player player, int npcNetID) |
static void | NotifyProgressionEvent (int eventID) |
static void | NotifyTileDestroyed (Player player, ushort tile) |
Properties | |
static bool | CurrentlyMining [get, set] |
Tracks if the local player is actively mining to determine if TileDestroyedCondition should be satisfied or not. Modders can set to true before any custom action that should count as player controlled mining and set to false after. This prevents world updates that happen to kill tiles from satisfying TileDestroyedCondition, to avoid rewarding players for mining tiles they didn't actually mine. | |
Events | |
static ItemCraftEvent | OnItemCraft |
static ItemPickupEvent | OnItemPickup |
static NPCKilledEvent | OnNPCKilled |
Called when an NPC is killed and the local player damaged/"interacted" with the NPC (NPC.playerInteraction). Unlike ModLoader.ModNPC.OnKill, this will be called on clients in multiplayer (if they damaged the NPC), making it suitable for Achievement logic. | |
static ProgressionEventEvent | OnProgressionEvent |
static TileDestroyedEvent | OnTileDestroyed |