/// <summary>Creates a new instance of <see cref="NBTWriter"/></summary>
        static NBTWriter()
        {
            NBTWriter.Writers = new Dictionary <NBTTagType, ITagWriter>();

            List <ITagWriter> Writers = Utillity.GetInterfaces <ITagWriter>();
            Int32             Length  = Writers.Count;

            for (Int32 I = 0; I < Length; I++)
            {
                for (Int32 J = 0; J < Writers[I].ForType.Length; J++)
                {
                    NBTWriter.Writers[Writers[I].ForType[J]] = Writers[I];
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>Creates a new instance of <see cref="NBTReader"/></summary>
        static NBTReader()
        {
            NBTReader.Readers = new Dictionary <NBTTagType, ITagReader>();

            List <ITagReader> Readers = Utillity.GetInterfaces <ITagReader>();
            Int32             Length  = Readers.Count;

            for (Int32 I = 0; I < Length; I++)
            {
                for (Int32 J = 0; J < Readers[I].ForType.Length; J++)
                {
                    NBTReader.Readers[Readers[I].ForType[J]] = Readers[I];
                }
            }
        }