Package net.minecraft.nbt
Class NbtList
- All Implemented Interfaces:
Iterable<NbtElement>,Collection<NbtElement>,List<NbtElement>,NbtElement
public class NbtList extends AbstractNbtList<NbtElement>
Represents an NBT list.
An NBT list holds values of the same NBT type.
The NBT type of an NBT list is determined
once its first element is inserted; empty NBT lists return 0 as their held NBT type.
This class uses the NBT type 9.
- Mappings:
Namespace Name official mxintermediary net/minecraft/class_2499named net/minecraft/nbt/NbtList
-
Field Summary
Fields Modifier and Type Field Description private bytetypestatic NbtType<NbtList>TYPEprivate List<NbtElement>valueFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors Modifier Constructor Description NbtList()privateNbtList(List<NbtElement> list, byte type) -
Method Summary
Modifier and Type Method Description voidaccept(NbtElementVisitor visitor)voidadd(int int2, NbtElement nbtElement)booleanaddElement(int index, NbtElement element)private booleancanAdd(NbtElement element)voidclear()NbtListcopy()Copies this NBT element.booleanequals(Object o)private voidforgetTypeIfEmpty()NbtElementget(int int2)NbtCompoundgetCompound(int index)doublegetDouble(int index)floatgetFloat(int index)bytegetHeldType()Gets the type of element that this list holds.intgetInt(int index)NbtListgetList(int index)NbtType<NbtList>getNbtType()Gets the NBT type definition of this NBT element.shortgetShort(int index)StringgetString(int index)bytegetType()Gets the type of this NBT element.inthashCode()booleanisEmpty()NbtElementremove(int int2)NbtElementset(int int2, NbtElement nbtElement)booleansetElement(int index, NbtElement element)intsize()StringtoString()voidwrite(DataOutput output)Methods inherited from class java.util.AbstractList
add, addAll, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, 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, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayMethods inherited from interface net.minecraft.nbt.NbtElement
asString
-
Field Details
-
TYPE
- Mappings:
Namespace Name Mixin selector official aLmx;a:Lnl;intermediary field_21039Lnet/minecraft/class_2499;field_21039:Lnet/minecraft/class_4614;named TYPELnet/minecraft/nbt/NbtList;TYPE:Lnet/minecraft/nbt/NbtType;
-
value
- Mappings:
Namespace Name Mixin selector official bLmx;b:Ljava/util/List;intermediary field_11550Lnet/minecraft/class_2499;field_11550:Ljava/util/List;named valueLnet/minecraft/nbt/NbtList;value:Ljava/util/List;
-
type
private byte type- Mappings:
Namespace Name Mixin selector official cLmx;c:Bintermediary field_11551Lnet/minecraft/class_2499;field_11551:Bnamed typeLnet/minecraft/nbt/NbtList;type:B
-
-
Constructor Details
-
NbtList
- Mappings:
Namespace Name Mixin selector official <init>Lmx;<init>(Ljava/util/List;B)Vintermediary <init>Lnet/minecraft/class_2499;<init>(Ljava/util/List;B)Vnamed <init>Lnet/minecraft/nbt/NbtList;<init>(Ljava/util/List;B)V
-
NbtList
public NbtList()
-
-
Method Details
-
write
- Throws:
IOException- Mappings:
Namespace Name Mixin selector official aLnj;a(Ljava/io/DataOutput;)Vintermediary method_10713Lnet/minecraft/class_2520;method_10713(Ljava/io/DataOutput;)Vnamed writeLnet/minecraft/nbt/NbtElement;write(Ljava/io/DataOutput;)V
-
getType
public byte getType()Gets the type of this NBT element.- Returns:
- the type
- Mappings:
Namespace Name Mixin selector official aLnj;a()Bintermediary method_10711Lnet/minecraft/class_2520;method_10711()Bnamed getTypeLnet/minecraft/nbt/NbtElement;getType()B
-
getNbtType
Gets the NBT type definition of this NBT element.- Returns:
- the element type definition
- Mappings:
Namespace Name Mixin selector official bLnj;b()Lnl;intermediary method_23258Lnet/minecraft/class_2520;method_23258()Lnet/minecraft/class_4614;named getNbtTypeLnet/minecraft/nbt/NbtElement;getNbtType()Lnet/minecraft/nbt/NbtType;
-
toString
- Specified by:
toStringin interfaceNbtElement- Overrides:
toStringin classAbstractCollection<NbtElement>- Mappings:
Namespace Name Mixin selector official toStringLnj;toString()Ljava/lang/String;intermediary toStringLnet/minecraft/class_2520;toString()Ljava/lang/String;named toStringLnet/minecraft/nbt/NbtElement;toString()Ljava/lang/String;
-
forgetTypeIfEmpty
private void forgetTypeIfEmpty()- Mappings:
Namespace Name Mixin selector official fLmx;f()Vintermediary method_17809Lnet/minecraft/class_2499;method_17809()Vnamed forgetTypeIfEmptyLnet/minecraft/nbt/NbtList;forgetTypeIfEmpty()V
-
remove
- Specified by:
removein interfaceList<NbtElement>- Specified by:
removein classAbstractNbtList<NbtElement>- Mappings:
Namespace Name Mixin selector official method_10536Lmx;method_10536(I)Lnj;intermediary method_10536Lnet/minecraft/class_2499;method_10536(I)Lnet/minecraft/class_2520;named removeLnet/minecraft/nbt/NbtList;remove(I)Lnet/minecraft/nbt/NbtElement;
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<NbtElement>- Specified by:
isEmptyin interfaceList<NbtElement>- Overrides:
isEmptyin classAbstractCollection<NbtElement>- Mappings:
Namespace Name Mixin selector official isEmptyLmx;isEmpty()Zintermediary isEmptyLnet/minecraft/class_2499;isEmpty()Znamed isEmptyLnet/minecraft/nbt/NbtList;isEmpty()Z
-
getCompound
- Mappings:
Namespace Name Mixin selector official aLmx;a(I)Lmr;intermediary method_10602Lnet/minecraft/class_2499;method_10602(I)Lnet/minecraft/class_2487;named getCompoundLnet/minecraft/nbt/NbtList;getCompound(I)Lnet/minecraft/nbt/NbtCompound;
-
getList
- Mappings:
Namespace Name Mixin selector official bLmx;b(I)Lmx;intermediary method_10603Lnet/minecraft/class_2499;method_10603(I)Lnet/minecraft/class_2499;named getListLnet/minecraft/nbt/NbtList;getList(I)Lnet/minecraft/nbt/NbtList;
-
getShort
public short getShort(int index)- Mappings:
Namespace Name Mixin selector official dLmx;d(I)Sintermediary method_10609Lnet/minecraft/class_2499;method_10609(I)Snamed getShortLnet/minecraft/nbt/NbtList;getShort(I)S
-
getInt
public int getInt(int index)- Mappings:
Namespace Name Mixin selector official eLmx;e(I)Iintermediary method_10600Lnet/minecraft/class_2499;method_10600(I)Inamed getIntLnet/minecraft/nbt/NbtList;getInt(I)I
-
getDouble
public double getDouble(int index)- Mappings:
Namespace Name Mixin selector official hLmx;h(I)Dintermediary method_10611Lnet/minecraft/class_2499;method_10611(I)Dnamed getDoubleLnet/minecraft/nbt/NbtList;getDouble(I)D
-
getFloat
public float getFloat(int index)- Mappings:
Namespace Name Mixin selector official iLmx;i(I)Fintermediary method_10604Lnet/minecraft/class_2499;method_10604(I)Fnamed getFloatLnet/minecraft/nbt/NbtList;getFloat(I)F
-
getString
- Mappings:
Namespace Name Mixin selector official jLmx;j(I)Ljava/lang/String;intermediary method_10608Lnet/minecraft/class_2499;method_10608(I)Ljava/lang/String;named getStringLnet/minecraft/nbt/NbtList;getString(I)Ljava/lang/String;
-
size
public int size()- Specified by:
sizein interfaceCollection<NbtElement>- Specified by:
sizein interfaceList<NbtElement>- Specified by:
sizein classAbstractCollection<NbtElement>- Mappings:
Namespace Name Mixin selector official sizeLmx;size()Iintermediary sizeLnet/minecraft/class_2499;size()Inamed sizeLnet/minecraft/nbt/NbtList;size()I
-
get
- Specified by:
getin interfaceList<NbtElement>- Specified by:
getin classAbstractList<NbtElement>- Mappings:
Namespace Name Mixin selector official kLmx;k(I)Lnj;intermediary method_10534Lnet/minecraft/class_2499;method_10534(I)Lnet/minecraft/class_2520;named getLnet/minecraft/nbt/NbtList;get(I)Lnet/minecraft/nbt/NbtElement;
-
set
- Specified by:
setin interfaceList<NbtElement>- Specified by:
setin classAbstractNbtList<NbtElement>- Mappings:
Namespace Name Mixin selector official method_10606Lmx;method_10606(ILnj;)Lnj;intermediary method_10606Lnet/minecraft/class_2499;method_10606(ILnet/minecraft/class_2520;)Lnet/minecraft/class_2520;named setLnet/minecraft/nbt/NbtList;set(ILnet/minecraft/nbt/NbtElement;)Lnet/minecraft/nbt/NbtElement;
-
add
- Specified by:
addin interfaceList<NbtElement>- Specified by:
addin classAbstractNbtList<NbtElement>- Mappings:
Namespace Name Mixin selector official method_10531Lmx;method_10531(ILnj;)Vintermediary method_10531Lnet/minecraft/class_2499;method_10531(ILnet/minecraft/class_2520;)Vnamed addLnet/minecraft/nbt/NbtList;add(ILnet/minecraft/nbt/NbtElement;)V
-
setElement
- Specified by:
setElementin classAbstractNbtList<NbtElement>- Mappings:
Namespace Name Mixin selector official aLmq;a(ILnj;)Zintermediary method_10535Lnet/minecraft/class_2483;method_10535(ILnet/minecraft/class_2520;)Znamed setElementLnet/minecraft/nbt/AbstractNbtList;setElement(ILnet/minecraft/nbt/NbtElement;)Z
-
addElement
- Specified by:
addElementin classAbstractNbtList<NbtElement>- Mappings:
Namespace Name Mixin selector official bLmq;b(ILnj;)Zintermediary method_10533Lnet/minecraft/class_2483;method_10533(ILnet/minecraft/class_2520;)Znamed addElementLnet/minecraft/nbt/AbstractNbtList;addElement(ILnet/minecraft/nbt/NbtElement;)Z
-
canAdd
- Mappings:
Namespace Name Mixin selector official aLmx;a(Lnj;)Zintermediary method_10605Lnet/minecraft/class_2499;method_10605(Lnet/minecraft/class_2520;)Znamed canAddLnet/minecraft/nbt/NbtList;canAdd(Lnet/minecraft/nbt/NbtElement;)Z
-
copy
Description copied from interface:NbtElementCopies this NBT element.- Returns:
- the copied element
- Mappings:
Namespace Name Mixin selector official dLmx;d()Lmx;intermediary method_10612Lnet/minecraft/class_2499;method_10612()Lnet/minecraft/class_2499;named copyLnet/minecraft/nbt/NbtList;copy()Lnet/minecraft/nbt/NbtList;
-
equals
- Specified by:
equalsin interfaceCollection<NbtElement>- Specified by:
equalsin interfaceList<NbtElement>- Overrides:
equalsin classAbstractList<NbtElement>- Mappings:
Namespace Name Mixin selector official equalsLmx;equals(Ljava/lang/Object;)Zintermediary equalsLnet/minecraft/class_2499;equals(Ljava/lang/Object;)Znamed equalsLnet/minecraft/nbt/NbtList;equals(Ljava/lang/Object;)Z
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<NbtElement>- Specified by:
hashCodein interfaceList<NbtElement>- Overrides:
hashCodein classAbstractList<NbtElement>- Mappings:
Namespace Name Mixin selector official hashCodeLmx;hashCode()Iintermediary hashCodeLnet/minecraft/class_2499;hashCode()Inamed hashCodeLnet/minecraft/nbt/NbtList;hashCode()I
-
accept
- Mappings:
Namespace Name Mixin selector official aLnj;a(Lnn;)Vintermediary method_32289Lnet/minecraft/class_2520;method_32289(Lnet/minecraft/class_5627;)Vnamed acceptLnet/minecraft/nbt/NbtElement;accept(Lnet/minecraft/nbt/visitor/NbtElementVisitor;)V
-
getHeldType
public byte getHeldType()Gets the type of element that this list holds.- Specified by:
getHeldTypein classAbstractNbtList<NbtElement>- Returns:
- the type of element that this list holds
- Mappings:
Namespace Name Mixin selector official d_Lmq;d_()Bintermediary method_10601Lnet/minecraft/class_2483;method_10601()Bnamed getHeldTypeLnet/minecraft/nbt/AbstractNbtList;getHeldType()B
-
clear
public void clear()- Specified by:
clearin interfaceCollection<NbtElement>- Specified by:
clearin interfaceList<NbtElement>- Overrides:
clearin classAbstractList<NbtElement>- Mappings:
Namespace Name Mixin selector official clearLmx;clear()Vintermediary clearLnet/minecraft/class_2499;clear()Vnamed clearLnet/minecraft/nbt/NbtList;clear()V
-