/// <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; }
/// <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); }
/// <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); }