Esempio n. 1
0
 /// <summary>
 ///     Modifies the a NBT tag in the list.
 /// </summary>
 /// <param name="tag">The tag to be modified.</param>
 /// <param name="info">The new tag to be replaced.</param>
 public void ModifyTag(NbtTag tag, NbtTag info)
 {
     if (NamedNbt)
         dict[tag.Name] = info;
     else
         list[list.IndexOf(tag)] = info;
 }
Esempio n. 2
0
 /// <summary>
 ///     Removes a existing NBT tag in the list.
 /// </summary>
 /// <param name="tag">The tag to be removed.</param>
 public void RemoveTag(NbtTag tag)
 {
     if (NamedNbt)
         dict.Remove(tag.Name);
     else
         list.Remove(tag);
 }
Esempio n. 3
0
 /// <summary>
 ///     Inserts a new NBT tag in the list.
 /// </summary>
 /// <param name="tag">The tag to be inserted.</param>
 public void InsertTag(NbtTag tag)
 {
     if (NamedNbt)
         dict.Add(tag.Name, tag);
     else
         list.Add(tag);
 }