yarn/mappings/net/minecraft/nbt/NbtList.mapping

72 lines
3.5 KiB
Plaintext
Raw Normal View History

Refactor the whole net.minecraft.nbt package. (#2090) * Refactor the whole net.minecraft.nbt package. * a NBT -> an NBT * -bits -> -bit * Improve javadoc and consistency. * Update mappings/net/minecraft/nbt/AbstractNbtList.mapping Co-authored-by: liach <7806504+liach@users.noreply.github.com> * NbtObject -> NbtCompound... * Remove last occurences of NbtObject I have no idea how I missed those... They are quite obvious. Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> * Update mappings/net/minecraft/nbt/NbtCompound.mapping Co-authored-by: YanisBft <doublecraft.official@gmail.com> * Apply suggestions. * Restore addElement and setElement. * Fix some missed stuff. * Apply suggestions from code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> Co-authored-by: Gegy <gegy1000@gmail.com> * Reformat type value part of NBT elements javadoc. * Apply suggestions from code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> * Clarify documentation. * Apply @ChloeDawn's suggestion. * rawType -> id * Apply haykam's suggestions. * Apply suggestions from code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> * getX -> xValue in AbstractNbtNumber. * Apply more changes from code review. * Apply suggestions from haykam's code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> Co-authored-by: liach <7806504+liach@users.noreply.github.com> Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> Co-authored-by: YanisBft <doublecraft.official@gmail.com> Co-authored-by: Gegy <gegy1000@gmail.com>
2021-03-18 15:17:51 -04:00
CLASS net/minecraft/class_2499 net/minecraft/nbt/NbtList
COMMENT Represents a mutable NBT list. Its type is {@value NbtElement#LIST_TYPE}.
Refactor the whole net.minecraft.nbt package. (#2090) * Refactor the whole net.minecraft.nbt package. * a NBT -> an NBT * -bits -> -bit * Improve javadoc and consistency. * Update mappings/net/minecraft/nbt/AbstractNbtList.mapping Co-authored-by: liach <7806504+liach@users.noreply.github.com> * NbtObject -> NbtCompound... * Remove last occurences of NbtObject I have no idea how I missed those... They are quite obvious. Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> * Update mappings/net/minecraft/nbt/NbtCompound.mapping Co-authored-by: YanisBft <doublecraft.official@gmail.com> * Apply suggestions. * Restore addElement and setElement. * Fix some missed stuff. * Apply suggestions from code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> Co-authored-by: Gegy <gegy1000@gmail.com> * Reformat type value part of NBT elements javadoc. * Apply suggestions from code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> * Clarify documentation. * Apply @ChloeDawn's suggestion. * rawType -> id * Apply haykam's suggestions. * Apply suggestions from code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> * getX -> xValue in AbstractNbtNumber. * Apply more changes from code review. * Apply suggestions from haykam's code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> Co-authored-by: liach <7806504+liach@users.noreply.github.com> Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> Co-authored-by: YanisBft <doublecraft.official@gmail.com> Co-authored-by: Gegy <gegy1000@gmail.com>
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
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
Refactor the whole net.minecraft.nbt package. (#2090) * Refactor the whole net.minecraft.nbt package. * a NBT -> an NBT * -bits -> -bit * Improve javadoc and consistency. * Update mappings/net/minecraft/nbt/AbstractNbtList.mapping Co-authored-by: liach <7806504+liach@users.noreply.github.com> * NbtObject -> NbtCompound... * Remove last occurences of NbtObject I have no idea how I missed those... They are quite obvious. Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> * Update mappings/net/minecraft/nbt/NbtCompound.mapping Co-authored-by: YanisBft <doublecraft.official@gmail.com> * Apply suggestions. * Restore addElement and setElement. * Fix some missed stuff. * Apply suggestions from code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> Co-authored-by: Gegy <gegy1000@gmail.com> * Reformat type value part of NBT elements javadoc. * Apply suggestions from code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> * Clarify documentation. * Apply @ChloeDawn's suggestion. * rawType -> id * Apply haykam's suggestions. * Apply suggestions from code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> * getX -> xValue in AbstractNbtNumber. * Apply more changes from code review. * Apply suggestions from haykam's code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> Co-authored-by: liach <7806504+liach@users.noreply.github.com> Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> Co-authored-by: YanisBft <doublecraft.official@gmail.com> Co-authored-by: Gegy <gegy1000@gmail.com>
2021-03-18 15:17:51 -04:00
FIELD field_21039 TYPE Lnet/minecraft/class_4614;
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
METHOD get (I)Ljava/lang/Object;
ARG 1 index
2019-06-28 17:55:20 -04:00
METHOD method_10600 getInt (I)I
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}
ARG 1 index
METHOD method_10602 getCompound (I)Lnet/minecraft/class_2487;
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}
ARG 1 index
METHOD method_10603 getList (I)Lnet/minecraft/class_2499;
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}
ARG 1 index
2019-06-28 17:55:20 -04:00
METHOD method_10604 getFloat (I)F
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}
ARG 1 index
2019-06-28 17:55:20 -04:00
METHOD method_10605 canAdd (Lnet/minecraft/class_2520;)Z
Refactor the whole net.minecraft.nbt package. (#2090) * Refactor the whole net.minecraft.nbt package. * a NBT -> an NBT * -bits -> -bit * Improve javadoc and consistency. * Update mappings/net/minecraft/nbt/AbstractNbtList.mapping Co-authored-by: liach <7806504+liach@users.noreply.github.com> * NbtObject -> NbtCompound... * Remove last occurences of NbtObject I have no idea how I missed those... They are quite obvious. Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> * Update mappings/net/minecraft/nbt/NbtCompound.mapping Co-authored-by: YanisBft <doublecraft.official@gmail.com> * Apply suggestions. * Restore addElement and setElement. * Fix some missed stuff. * Apply suggestions from code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> Co-authored-by: Gegy <gegy1000@gmail.com> * Reformat type value part of NBT elements javadoc. * Apply suggestions from code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> * Clarify documentation. * Apply @ChloeDawn's suggestion. * rawType -> id * Apply haykam's suggestions. * Apply suggestions from code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> * getX -> xValue in AbstractNbtNumber. * Apply more changes from code review. * Apply suggestions from haykam's code review Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> Co-authored-by: liach <7806504+liach@users.noreply.github.com> Co-authored-by: haykam821 <24855774+haykam821@users.noreply.github.com> Co-authored-by: YanisBft <doublecraft.official@gmail.com> Co-authored-by: Gegy <gegy1000@gmail.com>
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;
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}.
ARG 1 index
2019-06-28 17:55:20 -04:00
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
2019-06-28 17:55:20 -04:00
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
2019-06-28 17:55:20 -04:00
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