diff --git a/SubstrateCS/Source/Nbt/TagNodeList.cs b/SubstrateCS/Source/Nbt/TagNodeList.cs index 8cbc01e..c2dc021 100644 --- a/SubstrateCS/Source/Nbt/TagNodeList.cs +++ b/SubstrateCS/Source/Nbt/TagNodeList.cs @@ -84,6 +84,16 @@ namespace Substrate.Nbt return list; } + /// + /// Finds the first subnode that matches the conditions defined by the specified predicate. + /// + /// The delegate that defines the conditions of the subnode to search for. + /// The first subnode matching the predicate. + public TagNode Find (Predicate match) + { + return _items.Find(match); + } + /// /// Retrieves all the subnodes that match the conditions defined by the specified predicate. /// @@ -104,6 +114,32 @@ namespace Substrate.Nbt return _items.RemoveAll(match); } + /// + /// Reverses the order of all the subnodes in the list. + /// + public void Reverse () + { + _items.Reverse(); + } + + /// + /// Reverse the order of subnodes in the specified range. + /// + /// The zero-based starting index of the subnodes to reverse + /// The number of subnodes in the range to reverse. + public void Reverse (int index, int count) + { + _items.Reverse(index, count); + } + + /// + /// Sorts all the subnodes in the list using the default comparator + /// + public void Sort () + { + _items.Sort(); + } + /// /// Gets a string representation of the node's data. ///