Package net.minecraft.nbt
Class NbtByteArray
- All Implemented Interfaces:
Iterable<NbtByte>,Collection<NbtByte>,List<NbtByte>,NbtElement
public class NbtByteArray extends AbstractNbtList<NbtByte>
Represents an NBT byte array.
-
Field Summary
Fields Modifier and Type Field Description static NbtType<NbtByteArray>TYPEprivate byte[]valueFields inherited from class java.util.AbstractList
modCountFields inherited from interface net.minecraft.nbt.NbtElement
AQUA, GOLD, GREEN, RED -
Constructor Summary
Constructors Constructor Description NbtByteArray(byte[] value)NbtByteArray(List<Byte> value) -
Method Summary
Modifier and Type Method Description booleanaddElement(int index, NbtElement element)voidclear()NbtElementcopy()Copies this NBT element.booleanequals(Object o)NbtByteget(int int2)byte[]getByteArray()bytegetHeldType()Gets the type of element that this list holds.NbtType<NbtByteArray>getNbtType()Gets the NBT type definition of this NBT element.bytegetType()Gets the type of this NBT element.inthashCode()voidmethod_10531(int int2, NbtByte nbtByte)NbtBytemethod_10536(int int2)NbtByteset(int int2, NbtByte nbtByte)booleansetElement(int index, NbtElement element)intsize()private static byte[]toArray(List<Byte> list)StringtoString()TexttoText(String indent, int depth)voidwrite(DataOutput output)Methods inherited from class net.minecraft.nbt.AbstractNbtList
add, removeMethods 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 byte[] value
-
-
Constructor Details
-
NbtByteArray
public NbtByteArray(byte[] value) -
NbtByteArray
-
-
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<NbtByte>
-
copy
Copies this NBT element.- Returns:
- the copied element
-
equals
- Specified by:
equalsin interfaceCollection<NbtByte>- Specified by:
equalsin interfaceList<NbtByte>- Overrides:
equalsin classAbstractList<NbtByte>
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<NbtByte>- Specified by:
hashCodein interfaceList<NbtByte>- Overrides:
hashCodein classAbstractList<NbtByte>
-
toText
-
getByteArray
public byte[] getByteArray() -
size
public int size()- Specified by:
sizein interfaceCollection<NbtByte>- Specified by:
sizein interfaceList<NbtByte>- Specified by:
sizein classAbstractCollection<NbtByte>
-
get
-
set
-
method_10531
-
setElement
- Specified by:
setElementin classAbstractNbtList<NbtByte>
-
addElement
- Specified by:
addElementin classAbstractNbtList<NbtByte>
-
method_10536
-
getHeldType
public byte getHeldType()Gets the type of element that this list holds.- Specified by:
getHeldTypein classAbstractNbtList<NbtByte>- Returns:
- the type of element that this list holds
-
clear
public void clear()- Specified by:
clearin interfaceCollection<NbtByte>- Specified by:
clearin interfaceList<NbtByte>- Overrides:
clearin classAbstractList<NbtByte>
-