2021-03-18 15:17:51 -04:00
|
|
|
CLASS net/minecraft/class_2499 net/minecraft/nbt/NbtList
|
2022-05-11 14:28:23 -04:00
|
|
|
COMMENT Represents a mutable NBT list. Its type is {@value NbtElement#LIST_TYPE}.
|
2021-03-18 15:17:51 -04:00
|
|
|
COMMENT <p>
|
|
|
|
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
|
2022-05-11 14:28:23 -04:00
|
|
|
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 <p>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 <p>Unlike {@link NbtCompound}, there is no Java type-based adder, and numeric value
|
|
|
|
COMMENT getters will not try to cast the values.
|
2019-06-28 17:55:20 -04:00
|
|
|
FIELD field_11550 value Ljava/util/List;
|
|
|
|
FIELD field_11551 type B
|
2021-03-18 15:17:51 -04:00
|
|
|
FIELD field_21039 TYPE Lnet/minecraft/class_4614;
|
2021-11-17 09:34:14 -05:00
|
|
|
FIELD field_33199 SIZE I
|
2019-09-30 16:27:11 -04:00
|
|
|
METHOD <init> (Ljava/util/List;B)V
|
|
|
|
ARG 1 list
|
|
|
|
ARG 2 type
|
2019-02-20 16:01:25 -05:00
|
|
|
METHOD equals (Ljava/lang/Object;)Z
|
|
|
|
ARG 1 o
|
2020-12-09 07:21:32 -05:00
|
|
|
METHOD get (I)Ljava/lang/Object;
|
|
|
|
ARG 1 index
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_10600 getInt (I)I
|
2022-05-11 14:28:23 -04:00
|
|
|
COMMENT {@return the integer at {@code index}, or {@code 0} if the index is out of bounds
|
|
|
|
COMMENT or if this is not a list of integers}
|
2020-12-09 07:21:32 -05:00
|
|
|
ARG 1 index
|
2019-09-30 16:27:11 -04:00
|
|
|
METHOD method_10602 getCompound (I)Lnet/minecraft/class_2487;
|
2022-05-11 14:28:23 -04:00
|
|
|
COMMENT {@return the compound at {@code index}, or an empty compound if the index is out
|
|
|
|
COMMENT of bounds or if this is not a list of compounds}
|
2019-09-30 16:27:11 -04:00
|
|
|
ARG 1 index
|
|
|
|
METHOD method_10603 getList (I)Lnet/minecraft/class_2499;
|
2022-05-11 14:28:23 -04:00
|
|
|
COMMENT {@return the list at {@code index}, or an empty list if the index is out
|
|
|
|
COMMENT of bounds or if this is not a list of lists}
|
2019-09-30 16:27:11 -04:00
|
|
|
ARG 1 index
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_10604 getFloat (I)F
|
2022-05-11 14:28:23 -04:00
|
|
|
COMMENT {@return the float at {@code index}, or {@code 0.0f} if the index is out of bounds
|
|
|
|
COMMENT or if this is not a list of floats}
|
2019-09-30 16:27:11 -04:00
|
|
|
ARG 1 index
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_10605 canAdd (Lnet/minecraft/class_2520;)Z
|
2021-03-18 15:17:51 -04:00
|
|
|
ARG 1 element
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_10608 getString (I)Ljava/lang/String;
|
2022-05-11 14:28:23 -04:00
|
|
|
COMMENT {@return the stringified value at {@code index}, or an empty string if the index
|
|
|
|
COMMENT is out of bounds}
|
|
|
|
COMMENT
|
|
|
|
COMMENT <p>Unlike other getters, this works with any type, not just {@link NbtString}.
|
2019-09-30 16:27:11 -04:00
|
|
|
ARG 1 index
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_10609 getShort (I)S
|
2022-05-11 14:28:23 -04:00
|
|
|
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}
|
2019-09-30 16:27:11 -04:00
|
|
|
ARG 1 index
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_10611 getDouble (I)D
|
2022-05-11 14:28:23 -04:00
|
|
|
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}
|
2019-09-30 16:27:11 -04:00
|
|
|
ARG 1 index
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_17809 forgetTypeIfEmpty ()V
|
2021-04-06 13:00:23 -04:00
|
|
|
METHOD method_36111 getIntArray (I)[I
|
2022-05-11 14:28:23 -04:00
|
|
|
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.
|
2021-04-06 13:00:23 -04:00
|
|
|
ARG 1 index
|
|
|
|
METHOD method_36112 getLongArray (I)[J
|
2022-05-11 14:28:23 -04:00
|
|
|
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.
|
2021-04-06 13:00:23 -04:00
|
|
|
ARG 1 index
|