Package net.minecraft.nbt
Class NbtLongArray
- All Implemented Interfaces:
Iterable<NbtLong>,Collection<NbtLong>,List<NbtLong>,NbtElement
public class NbtLongArray extends AbstractNbtList<NbtLong>
Represents an NBT 64-bit integer array.
-
Field Summary
Fields Modifier and Type Field Description static NbtType<NbtLongArray>TYPEprivate long[]valueFields inherited from class java.util.AbstractList
modCountFields inherited from interface net.minecraft.nbt.NbtElement
AQUA, GOLD, GREEN, RED -
Constructor Summary
Constructors Constructor Description NbtLongArray(long[] value)NbtLongArray(LongSet value)NbtLongArray(List<Long> value) -
Method Summary
Modifier and Type Method Description voidadd(int int2, NbtLong nbtLong)booleanaddElement(int index, NbtElement element)voidclear()NbtLongArraycopy()Copies this NBT element.booleanequals(Object o)NbtLongget(int int2)bytegetHeldType()Gets the type of element that this list holds.long[]getLongArray()NbtType<NbtLongArray>getNbtType()Gets the NBT type definition of this NBT element.bytegetType()Gets the type of this NBT element.inthashCode()NbtLongmethod_10606(int int2, NbtLong nbtLong)NbtLongremove(int int2)booleansetElement(int index, NbtElement element)intsize()private static long[]toArray(List<Long> list)StringtoString()TexttoText(String indent, int depth)voidwrite(DataOutput output)Methods inherited from class net.minecraft.nbt.AbstractNbtList
setMethods inherited from class java.util.AbstractList
add, addAll, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayMethods inherited from interface net.minecraft.nbt.NbtElement
asString, toText
-
Field Details
-
TYPE
-
value
private long[] value
-
-
Constructor Details
-
NbtLongArray
public NbtLongArray(long[] value) -
NbtLongArray
-
NbtLongArray
-
-
Method Details
-
toArray
-
write
- Throws:
IOException
-
getType
public byte getType()Gets the type of this NBT element.- Returns:
- the type
-
getNbtType
Gets the NBT type definition of this NBT element.- Returns:
- the element type definition
-
toString
- Specified by:
toStringin interfaceNbtElement- Overrides:
toStringin classAbstractCollection<NbtLong>
-
copy
Description copied from interface:NbtElementCopies this NBT element.- Returns:
- the copied element
-
equals
- Specified by:
equalsin interfaceCollection<NbtLong>- Specified by:
equalsin interfaceList<NbtLong>- Overrides:
equalsin classAbstractList<NbtLong>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<NbtLong>- Specified by:
hashCodein interfaceList<NbtLong>- Overrides:
hashCodein classAbstractList<NbtLong>
-
toText
-
getLongArray
public long[] getLongArray() -
size
public int size()- Specified by:
sizein interfaceCollection<NbtLong>- Specified by:
sizein interfaceList<NbtLong>- Specified by:
sizein classAbstractCollection<NbtLong>
-
get
-
method_10606
-
add
-
setElement
- Specified by:
setElementin classAbstractNbtList<NbtLong>
-
addElement
- Specified by:
addElementin classAbstractNbtList<NbtLong>
-
remove
-
getHeldType
public byte getHeldType()Gets the type of element that this list holds.- Specified by:
getHeldTypein classAbstractNbtList<NbtLong>- Returns:
- the type of element that this list holds
-
clear
public void clear()- Specified by:
clearin interfaceCollection<NbtLong>- Specified by:
clearin interfaceList<NbtLong>- Overrides:
clearin classAbstractList<NbtLong>
-