/// <summary>Creates an this <see cref="ITag"/> that suits the given information</summary> /// <param name="Name">The name of the Tag</param> /// <param name="Value">The value of the receiving tag</param> /// <returns>Creates an this <see cref="ITag"/> that suits the given information</returns> public static ITag Create(String Name, List <Boolean> Value) { (ITag Out, Type TagType) = NBTTagFactory.CreateList(Name, NBTTagType.Byte); Int32 Count = Value.Count; ITag SubTag; for (Int32 I = 0; I < Count; I++) { SubTag = (ITag)Activator.CreateInstance(TagType); SubTag.SetValue((Byte)(Value[I] ? 1 : 0)); Out.Add(SubTag); } return(Out); }
/// <summary>Creates an this <see cref="ITag"/> that suits the given information</summary> /// <param name="Name">The name of the Tag</param> /// <param name="Value">The value of the receiving tag</param> /// <returns>Creates an this <see cref="ITag"/> that suits the given information</returns> public static ITag Create(String Name, List <Single> Value) { (ITag Out, Type TagType) = NBTTagFactory.CreateList(Name, NBTTagType.Float); NBTTagFactory.Transfer(Out, TagType, Value); return(Out); }