NbtList
Namespace Mc.Scripting.Nbt · Kind class (sealed)
public sealed class NbtList : NbtTag, ICollection<NbtTag>, IEnumerable, IEnumerable<NbtTag>, IList<NbtTag>A list of tags of one type.
Constructors
Section titled “Constructors”| Member | Description |
|---|---|
NbtList() |
Creates an empty list. |
NbtList(IEnumerable<NbtTag> items) |
Creates a list with items. |
Constructor
Section titled “Constructor”public NbtList()Creates an empty list.
Constructor
Section titled “Constructor”public NbtList(IEnumerable<NbtTag> items)Creates a list with items.
Parameters
| Name | Type | Description |
|---|---|---|
items |
IEnumerable<NbtTag> |
The items (all of one type). |
Properties
Section titled “Properties”| Member | Description |
|---|---|
int Count { get; } |
|
NbtType ElementType { get; } |
The type of the items (End while the list is empty). |
bool IsReadOnly { get; } |
|
override NbtType Type { get; } |
public int Count { get; }ElementType
Section titled “ElementType”public NbtType ElementType { get; }The type of the items (End while the list is empty).
IsReadOnly
Section titled “IsReadOnly”public bool IsReadOnly { get; }public override NbtType Type { get; }Indexers
Section titled “Indexers”| Member | Description |
|---|---|
NbtTag this[int index] { get; set; } |
this[]
Section titled “this[]”public NbtTag this[int index] { get; set; }Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
Methods
Section titled “Methods”public void Add(NbtTag item)Parameters
| Name | Type | Description |
|---|---|---|
item |
NbtTag |
public void Clear()public override NbtTag Clone()Returns NbtTag
Contains
Section titled “Contains”public bool Contains(NbtTag item)Parameters
| Name | Type | Description |
|---|---|---|
item |
NbtTag |
Returns bool
CopyTo
Section titled “CopyTo”public void CopyTo(NbtTag[] array, int arrayIndex)Parameters
| Name | Type | Description |
|---|---|---|
array |
NbtTag[] |
|
arrayIndex |
int |
GetEnumerator
Section titled “GetEnumerator”public IEnumerator<NbtTag> GetEnumerator()Returns IEnumerator<NbtTag>
IndexOf
Section titled “IndexOf”public int IndexOf(NbtTag item)Parameters
| Name | Type | Description |
|---|---|---|
item |
NbtTag |
Returns int
Insert
Section titled “Insert”public void Insert(int index, NbtTag item)Parameters
| Name | Type | Description |
|---|---|---|
index |
int |
|
item |
NbtTag |
Remove
Section titled “Remove”public bool Remove(NbtTag item)Parameters
| Name | Type | Description |
|---|---|---|
item |
NbtTag |
Returns bool
RemoveAt
Section titled “RemoveAt”public void RemoveAt(int index)Parameters
| Name | Type | Description |
|---|---|---|
index |
int |