Class NbtIntArray
- Namespace
- fNbt
- Assembly
- fNbt.dll
A tag containing an array of signed 32-bit integers.
public sealed class NbtIntArray : NbtTag, ICloneable
- Inheritance
-
NbtIntArray
- Implements
- Inherited Members
Constructors
NbtIntArray()
Creates an unnamed NbtIntArray tag, containing an empty array of ints.
public NbtIntArray()
NbtIntArray(int[])
Creates an unnamed NbtIntArray tag, containing the given array of ints.
public NbtIntArray(int[] value)
Parameters
valueint[]Int array to assign to this tag's Value. May not be
null.
Remarks
Given int array will be cloned. To avoid unnecessary copying, call one of the other constructor overloads (that do not take a int[]) and then set the Value property yourself.
Exceptions
- ArgumentNullException
valueisnull.
NbtIntArray(string?)
Creates an NbtIntArray tag with the given name, containing an empty array of ints.
public NbtIntArray(string? tagName)
Parameters
tagNamestringName to assign to this tag. May be
null.
NbtIntArray(string?, int[])
Creates an NbtIntArray tag with the given name, containing the given array of ints.
public NbtIntArray(string? tagName, int[] value)
Parameters
tagNamestringName to assign to this tag. May be
null.valueint[]Int array to assign to this tag's Value. May not be
null.
Remarks
Given int array will be cloned. To avoid unnecessary copying, call one of the other constructor overloads (that do not take a int[]) and then set the Value property yourself.
Exceptions
- ArgumentNullException
valueisnull.
NbtIntArray(NbtIntArray)
Creates a deep copy of given NbtIntArray.
public NbtIntArray(NbtIntArray other)
Parameters
otherNbtIntArrayTag to copy. May not be
null.
Remarks
Int array of given tag will be cloned.
Exceptions
- ArgumentNullException
otherisnull.
Properties
this[int]
Gets or sets an integer at the given index.
public int this[int tagIndex] { get; set; }
Parameters
tagIndexintThe zero-based index of the element to get or set.
Property Value
- int
The integer at the specified index.
Exceptions
- IndexOutOfRangeException
tagIndexis outside the array bounds.
TagType
Type of this tag (ByteArray).
public override NbtTagType TagType { get; }
Property Value
Value
Value/payload of this tag (an array of signed 32-bit integers). Value is stored as-is and is NOT cloned. May not be null.
public int[] Value { get; set; }
Property Value
- int[]
Exceptions
- ArgumentNullException
valueisnull.
Methods
Clone()
Creates a deep copy of this tag.
public override object Clone()
Returns
- object
A new NbtTag object that is a deep copy of this instance.