/// <summary> /// /// </summary> /// <param name="Tags"></param> /// <returns></returns> public static NBTTagList ToNBT(this ITag[] Tags) { Int32 Count = Tags.Length; var Out = new NBTTagList(NBTTagType.Compound, Count); for (Int32 I = 0; I < Count; I++) { Out.Add(Tags[I]); } return(Out); }
/// <summary> /// /// </summary> /// <param name="Tags"></param> /// <returns></returns> public static NBTTagList ToNBT <T>(this List <T> Tags, String Name) where T : ITag { Int32 Count = Tags.Count; var Out = new NBTTagList(Name, NBTTagType.Compound, Count); for (Int32 I = 0; I < Count; I++) { Out.Add(Tags[I]); } return(Out); }