2019-06-28 17:55:20 -04:00
|
|
|
CLASS net/minecraft/class_2837 net/minecraft/world/chunk/Palette
|
2021-09-26 08:53:15 -04:00
|
|
|
COMMENT A palette maps objects from and to small integer IDs that uses less
|
|
|
|
COMMENT number of bits to make storage smaller.
|
|
|
|
COMMENT
|
|
|
|
COMMENT <p>While the objects palettes handle are already represented by integer
|
|
|
|
COMMENT IDs, shrinking IDs in cases where only a few appear can further reduce
|
|
|
|
COMMENT storage space and network traffic volume.
|
|
|
|
COMMENT
|
|
|
|
COMMENT @see PalettedContainer
|
|
|
|
METHOD method_12197 getSize ()I
|
|
|
|
COMMENT {@return the size of the palette}
|
|
|
|
METHOD method_12287 writePacket (Lnet/minecraft/class_2540;)V
|
|
|
|
COMMENT Writes this palette to the {@code buf}.
|
2019-03-14 08:57:09 -04:00
|
|
|
ARG 1 buf
|
2021-09-26 08:53:15 -04:00
|
|
|
COMMENT the packet byte buffer
|
|
|
|
METHOD method_12288 get (I)Ljava/lang/Object;
|
|
|
|
COMMENT {@return the object associated with the given {@code id}}
|
|
|
|
COMMENT
|
|
|
|
COMMENT @throws EntryMissingException if this ID does not exist in this palette
|
|
|
|
ARG 1 id
|
|
|
|
COMMENT the ID to look up
|
|
|
|
METHOD method_12289 readPacket (Lnet/minecraft/class_2540;)V
|
|
|
|
COMMENT Initializes this palette from the {@code buf}. Clears the preexisting
|
|
|
|
COMMENT data in this palette.
|
2019-01-09 11:05:18 -05:00
|
|
|
ARG 1 buf
|
2021-09-26 08:53:15 -04:00
|
|
|
COMMENT the packet byte buffer
|
2019-06-28 17:55:20 -04:00
|
|
|
METHOD method_12290 getPacketSize ()I
|
2021-09-26 08:53:15 -04:00
|
|
|
COMMENT {@return the serialized size of this palette in a byte buf, in bytes}
|
|
|
|
METHOD method_12291 index (Ljava/lang/Object;)I
|
|
|
|
COMMENT {@return the ID of an object in this palette}
|
|
|
|
COMMENT
|
|
|
|
COMMENT <p>If the object does not yet exist in this palette, this palette will
|
|
|
|
COMMENT register the object. If the palette is too small to include this object,
|
|
|
|
COMMENT a {@linkplain PaletteResizeListener resize listener} will be called and
|
|
|
|
COMMENT this palette may be discarded.
|
2019-06-28 17:55:20 -04:00
|
|
|
ARG 1 object
|
2021-09-26 08:53:15 -04:00
|
|
|
COMMENT the object to look up
|
|
|
|
METHOD method_19525 hasAny (Ljava/util/function/Predicate;)Z
|
|
|
|
COMMENT {@return {@code true} if any entry in this palette passes the {@code
|
|
|
|
COMMENT predicate}}
|
|
|
|
ARG 1 predicate
|
2021-11-25 04:33:54 -05:00
|
|
|
METHOD method_39956 copy ()Lnet/minecraft/class_2837;
|
2021-09-26 08:53:15 -04:00
|
|
|
CLASS class_6559 Factory
|
|
|
|
COMMENT An interface for easy creation of palettes.
|
2021-10-07 10:55:57 -04:00
|
|
|
METHOD create (ILnet/minecraft/class_2359;Lnet/minecraft/class_2835;Ljava/util/List;)Lnet/minecraft/class_2837;
|
2021-09-26 08:53:15 -04:00
|
|
|
COMMENT Creates a palette.
|
|
|
|
COMMENT
|
|
|
|
COMMENT @return the created new palette
|
|
|
|
ARG 1 bits
|
|
|
|
COMMENT the number of bits each entry uses in the storage
|
|
|
|
ARG 2 idList
|
|
|
|
COMMENT the indices of possible palette entries and their full integer IDs;
|
|
|
|
COMMENT useful for palette serialization
|
|
|
|
ARG 3 listener
|
|
|
|
COMMENT the resize listener, called when this palette runs out of capacity when
|
|
|
|
COMMENT assigning index to new entries
|