Ejemplo n.º 1
0
 public T Get <T>(string key)
 {
     dict.TryGetValue(key, out object tag);
     try {
         return(TagIO.Deserialize <T>(tag));
     }
     catch (Exception e) {
         throw new IOException(
                   $"NBT Deserialization (type={typeof(T)}," +
                   $"entry={TagPrinter.Print(new KeyValuePair<string, object>(key, tag))})", e);
     }
 }
Ejemplo n.º 2
0
 public override string ToString()
 {
     return(TagPrinter.Print(this));
 }