Terraria ModLoader  0.11.4
A framework for Terraria mods
Terraria.ModLoader.Config.ItemDefinition Class Reference

ItemDefinition represents an Item identity. A typical use for this class is usage in ModConfig, perhapse to facilitate an Item tweaking mod. More...

+ Inheritance diagram for Terraria.ModLoader.Config.ItemDefinition:
+ Collaboration diagram for Terraria.ModLoader.Config.ItemDefinition:

Public Member Functions

 ItemDefinition ()
 
 ItemDefinition (int type)
 
 ItemDefinition (string key)
 
 ItemDefinition (string mod, string name)
 
- Public Member Functions inherited from Terraria.ModLoader.Config.EntityDefinition
 EntityDefinition ()
 
 EntityDefinition (string mod, string name)
 
 EntityDefinition (string key)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
TagCompound SerializeData ()
 
override string ToString ()
 

Static Public Member Functions

static ItemDefinition FromString (string s)
 
static ItemDefinition Load (TagCompound tag)
 

Public Attributes

override int Type => ItemID.TypeFromUniqueKey(base.mod, base.name)
 
- Public Attributes inherited from Terraria.ModLoader.Config.EntityDefinition
bool IsUnloaded => Type == 0 && !(mod == "Terraria" && name == "None" || mod == "" && name == "")
 
string mod
 
string name
 

Static Public Attributes

static readonly Func< TagCompound, ItemDefinitionDESERIALIZER = Load
 

Additional Inherited Members

- Properties inherited from Terraria.ModLoader.Config.EntityDefinition
abstract int Type [get]
 

Detailed Description

ItemDefinition represents an Item identity. A typical use for this class is usage in ModConfig, perhapse to facilitate an Item tweaking mod.

Definition at line 74 of file EntityDefinition.cs.

Constructor & Destructor Documentation

Terraria.ModLoader.Config.ItemDefinition.ItemDefinition ( )

Definition at line 76 of file EntityDefinition.cs.

76  : base() {
77  }
Terraria.ModLoader.Config.ItemDefinition.ItemDefinition ( int  type)

Definition at line 78 of file EntityDefinition.cs.

78  : base(ItemID.GetUniqueKey(type)) {
79  }
Terraria.ModLoader.Config.ItemDefinition.ItemDefinition ( string  key)

Definition at line 80 of file EntityDefinition.cs.

80  : base(key) {
81  }
Terraria.ModLoader.Config.ItemDefinition.ItemDefinition ( string  mod,
string  name 
)

Member Function Documentation

static ItemDefinition Terraria.ModLoader.Config.ItemDefinition.FromString ( string  s)
static
static ItemDefinition Terraria.ModLoader.Config.ItemDefinition.Load ( TagCompound  tag)
static

Member Data Documentation

readonly Func<TagCompound, ItemDefinition> Terraria.ModLoader.Config.ItemDefinition.DESERIALIZER = Load
static

Definition at line 89 of file EntityDefinition.cs.

override int Terraria.ModLoader.Config.ItemDefinition.Type => ItemID.TypeFromUniqueKey(base.mod, base.name)

Definition at line 85 of file EntityDefinition.cs.