tModLoader v2024.05
A mod to make and play Terraria mods
EntitySource_ItemOpen Class Reference

Used when opening bags or gifts. Passed to Player.QuickSpawnItem(IEntitySource, Item, int) More...

Inherits IEntitySource.

Public Member Functions

 EntitySource_ItemOpen (Player player, int itemType, string? context=null)
 

Properties

string? Context [get]
 Additional context identifier, particularly useful for set bonuses or accessory affects. See ItemSourceID and ProjectileSourceID for vanilla uses More...
 
int ItemType [get]
 The type of item being opened
 
Player Player [get]
 The player opening the item
 
- Properties inherited from IEntitySource
string? Context [get]
 Additional context identifier, particularly useful for set bonuses or accessory affects. See ItemSourceID and ProjectileSourceID for vanilla uses More...
 

Detailed Description

Used when opening bags or gifts. Passed to Player.QuickSpawnItem(IEntitySource, Item, int)

Property Documentation

◆ Context

string? EntitySource_ItemOpen.Context
get

Additional context identifier, particularly useful for set bonuses or accessory affects. See ItemSourceID and ProjectileSourceID for vanilla uses

Implements IEntitySource.