CLASS net/minecraft/class_2499 net/minecraft/nbt/NbtList COMMENT Represents a mutable NBT list. Its type is {@value NbtElement#LIST_TYPE}. COMMENT
COMMENT An NBT list holds values of the same {@linkplain NbtElement#getType NBT type}. COMMENT The {@linkplain AbstractNbtList#getHeldType NBT type} of an NBT list is determined COMMENT once its first element is inserted; empty NBT lists return {@link NbtElement#END_TYPE} COMMENT as their held {@linkplain AbstractNbtList#getHeldType NBT type}. COMMENT COMMENT
To get values from this list, use methods with type names, such as COMMENT {@link #getInt(int)}. Where applicable, these methods return Java types (e.g. {@code int}, COMMENT {@code long[]}) instead of {@link NbtElement} subclasses. If type mismatch occurs or COMMENT the index is out of bounds, it returns the default value for that type instead of COMMENT throwing or returning {@code null}. COMMENT COMMENT
Unlike {@link NbtCompound}, there is no Java type-based adder, and numeric value
COMMENT getters will not try to cast the values.
FIELD field_11550 value Ljava/util/List;
FIELD field_11551 type B
FIELD field_21039 TYPE Lnet/minecraft/class_4614;
FIELD field_41725 SIZE I
METHOD Unlike other getters, this works with any type, not just {@link NbtString}.
ARG 1 index
METHOD method_10609 getShort (I)S
COMMENT {@return the short at {@code index}, or {@code 0} if the index is out of bounds
COMMENT or if this is not a list of shorts}
ARG 1 index
METHOD method_10611 getDouble (I)D
COMMENT {@return the double at {@code index}, or {@code 0.0} if the index is out of bounds
COMMENT or if this is not a list of doubles}
ARG 1 index
METHOD method_17809 forgetTypeIfEmpty ()V
METHOD method_36111 getIntArray (I)[I
COMMENT {@return the int array at {@code index}, or an empty int array if the index is
COMMENT out of bounds or if this is not a list of int arrays}
COMMENT
COMMENT @apiNote Modifying the returned array also modifies the NBT int array.
ARG 1 index
METHOD method_36112 getLongArray (I)[J
COMMENT {@return the long array at {@code index}, or an empty int array if the index is
COMMENT out of bounds or if this is not a list of long arrays}
COMMENT
COMMENT @apiNote Modifying the returned array also modifies the NBT long array.
ARG 1 index