Package net.minecraft.nbt
Class NbtList
- All Implemented Interfaces:
Iterable<NbtElement>
,Collection<NbtElement>
,List<NbtElement>
,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 NULL_TYPE
as their held NBT type.
- Mappings:
Namespace Name official oh
intermediary net/minecraft/class_2499
named net/minecraft/nbt/NbtList
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
private byte
private final List<NbtElement>
Fields inherited from class java.util.AbstractList
modCount
Fields inherited from interface net.minecraft.nbt.NbtElement
BYTE_ARRAY_TYPE, BYTE_TYPE, COMPOUND_TYPE, DOUBLE_TYPE, field_33246, field_33247, field_33248, field_33249, field_33264, FLOAT_TYPE, INT_ARRAY_TYPE, INT_TYPE, LIST_TYPE, LONG_ARRAY_TYPE, LONG_TYPE, NULL_TYPE, NUMBER_TYPE, SHORT_TYPE, STRING_TYPE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(NbtElementVisitor visitor) void
add
(int int2, NbtElement nbtElement) boolean
addElement
(int index, NbtElement element) private boolean
canAdd
(NbtElement element) void
clear()
copy()
Copies this NBT element.boolean
private void
get
(int int2) getCompound
(int index) double
getDouble
(int index) float
getFloat
(int index) byte
Gets the type of element that this list holds.int
getInt
(int index) int[]
getIntArray
(int index) getList
(int index) long[]
getLongArray
(int index) Gets the NBT type definition of this NBT element.short
getShort
(int index) getString
(int index) byte
getType()
Gets the type of this NBT element.int
hashCode()
boolean
isEmpty()
remove
(int int2) set
(int int2, NbtElement nbtElement) boolean
setElement
(int index, NbtElement element) int
size()
toString()
void
write
(DataOutput output) Methods inherited from class java.util.AbstractList
add, addAll, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArray
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addAll, contains, containsAll, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
Methods inherited from interface net.minecraft.nbt.NbtElement
asString
-
Field Details
-
field_33199
private static final int field_33199- See Also:
- Mappings:
Namespace Name Mixin selector official b
Loh;b:I
intermediary field_33199
Lnet/minecraft/class_2499;field_33199:I
named field_33199
Lnet/minecraft/nbt/NbtList;field_33199:I
-
TYPE
- Mappings:
Namespace Name Mixin selector official a
Loh;a:Lov;
intermediary field_21039
Lnet/minecraft/class_2499;field_21039:Lnet/minecraft/class_4614;
named TYPE
Lnet/minecraft/nbt/NbtList;TYPE:Lnet/minecraft/nbt/NbtType;
-
value
- Mappings:
Namespace Name Mixin selector official c
Loh;c:Ljava/util/List;
intermediary field_11550
Lnet/minecraft/class_2499;field_11550:Ljava/util/List;
named value
Lnet/minecraft/nbt/NbtList;value:Ljava/util/List;
-
type
private byte type- Mappings:
Namespace Name Mixin selector official w
Loh;w:B
intermediary field_11551
Lnet/minecraft/class_2499;field_11551:B
named type
Lnet/minecraft/nbt/NbtList;type:B
-
-
Constructor Details
-
NbtList
NbtList(List<NbtElement> list, byte type) - Mappings:
Namespace Name Mixin selector official <init>
Loh;<init>(Ljava/util/List;B)V
intermediary <init>
Lnet/minecraft/class_2499;<init>(Ljava/util/List;B)V
named <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 a
Lot;a(Ljava/io/DataOutput;)V
intermediary method_10713
Lnet/minecraft/class_2520;method_10713(Ljava/io/DataOutput;)V
named write
Lnet/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 a
Lot;a()B
intermediary method_10711
Lnet/minecraft/class_2520;method_10711()B
named getType
Lnet/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 b
Lot;b()Lov;
intermediary method_23258
Lnet/minecraft/class_2520;method_23258()Lnet/minecraft/class_4614;
named getNbtType
Lnet/minecraft/nbt/NbtElement;getNbtType()Lnet/minecraft/nbt/NbtType;
-
toString
- Specified by:
toString
in interfaceNbtElement
- Overrides:
toString
in classAbstractCollection<NbtElement>
-
forgetTypeIfEmpty
private void forgetTypeIfEmpty()- Mappings:
Namespace Name Mixin selector official f
Loh;f()V
intermediary method_17809
Lnet/minecraft/class_2499;method_17809()V
named forgetTypeIfEmpty
Lnet/minecraft/nbt/NbtList;forgetTypeIfEmpty()V
-
remove
- Specified by:
remove
in interfaceList<NbtElement>
- Specified by:
remove
in classAbstractNbtList<NbtElement>
- Mappings:
Namespace Name Mixin selector official method_10536
Loh;method_10536(I)Lot;
intermediary method_10536
Lnet/minecraft/class_2499;method_10536(I)Lnet/minecraft/class_2520;
named remove
Lnet/minecraft/nbt/NbtList;remove(I)Lnet/minecraft/nbt/NbtElement;
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceCollection<NbtElement>
- Specified by:
isEmpty
in interfaceList<NbtElement>
- Overrides:
isEmpty
in classAbstractCollection<NbtElement>
-
getCompound
- Mappings:
Namespace Name Mixin selector official a
Loh;a(I)Lob;
intermediary method_10602
Lnet/minecraft/class_2499;method_10602(I)Lnet/minecraft/class_2487;
named getCompound
Lnet/minecraft/nbt/NbtList;getCompound(I)Lnet/minecraft/nbt/NbtCompound;
-
getList
- Mappings:
Namespace Name Mixin selector official b
Loh;b(I)Loh;
intermediary method_10603
Lnet/minecraft/class_2499;method_10603(I)Lnet/minecraft/class_2499;
named getList
Lnet/minecraft/nbt/NbtList;getList(I)Lnet/minecraft/nbt/NbtList;
-
getShort
public short getShort(int index) - Mappings:
Namespace Name Mixin selector official d
Loh;d(I)S
intermediary method_10609
Lnet/minecraft/class_2499;method_10609(I)S
named getShort
Lnet/minecraft/nbt/NbtList;getShort(I)S
-
getInt
public int getInt(int index) - Mappings:
Namespace Name Mixin selector official e
Loh;e(I)I
intermediary method_10600
Lnet/minecraft/class_2499;method_10600(I)I
named getInt
Lnet/minecraft/nbt/NbtList;getInt(I)I
-
getIntArray
public int[] getIntArray(int index) - Mappings:
Namespace Name Mixin selector official f
Loh;f(I)[I
intermediary method_36111
Lnet/minecraft/class_2499;method_36111(I)[I
named getIntArray
Lnet/minecraft/nbt/NbtList;getIntArray(I)[I
-
getLongArray
public long[] getLongArray(int index) - Mappings:
Namespace Name Mixin selector official g
Loh;g(I)[J
intermediary method_36112
Lnet/minecraft/class_2499;method_36112(I)[J
named getLongArray
Lnet/minecraft/nbt/NbtList;getLongArray(I)[J
-
getDouble
public double getDouble(int index) - Mappings:
Namespace Name Mixin selector official h
Loh;h(I)D
intermediary method_10611
Lnet/minecraft/class_2499;method_10611(I)D
named getDouble
Lnet/minecraft/nbt/NbtList;getDouble(I)D
-
getFloat
public float getFloat(int index) - Mappings:
Namespace Name Mixin selector official i
Loh;i(I)F
intermediary method_10604
Lnet/minecraft/class_2499;method_10604(I)F
named getFloat
Lnet/minecraft/nbt/NbtList;getFloat(I)F
-
getString
- Mappings:
Namespace Name Mixin selector official j
Loh;j(I)Ljava/lang/String;
intermediary method_10608
Lnet/minecraft/class_2499;method_10608(I)Ljava/lang/String;
named getString
Lnet/minecraft/nbt/NbtList;getString(I)Ljava/lang/String;
-
size
public int size()- Specified by:
size
in interfaceCollection<NbtElement>
- Specified by:
size
in interfaceList<NbtElement>
- Specified by:
size
in classAbstractCollection<NbtElement>
-
get
- Specified by:
get
in interfaceList<NbtElement>
- Specified by:
get
in classAbstractList<NbtElement>
- Mappings:
Namespace Name Mixin selector official k
Loh;k(I)Lot;
intermediary method_10534
Lnet/minecraft/class_2499;method_10534(I)Lnet/minecraft/class_2520;
named get
Lnet/minecraft/nbt/NbtList;get(I)Lnet/minecraft/nbt/NbtElement;
-
set
- Specified by:
set
in interfaceList<NbtElement>
- Specified by:
set
in classAbstractNbtList<NbtElement>
- Mappings:
Namespace Name Mixin selector official method_10606
Loh;method_10606(ILot;)Lot;
intermediary method_10606
Lnet/minecraft/class_2499;method_10606(ILnet/minecraft/class_2520;)Lnet/minecraft/class_2520;
named set
Lnet/minecraft/nbt/NbtList;set(ILnet/minecraft/nbt/NbtElement;)Lnet/minecraft/nbt/NbtElement;
-
add
- Specified by:
add
in interfaceList<NbtElement>
- Specified by:
add
in classAbstractNbtList<NbtElement>
- Mappings:
Namespace Name Mixin selector official method_10531
Loh;method_10531(ILot;)V
intermediary method_10531
Lnet/minecraft/class_2499;method_10531(ILnet/minecraft/class_2520;)V
named add
Lnet/minecraft/nbt/NbtList;add(ILnet/minecraft/nbt/NbtElement;)V
-
setElement
- Specified by:
setElement
in classAbstractNbtList<NbtElement>
- Mappings:
Namespace Name Mixin selector official a
Loa;a(ILot;)Z
intermediary method_10535
Lnet/minecraft/class_2483;method_10535(ILnet/minecraft/class_2520;)Z
named setElement
Lnet/minecraft/nbt/AbstractNbtList;setElement(ILnet/minecraft/nbt/NbtElement;)Z
-
addElement
- Specified by:
addElement
in classAbstractNbtList<NbtElement>
- Mappings:
Namespace Name Mixin selector official b
Loa;b(ILot;)Z
intermediary method_10533
Lnet/minecraft/class_2483;method_10533(ILnet/minecraft/class_2520;)Z
named addElement
Lnet/minecraft/nbt/AbstractNbtList;addElement(ILnet/minecraft/nbt/NbtElement;)Z
-
canAdd
- Mappings:
Namespace Name Mixin selector official a
Loh;a(Lot;)Z
intermediary method_10605
Lnet/minecraft/class_2499;method_10605(Lnet/minecraft/class_2520;)Z
named canAdd
Lnet/minecraft/nbt/NbtList;canAdd(Lnet/minecraft/nbt/NbtElement;)Z
-
copy
Description copied from interface:NbtElement
Copies this NBT element.- Returns:
- the copied element
- Mappings:
Namespace Name Mixin selector official d
Loh;d()Loh;
intermediary method_10612
Lnet/minecraft/class_2499;method_10612()Lnet/minecraft/class_2499;
named copy
Lnet/minecraft/nbt/NbtList;copy()Lnet/minecraft/nbt/NbtList;
-
equals
- Specified by:
equals
in interfaceCollection<NbtElement>
- Specified by:
equals
in interfaceList<NbtElement>
- Overrides:
equals
in classAbstractList<NbtElement>
- Mappings:
Namespace Name Mixin selector official equals
Loh;equals(Ljava/lang/Object;)Z
intermediary equals
Lnet/minecraft/class_2499;equals(Ljava/lang/Object;)Z
named equals
Lnet/minecraft/nbt/NbtList;equals(Ljava/lang/Object;)Z
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection<NbtElement>
- Specified by:
hashCode
in interfaceList<NbtElement>
- Overrides:
hashCode
in classAbstractList<NbtElement>
-
accept
- Mappings:
Namespace Name Mixin selector official a
Lot;a(Lox;)V
intermediary method_32289
Lnet/minecraft/class_2520;method_32289(Lnet/minecraft/class_5627;)V
named accept
Lnet/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:
getHeldType
in classAbstractNbtList<NbtElement>
- Returns:
- the type of element that this list holds
- Mappings:
Namespace Name Mixin selector official e
Loa;e()B
intermediary method_10601
Lnet/minecraft/class_2483;method_10601()B
named getHeldType
Lnet/minecraft/nbt/AbstractNbtList;getHeldType()B
-
clear
public void clear()- Specified by:
clear
in interfaceCollection<NbtElement>
- Specified by:
clear
in interfaceList<NbtElement>
- Overrides:
clear
in classAbstractList<NbtElement>
-