tModLoader v2024.06
A mod to make and play Terraria mods
TagIO Class Reference

Static Public Member Functions

static T Clone< T > (T o)
 
static object Deserialize (Type type, object? tag)
 
static T Deserialize< T > (object? tag)
 
static TagCompound FromFile (string path, bool compressed=true)
 
static TagCompound FromStream (Stream stream, bool compressed=true)
 
static TagCompound Read (BinaryReader reader)
 
static ? object ReadTag (BinaryReader r, out string? name)
 
static ? object ReadTagImpl (int id, BinaryReader r)
 
static object Serialize (object value)
 
static void ToFile (TagCompound root, string path, bool compress=true)
 
static void ToStream (TagCompound root, Stream stream, bool compress=true)
 
static void Write (TagCompound root, BinaryWriter writer)
 Writes the TagCompound to the writer. Please don't use this to send TagCompound over the network if you can avoid it. If you have to, consider using ToStream(TagCompound, Stream, bool)/FromStream(Stream, bool) with compress: true.
 
static void WriteTag (string name, object tag, BinaryWriter w)
 

Member Function Documentation

◆ Clone< T >()

static T TagIO.Clone< T > ( o)
static
Type Constraints
T :notnull 
T :T 
T :GetHandler 
T :GetPayloadId 
T :o.GetType() 
T :Clone 
T :o