Table of Contents

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

value int[]

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

value is null.

NbtIntArray(string?)

Creates an NbtIntArray tag with the given name, containing an empty array of ints.

public NbtIntArray(string? tagName)

Parameters

tagName string

Name 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

tagName string

Name to assign to this tag. May be null.

value int[]

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

value is null.

NbtIntArray(NbtIntArray)

Creates a deep copy of given NbtIntArray.

public NbtIntArray(NbtIntArray other)

Parameters

other NbtIntArray

Tag to copy. May not be null.

Remarks

Int array of given tag will be cloned.

Exceptions

ArgumentNullException

other is null.

Properties

this[int]

Gets or sets an integer at the given index.

public int this[int tagIndex] { get; set; }

Parameters

tagIndex int

The zero-based index of the element to get or set.

Property Value

int

The integer at the specified index.

Exceptions

IndexOutOfRangeException

tagIndex is outside the array bounds.

TagType

Type of this tag (ByteArray).

public override NbtTagType TagType { get; }

Property Value

NbtTagType

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

value is null.

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.