tModLoader v2024.11
A mod to make and play Terraria mods
EntityDefinition Class Reference

Classes implementing EntityDefinition serve to function as a way to save and load the identities of various Terraria objects. Only the identity is preserved, no other data such as stack size, damage, etc. These classes are well suited for ModConfig, but can be saved and loaded in a TagCompound as well. More...

Inherits TagSerializable.

Inherited by BuffDefinition, ItemDefinition, NPCDefinition, PrefixDefinition, ProjectileDefinition, and TileDefinition.

Public Member Functions

 EntityDefinition (string key)
 
 EntityDefinition (string mod, string name)
 
override bool Equals (object obj)
 
override int GetHashCode ()
 
TagCompound SerializeData ()
 
override string ToString ()
 
TagCompound SerializeData ()
 

Public Attributes

string Mod
 
string Name
 

Properties

virtual string DisplayName [get]
 
virtual bool IsUnloaded [get]
 
abstract int Type [get]
 

Detailed Description

Classes implementing EntityDefinition serve to function as a way to save and load the identities of various Terraria objects. Only the identity is preserved, no other data such as stack size, damage, etc. These classes are well suited for ModConfig, but can be saved and loaded in a TagCompound as well.

Member Function Documentation

◆ SerializeData()

TagCompound EntityDefinition.SerializeData ( )

Implements TagSerializable.