|
tModLoader v2025.09
A mod to make and play Terraria mods
|
Handles conditional variants for Items, commonly used for secret seeds. More...
Classes | |
| class | VariantEntry |
Static Public Member Functions | |
| static void | AddVariant (int itemId, ItemVariant variant, params ItemVariantCondition[] conditions) |
| Registers an ItemVariant for the given Item.type. More... | |
| static IEnumerable< VariantEntry > | GetVariants (int itemId) |
| Gets all of the ItemVariants associated with itemId . More... | |
| static bool | HasVariant (int itemId, ItemVariant variant) |
| Determines if an Item.type has a particular ItemVariant. More... | |
| static ItemVariant | SelectVariant (int itemId) |
| Determines which ItemVariant should be applied to an item of type itemId . More... | |
Static Public Attributes | |
| static ItemVariant | DisabledBossSummonVariant |
| Represents a variant of a boss summoning item that is conditionally disabled. | |
| static ItemVariant | EnabledVariant |
| Represents a variant of an item that is conditionally enabled. | |
| static ItemVariant | RebalancedVariant |
| Represents the rebalanced variant of items used on the "For the Worthy" seed. | |
| static ItemVariant | StrongerVariant |
| Represents the stronger variant of items used on the Remix seed. | |
| static ItemVariant | WeakerVariant |
| Represents the weaker variant of items used on the Remix seed. | |
Handles conditional variants for Items, commonly used for secret seeds.
|
static |
Registers an ItemVariant for the given Item.type.
| itemId | The Item.type to register the ItemVariant for. |
| variant | The ItemVariant to register to itemId . |
| conditions | The conditions under which Items of type itemId will have variant applied. (SelectVariant(int)) |
|
static |
Gets all of the ItemVariants associated with itemId .
| itemId | The Item.type to get ItemVariants for. |
|
static |
Determines if an Item.type has a particular ItemVariant.
| itemId | The Item.type to check. |
| variant | The ItemVariant to check for. |
true if itemId has a registered ItemVariant of type variant , false otherwise.This method only checks if the given ItemVariant exists, not if it will be applied.
|
static |
Determines which ItemVariant should be applied to an item of type itemId .
| itemId | The Item.type to check. |
null if no appropriate ItemVariant exists.