Package net.minecraft.world.chunk
Class IdListPalette<T>
java.lang.Object
net.minecraft.world.chunk.IdListPalette<T>
- All Implemented Interfaces:
Palette<T>
A palette that directly stores the raw ID of entries to the palette
container storage.
- Mappings:
Namespace Name intermediary net/minecraft/class_2816official decnamed net/minecraft/world/chunk/IdListPalette
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.chunk.Palette
Palette.Factory -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()static <A> Palette<A>create(int bits, IndexedIterable<A> idList, PaletteResizeListener<A> listener, List<A> list) get(int id) Returns the object associated with the givenid.intReturns the serialized size of this palette in a byte buf, in bytes.intgetSize()Returns the size of the palette.booleanReturnstrueif any entry in this palette passes thepredicate.intReturns the ID of an object in this palette.voidreadPacket(PacketByteBuf buf) Initializes this palette from thebuf.voidwritePacket(PacketByteBuf buf) Writes this palette to thebuf.
-
Field Details
-
idList
- Mappings:
Namespace Name Mixin selector intermediary field_12828Lnet/minecraft/class_2816;field_12828:Lnet/minecraft/class_2359;official aLdec;a:Lhj;named idListLnet/minecraft/world/chunk/IdListPalette;idList:Lnet/minecraft/util/collection/IndexedIterable;
-
-
Constructor Details
-
IdListPalette
- Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_2816;<init>(Lnet/minecraft/class_2359;)Vofficial <init>Ldec;<init>(Lhj;)Vnamed <init>Lnet/minecraft/world/chunk/IdListPalette;<init>(Lnet/minecraft/util/collection/IndexedIterable;)V
-
-
Method Details
-
create
public static <A> Palette<A> create(int bits, IndexedIterable<A> idList, PaletteResizeListener<A> listener, List<A> list) - Mappings:
Namespace Name Mixin selector intermediary method_38286Lnet/minecraft/class_2816;method_38286(ILnet/minecraft/class_2359;Lnet/minecraft/class_2835;Ljava/util/List;)Lnet/minecraft/class_2837;official aLdec;a(ILhj;Ldem;Ljava/util/List;)Ldel;named createLnet/minecraft/world/chunk/IdListPalette;create(ILnet/minecraft/util/collection/IndexedIterable;Lnet/minecraft/world/chunk/PaletteResizeListener;Ljava/util/List;)Lnet/minecraft/world/chunk/Palette;
-
index
Returns the ID of an object in this palette.If the object does not yet exist in this palette, this palette will register the object. If the palette is too small to include this object, a resize listener will be called and this palette may be discarded.
- Specified by:
indexin interfacePalette<T>- Parameters:
object- the object to look up- Returns:
- the ID of an object in this palette
- Mappings:
Namespace Name Mixin selector intermediary method_12291Lnet/minecraft/class_2837;method_12291(Ljava/lang/Object;)Iofficial aLdel;a(Ljava/lang/Object;)Inamed indexLnet/minecraft/world/chunk/Palette;index(Ljava/lang/Object;)I
-
hasAny
Returnstrueif any entry in this palette passes thepredicate.- Specified by:
hasAnyin interfacePalette<T>- Returns:
trueif any entry in this palette passes thepredicate- Mappings:
Namespace Name Mixin selector intermediary method_19525Lnet/minecraft/class_2837;method_19525(Ljava/util/function/Predicate;)Zofficial aLdel;a(Ljava/util/function/Predicate;)Znamed hasAnyLnet/minecraft/world/chunk/Palette;hasAny(Ljava/util/function/Predicate;)Z
-
get
Returns the object associated with the givenid.- Specified by:
getin interfacePalette<T>- Parameters:
id- the ID to look up- Returns:
- the object associated with the given
id - Mappings:
Namespace Name Mixin selector intermediary method_12288Lnet/minecraft/class_2837;method_12288(I)Ljava/lang/Object;official aLdel;a(I)Ljava/lang/Object;named getLnet/minecraft/world/chunk/Palette;get(I)Ljava/lang/Object;
-
readPacket
Initializes this palette from thebuf. Clears the preexisting data in this palette.- Specified by:
readPacketin interfacePalette<T>- Parameters:
buf- the packet byte buffer- Mappings:
Namespace Name Mixin selector intermediary method_12289Lnet/minecraft/class_2837;method_12289(Lnet/minecraft/class_2540;)Vofficial aLdel;a(Lsf;)Vnamed readPacketLnet/minecraft/world/chunk/Palette;readPacket(Lnet/minecraft/network/PacketByteBuf;)V
-
writePacket
Writes this palette to thebuf.- Specified by:
writePacketin interfacePalette<T>- Parameters:
buf- the packet byte buffer- Mappings:
Namespace Name Mixin selector intermediary method_12287Lnet/minecraft/class_2837;method_12287(Lnet/minecraft/class_2540;)Vofficial bLdel;b(Lsf;)Vnamed writePacketLnet/minecraft/world/chunk/Palette;writePacket(Lnet/minecraft/network/PacketByteBuf;)V
-
getPacketSize
public int getPacketSize()Returns the serialized size of this palette in a byte buf, in bytes.- Specified by:
getPacketSizein interfacePalette<T>- Returns:
- the serialized size of this palette in a byte buf, in bytes
- Mappings:
Namespace Name Mixin selector intermediary method_12290Lnet/minecraft/class_2837;method_12290()Iofficial aLdel;a()Inamed getPacketSizeLnet/minecraft/world/chunk/Palette;getPacketSize()I
-
getSize
public int getSize()Returns the size of the palette. -
copy
-