Interface PacketCodecs
- See Also:
- Mappings:
- Namespace - Name - named - net/minecraft/network/codec/PacketCodecs- intermediary - net/minecraft/class_9135- official - yl
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final PacketCodec<ByteBuf, Boolean> A codec for a boolean value.static final PacketCodec<ByteBuf, Byte> A codec for a byte value.static final PacketCodec<ByteBuf, byte[]> A codec for a byte array.static final PacketCodec<ByteBuf, Float> static final PacketCodec<ByteBuf, Double> A codec for a double value.static final intstatic final PacketCodec<ByteBuf, Float> A codec for a float value.static final PacketCodec<ByteBuf, com.mojang.authlib.GameProfile> static final PacketCodec<ByteBuf, Integer> A codec for an integer value.static final PacketCodec<ByteBuf, Long> A codec for a long value.static final PacketCodec<ByteBuf, NbtCompound> A codec for an NBT compound of up to0x200000Lbytes.static final PacketCodec<ByteBuf, NbtElement> A codec for an NBT element of up to0x200000Lbytes.static final PacketCodec<ByteBuf, OptionalInt> static final PacketCodec<ByteBuf, Optional<NbtCompound>> A codec for an optional NBT compound of up to 2097152 bytes.static final PacketCodec<ByteBuf, com.mojang.authlib.properties.PropertyMap> static final PacketCodec<ByteBuf, Quaternionf> A codec for aQuaternionf.static final PacketCodec<ByteBuf, Short> A codec for a short value.static final PacketCodec<ByteBuf, String> A codec for a string value with maximum length 32767.static final PacketCodec<ByteBuf, Integer> static final PacketCodec<ByteBuf, NbtCompound> A codec for an NBT compound of unlimited size.static final PacketCodec<ByteBuf, NbtElement> A codec for an NBT element of unlimited size.static final PacketCodec<ByteBuf, Integer> A codec for an unsigned short value.static final PacketCodec<ByteBuf, Integer> A codec for a variable-length integer (var int) value.static final PacketCodec<ByteBuf, Long> A codec for a variable-length long (var long) value.static final PacketCodec<ByteBuf, Vector3f> A codec for aVector3f.
- 
Method SummaryStatic MethodsModifier and TypeMethodDescriptionstatic PacketCodec<ByteBuf, byte[]> byteArray(int maxLength) Returns a codec for a byte array with maximum lengthmaxLength.static <T> PacketCodec<ByteBuf, T> codec(com.mojang.serialization.Codec<T> codec) Returns a codec from DataFixerUpper codeccodec.static <T> PacketCodec<ByteBuf, T> codec(com.mojang.serialization.Codec<T> codec, Supplier<NbtSizeTracker> sizeTracker) static <B extends ByteBuf,V, C extends Collection<V>> 
 PacketCodec<B, C> collection(IntFunction<C> factory, PacketCodec<? super B, V> elementCodec) Returns a codec for a collection of values.static <B extends ByteBuf,V, C extends Collection<V>> 
 PacketCodec<B, C> collection(IntFunction<C> factory, PacketCodec<? super B, V> elementCodec, int maxSize) static <B extends ByteBuf,L, R> 
 PacketCodec<B, com.mojang.datafixers.util.Either<L, R>> either(PacketCodec<? super B, L> left, PacketCodec<? super B, R> right) static <T> PacketCodec<ByteBuf, T> entryOf(IndexedIterable<T> iterable) Returns a codec for an entry ofiterable.static <T> PacketCodec<ByteBuf, T> indexed(IntFunction<T> indexToValue, ToIntFunction<T> valueToIndex) Returns a codec for an indexed value.static <B extends ByteBuf,K, V, M extends Map<K, V>> 
 PacketCodec<B, M> map(IntFunction<? extends M> factory, PacketCodec<? super B, K> keyCodec, PacketCodec<? super B, V> valueCodec) Returns a codec for a map.static <B extends ByteBuf,K, V, M extends Map<K, V>> 
 PacketCodec<B, M> map(IntFunction<? extends M> factory, PacketCodec<? super B, K> keyCodec, PacketCodec<? super B, V> valueCodec, int maxSize) static PacketCodec<ByteBuf, NbtElement> nbt(Supplier<NbtSizeTracker> sizeTracker) Returns a codec for an NBT element.static PacketCodec<ByteBuf, NbtCompound> nbtCompound(Supplier<NbtSizeTracker> sizeTracker) static <B extends ByteBuf,V> 
 PacketCodec<B, Optional<V>> optional(PacketCodec<B, V> codec) Returns a codec wrapping another codec, the value of which is optional.static intreadCollectionSize(ByteBuf buf, int maxSize) private static <T,R> PacketCodec <RegistryByteBuf, R> registry(RegistryKey<? extends Registry<T>> registry, Function<Registry<T>, IndexedIterable<R>> registryTransformer) static <T> PacketCodec<RegistryByteBuf, T> registryCodec(com.mojang.serialization.Codec<T> codec) static <T> PacketCodec<RegistryByteBuf, T> registryCodec(com.mojang.serialization.Codec<T> codec, Supplier<NbtSizeTracker> sizeTracker) static <T> PacketCodec<RegistryByteBuf, RegistryEntry<T>> registryEntry(RegistryKey<? extends Registry<T>> registry) Returns a codec for a referenceRegistryEntry.static <T> PacketCodec<RegistryByteBuf, RegistryEntry<T>> registryEntry(RegistryKey<? extends Registry<T>> registry, PacketCodec<? super RegistryByteBuf, T> directCodec) Returns a codec for aRegistryEntry.static <T> PacketCodec<RegistryByteBuf, RegistryEntryList<T>> registryEntryList(RegistryKey<? extends Registry<T>> registryRef) static <T> PacketCodec<RegistryByteBuf, T> registryValue(RegistryKey<? extends Registry<T>> registry) Returns a codec for aRegistry-registered value.static PacketCodec<ByteBuf, String> string(int maxLength) Returns a codec for a string value with maximum lengthmaxLength.static <B extends ByteBuf,V, C extends Collection<V>> 
 PacketCodec.ResultFunction<B, V, C> toCollection(IntFunction<C> collectionFactory) Used to make a codec for a collection of values usingPacketCodec.collect(net.minecraft.network.codec.PacketCodec.ResultFunction<B, V, O>).static <B extends ByteBuf,V> 
 PacketCodec.ResultFunction<B, V, List<V>> toList()Used to make a codec for a list of values usingPacketCodec.collect(net.minecraft.network.codec.PacketCodec.ResultFunction<B, V, O>).static <B extends ByteBuf,V> 
 PacketCodec.ResultFunction<B, V, List<V>> toList(int maxLength) static <T> PacketCodec<ByteBuf, T> unlimitedCodec(com.mojang.serialization.Codec<T> codec) Returns a codec from DataFixerUpper codeccodec.static <T> PacketCodec<RegistryByteBuf, T> unlimitedRegistryCodec(com.mojang.serialization.Codec<T> codec) static voidwriteCollectionSize(ByteBuf buf, int size, int maxSize) 
- 
Field Details- 
field_49674static final int field_49674- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - field_49674- Lnet/minecraft/network/codec/PacketCodecs;field_49674:I- intermediary - field_49674- Lnet/minecraft/class_9135;field_49674:I- official - a- Lyl;a:I
 
- 
BOOLEANA codec for a boolean value.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - BOOLEAN- Lnet/minecraft/network/codec/PacketCodecs;BOOLEAN:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_48547- Lnet/minecraft/class_9135;field_48547:Lnet/minecraft/class_9139;- official - b- Lyl;b:Lyn;
 
- 
BYTEA codec for a byte value.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - BYTE- Lnet/minecraft/network/codec/PacketCodecs;BYTE:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_48548- Lnet/minecraft/class_9135;field_48548:Lnet/minecraft/class_9139;- official - c- Lyl;c:Lyn;
 
- 
DEGREES- Mappings:
- Namespace - Name - Mixin selector - named - DEGREES- Lnet/minecraft/network/codec/PacketCodecs;DEGREES:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_54033- Lnet/minecraft/class_9135;field_54033:Lnet/minecraft/class_9139;- official - d- Lyl;d:Lyn;
 
- 
SHORTA codec for a short value.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - SHORT- Lnet/minecraft/network/codec/PacketCodecs;SHORT:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_48549- Lnet/minecraft/class_9135;field_48549:Lnet/minecraft/class_9139;- official - e- Lyl;e:Lyn;
 
- 
UNSIGNED_SHORTA codec for an unsigned short value.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - UNSIGNED_SHORT- Lnet/minecraft/network/codec/PacketCodecs;UNSIGNED_SHORT:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_51470- Lnet/minecraft/class_9135;field_51470:Lnet/minecraft/class_9139;- official - f- Lyl;f:Lyn;
 
- 
INTEGERA codec for an integer value.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - INTEGER- Lnet/minecraft/network/codec/PacketCodecs;INTEGER:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_49675- Lnet/minecraft/class_9135;field_49675:Lnet/minecraft/class_9139;- official - g- Lyl;g:Lyn;
 
- 
VAR_INTA codec for a variable-length integer (var int) value.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - VAR_INT- Lnet/minecraft/network/codec/PacketCodecs;VAR_INT:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_48550- Lnet/minecraft/class_9135;field_48550:Lnet/minecraft/class_9139;- official - h- Lyl;h:Lyn;
 
- 
OPTIONAL_INT- Mappings:
- Namespace - Name - Mixin selector - named - OPTIONAL_INT- Lnet/minecraft/network/codec/PacketCodecs;OPTIONAL_INT:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_54890- Lnet/minecraft/class_9135;field_54890:Lnet/minecraft/class_9139;- official - i- Lyl;i:Lyn;
 
- 
LONGA codec for a long value.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - LONG- Lnet/minecraft/network/codec/PacketCodecs;LONG:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_54505- Lnet/minecraft/class_9135;field_54505:Lnet/minecraft/class_9139;- official - j- Lyl;j:Lyn;
 
- 
VAR_LONGA codec for a variable-length long (var long) value.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - VAR_LONG- Lnet/minecraft/network/codec/PacketCodecs;VAR_LONG:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_48551- Lnet/minecraft/class_9135;field_48551:Lnet/minecraft/class_9139;- official - k- Lyl;k:Lyn;
 
- 
FLOATA codec for a float value.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - FLOAT- Lnet/minecraft/network/codec/PacketCodecs;FLOAT:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_48552- Lnet/minecraft/class_9135;field_48552:Lnet/minecraft/class_9139;- official - l- Lyl;l:Lyn;
 
- 
DOUBLEA codec for a double value.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - DOUBLE- Lnet/minecraft/network/codec/PacketCodecs;DOUBLE:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_48553- Lnet/minecraft/class_9135;field_48553:Lnet/minecraft/class_9139;- official - m- Lyl;m:Lyn;
 
- 
BYTE_ARRAYA codec for a byte array.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - BYTE_ARRAY- Lnet/minecraft/network/codec/PacketCodecs;BYTE_ARRAY:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_48987- Lnet/minecraft/class_9135;field_48987:Lnet/minecraft/class_9139;- official - n- Lyl;n:Lyn;
 
- 
STRINGA codec for a string value with maximum length 32767.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - STRING- Lnet/minecraft/network/codec/PacketCodecs;STRING:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_48554- Lnet/minecraft/class_9135;field_48554:Lnet/minecraft/class_9139;- official - o- Lyl;o:Lyn;
 
- 
NBT_ELEMENTA codec for an NBT element of up to0x200000Lbytes.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - NBT_ELEMENT- Lnet/minecraft/network/codec/PacketCodecs;NBT_ELEMENT:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_48555- Lnet/minecraft/class_9135;field_48555:Lnet/minecraft/class_9139;- official - p- Lyl;p:Lyn;
 
- 
UNLIMITED_NBT_ELEMENTA codec for an NBT element of unlimited size.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - UNLIMITED_NBT_ELEMENT- Lnet/minecraft/network/codec/PacketCodecs;UNLIMITED_NBT_ELEMENT:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_49676- Lnet/minecraft/class_9135;field_49676:Lnet/minecraft/class_9139;- official - q- Lyl;q:Lyn;
 
- 
NBT_COMPOUNDA codec for an NBT compound of up to0x200000Lbytes.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - NBT_COMPOUND- Lnet/minecraft/network/codec/PacketCodecs;NBT_COMPOUND:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_48556- Lnet/minecraft/class_9135;field_48556:Lnet/minecraft/class_9139;- official - r- Lyl;r:Lyn;
 
- 
UNLIMITED_NBT_COMPOUNDA codec for an NBT compound of unlimited size.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - UNLIMITED_NBT_COMPOUND- Lnet/minecraft/network/codec/PacketCodecs;UNLIMITED_NBT_COMPOUND:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_49677- Lnet/minecraft/class_9135;field_49677:Lnet/minecraft/class_9139;- official - s- Lyl;s:Lyn;
 
- 
OPTIONAL_NBTA codec for an optional NBT compound of up to 2097152 bytes.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - OPTIONAL_NBT- Lnet/minecraft/network/codec/PacketCodecs;OPTIONAL_NBT:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_48557- Lnet/minecraft/class_9135;field_48557:Lnet/minecraft/class_9139;- official - t- Lyl;t:Lyn;
 
- 
VECTOR_3FA codec for aVector3f.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - VECTOR_3F- Lnet/minecraft/network/codec/PacketCodecs;VECTOR_3F:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_48558- Lnet/minecraft/class_9135;field_48558:Lnet/minecraft/class_9139;- official - u- Lyl;u:Lyn;
 
- 
QUATERNION_FA codec for aQuaternionf.- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - QUATERNION_F- Lnet/minecraft/network/codec/PacketCodecs;QUATERNION_F:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_48559- Lnet/minecraft/class_9135;field_48559:Lnet/minecraft/class_9139;- official - v- Lyl;v:Lyn;
 
- 
SYNC_ID- Mappings:
- Namespace - Name - Mixin selector - named - SYNC_ID- Lnet/minecraft/network/codec/PacketCodecs;SYNC_ID:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_53740- Lnet/minecraft/class_9135;field_53740:Lnet/minecraft/class_9139;- official - w- Lyl;w:Lyn;
 
- 
PROPERTY_MAP- Mappings:
- Namespace - Name - Mixin selector - named - PROPERTY_MAP- Lnet/minecraft/network/codec/PacketCodecs;PROPERTY_MAP:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_49678- Lnet/minecraft/class_9135;field_49678:Lnet/minecraft/class_9139;- official - x- Lyl;x:Lyn;
 
- 
GAME_PROFILE- Mappings:
- Namespace - Name - Mixin selector - named - GAME_PROFILE- Lnet/minecraft/network/codec/PacketCodecs;GAME_PROFILE:Lnet/minecraft/network/codec/PacketCodec;- intermediary - field_49679- Lnet/minecraft/class_9135;field_49679:Lnet/minecraft/class_9139;- official - y- Lyl;y:Lyn;
 
 
- 
- 
Method Details- 
byteArrayReturns a codec for a byte array with maximum lengthmaxLength.- Returns:
- a codec for a byte array with maximum length maxLength
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - byteArray- Lnet/minecraft/network/codec/PacketCodecs;byteArray(I)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_56895- Lnet/minecraft/class_9135;method_56895(I)Lnet/minecraft/class_9139;- official - a- Lyl;a(I)Lyn;
 
- 
stringReturns a codec for a string value with maximum lengthmaxLength.- Returns:
- a codec for a string value with maximum length maxLength
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - string- Lnet/minecraft/network/codec/PacketCodecs;string(I)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_56364- Lnet/minecraft/class_9135;method_56364(I)Lnet/minecraft/class_9139;- official - b- Lyl;b(I)Lyn;
 
- 
nbtReturns a codec for an NBT element.- Returns:
- a codec for an NBT element
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - nbt- Lnet/minecraft/network/codec/PacketCodecs;nbt(Ljava/util/function/Supplier;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_56378- Lnet/minecraft/class_9135;method_56378(Ljava/util/function/Supplier;)Lnet/minecraft/class_9139;- official - a- Lyl;a(Ljava/util/function/Supplier;)Lyn;
 
- 
nbtCompound- Mappings:
- Namespace - Name - Mixin selector - named - nbtCompound- Lnet/minecraft/network/codec/PacketCodecs;nbtCompound(Ljava/util/function/Supplier;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_57998- Lnet/minecraft/class_9135;method_57998(Ljava/util/function/Supplier;)Lnet/minecraft/class_9139;- official - b- Lyl;b(Ljava/util/function/Supplier;)Lyn;
 
- 
unlimitedCodecReturns a codec from DataFixerUpper codeccodec.Internally, the data is serialized as an NBT element of unlimited size. - Returns:
- a codec from DataFixerUpper codec codec
- Mappings:
- Namespace - Name - Mixin selector - named - unlimitedCodec- Lnet/minecraft/network/codec/PacketCodecs;unlimitedCodec(Lcom/mojang/serialization/Codec;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_57987- Lnet/minecraft/class_9135;method_57987(Lcom/mojang/serialization/Codec;)Lnet/minecraft/class_9139;- official - a- Lyl;a(Lcom/mojang/serialization/Codec;)Lyn;
 
- 
codecReturns a codec from DataFixerUpper codeccodec.Internally, the data is serialized as an NBT element of up to 200000Lbytes.- Returns:
- a codec from DataFixerUpper codec codec
- Mappings:
- Namespace - Name - Mixin selector - named - codec- Lnet/minecraft/network/codec/PacketCodecs;codec(Lcom/mojang/serialization/Codec;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_56368- Lnet/minecraft/class_9135;method_56368(Lcom/mojang/serialization/Codec;)Lnet/minecraft/class_9139;- official - b- Lyl;b(Lcom/mojang/serialization/Codec;)Lyn;
 
- 
codecstatic <T> PacketCodec<ByteBuf,T> codec(com.mojang.serialization.Codec<T> codec, Supplier<NbtSizeTracker> sizeTracker) - Mappings:
- Namespace - Name - Mixin selector - named - codec- Lnet/minecraft/network/codec/PacketCodecs;codec(Lcom/mojang/serialization/Codec;Ljava/util/function/Supplier;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_57988- Lnet/minecraft/class_9135;method_57988(Lcom/mojang/serialization/Codec;Ljava/util/function/Supplier;)Lnet/minecraft/class_9139;- official - a- Lyl;a(Lcom/mojang/serialization/Codec;Ljava/util/function/Supplier;)Lyn;
 
- 
unlimitedRegistryCodecstatic <T> PacketCodec<RegistryByteBuf,T> unlimitedRegistryCodec(com.mojang.serialization.Codec<T> codec) - Mappings:
- Namespace - Name - Mixin selector - named - unlimitedRegistryCodec- Lnet/minecraft/network/codec/PacketCodecs;unlimitedRegistryCodec(Lcom/mojang/serialization/Codec;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_58002- Lnet/minecraft/class_9135;method_58002(Lcom/mojang/serialization/Codec;)Lnet/minecraft/class_9139;- official - c- Lyl;c(Lcom/mojang/serialization/Codec;)Lyn;
 
- 
registryCodec- Mappings:
- Namespace - Name - Mixin selector - named - registryCodec- Lnet/minecraft/network/codec/PacketCodecs;registryCodec(Lcom/mojang/serialization/Codec;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_56896- Lnet/minecraft/class_9135;method_56896(Lcom/mojang/serialization/Codec;)Lnet/minecraft/class_9139;- official - d- Lyl;d(Lcom/mojang/serialization/Codec;)Lyn;
 
- 
registryCodecstatic <T> PacketCodec<RegistryByteBuf,T> registryCodec(com.mojang.serialization.Codec<T> codec, Supplier<NbtSizeTracker> sizeTracker) - Mappings:
- Namespace - Name - Mixin selector - named - registryCodec- Lnet/minecraft/network/codec/PacketCodecs;registryCodec(Lcom/mojang/serialization/Codec;Ljava/util/function/Supplier;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_57997- Lnet/minecraft/class_9135;method_57997(Lcom/mojang/serialization/Codec;Ljava/util/function/Supplier;)Lnet/minecraft/class_9139;- official - b- Lyl;b(Lcom/mojang/serialization/Codec;Ljava/util/function/Supplier;)Lyn;
 
- 
optionalReturns a codec wrapping another codec, the value of which is optional.This can be used with PacketCodec.collect(net.minecraft.network.codec.PacketCodec.ResultFunction<B, V, O>)likecodec.collect(PacketCodecs::optional).- Returns:
- a codec wrapping another codec, the value of which is optional
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - optional- Lnet/minecraft/network/codec/PacketCodecs;optional(Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_56382- Lnet/minecraft/class_9135;method_56382(Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;- official - a- Lyl;a(Lyn;)Lyn;
 
- 
readCollectionSize- Mappings:
- Namespace - Name - Mixin selector - named - readCollectionSize- Lnet/minecraft/network/codec/PacketCodecs;readCollectionSize(Lio/netty/buffer/ByteBuf;I)I- intermediary - method_57989- Lnet/minecraft/class_9135;method_57989(Lio/netty/buffer/ByteBuf;I)I- official - a- Lyl;a(Lio/netty/buffer/ByteBuf;I)I
 
- 
writeCollectionSize- Mappings:
- Namespace - Name - Mixin selector - named - writeCollectionSize- Lnet/minecraft/network/codec/PacketCodecs;writeCollectionSize(Lio/netty/buffer/ByteBuf;II)V- intermediary - method_57990- Lnet/minecraft/class_9135;method_57990(Lio/netty/buffer/ByteBuf;II)V- official - a- Lyl;a(Lio/netty/buffer/ByteBuf;II)V
 
- 
collectionstatic <B extends ByteBuf,V, PacketCodec<B,C extends Collection<V>> C> collection(IntFunction<C> factory, PacketCodec<? super B, V> elementCodec) Returns a codec for a collection of values.- Parameters:
- factory- a function that, given the collection's size, returns a new empty collection
- elementCodec- the codec of the collection's elements
- Returns:
- a codec for a collection of values
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - collection- Lnet/minecraft/network/codec/PacketCodecs;collection(Ljava/util/function/IntFunction;Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_56376- Lnet/minecraft/class_9135;method_56376(Ljava/util/function/IntFunction;Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;- official - a- Lyl;a(Ljava/util/function/IntFunction;Lyn;)Lyn;
 
- 
collectionstatic <B extends ByteBuf,V, PacketCodec<B,C extends Collection<V>> C> collection(IntFunction<C> factory, PacketCodec<? super B, V> elementCodec, int maxSize) - Mappings:
- Namespace - Name - Mixin selector - named - collection- Lnet/minecraft/network/codec/PacketCodecs;collection(Ljava/util/function/IntFunction;Lnet/minecraft/network/codec/PacketCodec;I)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_57991- Lnet/minecraft/class_9135;method_57991(Ljava/util/function/IntFunction;Lnet/minecraft/class_9139;I)Lnet/minecraft/class_9139;- official - a- Lyl;a(Ljava/util/function/IntFunction;Lyn;I)Lyn;
 
- 
toCollectionstatic <B extends ByteBuf,V, PacketCodec.ResultFunction<B,C extends Collection<V>> V, toCollectionC> (IntFunction<C> collectionFactory) Used to make a codec for a collection of values usingPacketCodec.collect(net.minecraft.network.codec.PacketCodec.ResultFunction<B, V, O>).For example, to make a codec for a set of values, write codec.collect(PacketCodecs.toCollection(HashSet::new)).- Parameters:
- collectionFactory- a function that, given the collection's size, returns a new empty collection
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - toCollection- Lnet/minecraft/network/codec/PacketCodecs;toCollection(Ljava/util/function/IntFunction;)Lnet/minecraft/network/codec/PacketCodec$ResultFunction;- intermediary - method_56374- Lnet/minecraft/class_9135;method_56374(Ljava/util/function/IntFunction;)Lnet/minecraft/class_9139$class_9140;- official - a- Lyl;a(Ljava/util/function/IntFunction;)Lyn$a;
 
- 
toListUsed to make a codec for a list of values usingPacketCodec.collect(net.minecraft.network.codec.PacketCodec.ResultFunction<B, V, O>). This creates anArrayList, so the decoded result can be modified.For example, to make a codec for a list of values, write codec.collect(PacketCodecs.toList()).- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - toList- Lnet/minecraft/network/codec/PacketCodecs;toList()Lnet/minecraft/network/codec/PacketCodec$ResultFunction;- intermediary - method_56363- Lnet/minecraft/class_9135;method_56363()Lnet/minecraft/class_9139$class_9140;- official - a- Lyl;a()Lyn$a;
 
- 
toList- Mappings:
- Namespace - Name - Mixin selector - named - toList- Lnet/minecraft/network/codec/PacketCodecs;toList(I)Lnet/minecraft/network/codec/PacketCodec$ResultFunction;- intermediary - method_58000- Lnet/minecraft/class_9135;method_58000(I)Lnet/minecraft/class_9139$class_9140;- official - c- Lyl;c(I)Lyn$a;
 
- 
mapstatic <B extends ByteBuf,K, PacketCodec<B,V, M extends Map<K, V>> M> map(IntFunction<? extends M> factory, PacketCodec<? super B, K> keyCodec, PacketCodec<? super B, V> valueCodec) Returns a codec for a map.- Parameters:
- factory- a function that, given the map's size, returns a new empty map
- keyCodec- the codec for the map's keys
- valueCodec- the codec for the map's values
- Returns:
- a codec for a map
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - map- Lnet/minecraft/network/codec/PacketCodecs;map(Ljava/util/function/IntFunction;Lnet/minecraft/network/codec/PacketCodec;Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_56377- Lnet/minecraft/class_9135;method_56377(Ljava/util/function/IntFunction;Lnet/minecraft/class_9139;Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;- official - a- Lyl;a(Ljava/util/function/IntFunction;Lyn;Lyn;)Lyn;
 
- 
mapstatic <B extends ByteBuf,K, PacketCodec<B,V, M extends Map<K, V>> M> map(IntFunction<? extends M> factory, PacketCodec<? super B, K> keyCodec, PacketCodec<? super B, V> valueCodec, int maxSize) - Mappings:
- Namespace - Name - Mixin selector - named - map- Lnet/minecraft/network/codec/PacketCodecs;map(Ljava/util/function/IntFunction;Lnet/minecraft/network/codec/PacketCodec;Lnet/minecraft/network/codec/PacketCodec;I)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_57992- Lnet/minecraft/class_9135;method_57992(Ljava/util/function/IntFunction;Lnet/minecraft/class_9139;Lnet/minecraft/class_9139;I)Lnet/minecraft/class_9139;- official - a- Lyl;a(Ljava/util/function/IntFunction;Lyn;Lyn;I)Lyn;
 
- 
eitherstatic <B extends ByteBuf,L, PacketCodec<B,R> com.mojang.datafixers.util.Either<L, eitherR>> (PacketCodec<? super B, L> left, PacketCodec<? super B, R> right) - Mappings:
- Namespace - Name - Mixin selector - named - either- Lnet/minecraft/network/codec/PacketCodecs;either(Lnet/minecraft/network/codec/PacketCodec;Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_57995- Lnet/minecraft/class_9135;method_57995(Lnet/minecraft/class_9139;Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;- official - a- Lyl;a(Lyn;Lyn;)Lyn;
 
- 
indexedstatic <T> PacketCodec<ByteBuf,T> indexed(IntFunction<T> indexToValue, ToIntFunction<T> valueToIndex) Returns a codec for an indexed value.An example of an indexed value is an enum. - Parameters:
- indexToValue- a function that gets a value from its index
- valueToIndex- a function that gets a value's index
- Returns:
- a codec for an indexed value
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - indexed- Lnet/minecraft/network/codec/PacketCodecs;indexed(Ljava/util/function/IntFunction;Ljava/util/function/ToIntFunction;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_56375- Lnet/minecraft/class_9135;method_56375(Ljava/util/function/IntFunction;Ljava/util/function/ToIntFunction;)Lnet/minecraft/class_9139;- official - a- Lyl;a(Ljava/util/function/IntFunction;Ljava/util/function/ToIntFunction;)Lyn;
 
- 
entryOfReturns a codec for an entry ofiterable.- Returns:
- a codec for an entry of iterable
- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - entryOf- Lnet/minecraft/network/codec/PacketCodecs;entryOf(Lnet/minecraft/util/collection/IndexedIterable;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_56371- Lnet/minecraft/class_9135;method_56371(Lnet/minecraft/class_2359;)Lnet/minecraft/class_9139;- official - a- Lyl;a(Ljw;)Lyn;
 
- 
registryprivate static <T,R> PacketCodec<RegistryByteBuf,R> registry(RegistryKey<? extends Registry<T>> registry, Function<Registry<T>, IndexedIterable<R>> registryTransformer) - Mappings:
- Namespace - Name - Mixin selector - named - registry- Lnet/minecraft/network/codec/PacketCodecs;registry(Lnet/minecraft/registry/RegistryKey;Ljava/util/function/Function;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_56366- Lnet/minecraft/class_9135;method_56366(Lnet/minecraft/class_5321;Ljava/util/function/Function;)Lnet/minecraft/class_9139;- official - a- Lyl;a(Laku;Ljava/util/function/Function;)Lyn;
 
- 
registryValuestatic <T> PacketCodec<RegistryByteBuf,T> registryValue(RegistryKey<? extends Registry<T>> registry) Returns a codec for aRegistry-registered value.This codec only works with RegistryByteBuf, used during the play phase. Consider usingentryOf(net.minecraft.util.collection.IndexedIterable<T>)for encoding a value of a static registry during login or configuration phases.- Returns:
- a codec for a Registry-registered value
- See Also:
- Implementation Note:
- The value is serialized as the corresponding raw ID (as a var int).
- Mappings:
- Namespace - Name - Mixin selector - named - registryValue- Lnet/minecraft/network/codec/PacketCodecs;registryValue(Lnet/minecraft/registry/RegistryKey;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_56365- Lnet/minecraft/class_9135;method_56365(Lnet/minecraft/class_5321;)Lnet/minecraft/class_9139;- official - a- Lyl;a(Laku;)Lyn;
 
- 
registryEntrystatic <T> PacketCodec<RegistryByteBuf,RegistryEntry<T>> registryEntry(RegistryKey<? extends Registry<T>> registry) Returns a codec for a referenceRegistryEntry.This codec only works with RegistryByteBuf, used during the play phase. Consider usingentryOf(net.minecraft.util.collection.IndexedIterable<T>)for encoding a value of a static registry during login or configuration phases.- Returns:
- a codec for a reference RegistryEntry
- See Also:
- Implementation Note:
- The value is serialized as the corresponding raw ID (as a var int). This does not handle direct (unregistered) entries.
- Mappings:
- Namespace - Name - Mixin selector - named - registryEntry- Lnet/minecraft/network/codec/PacketCodecs;registryEntry(Lnet/minecraft/registry/RegistryKey;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_56383- Lnet/minecraft/class_9135;method_56383(Lnet/minecraft/class_5321;)Lnet/minecraft/class_9139;- official - b- Lyl;b(Laku;)Lyn;
 
- 
registryEntrystatic <T> PacketCodec<RegistryByteBuf,RegistryEntry<T>> registryEntry(RegistryKey<? extends Registry<T>> registry, PacketCodec<? super RegistryByteBuf, T> directCodec) Returns a codec for aRegistryEntry.This codec only works with RegistryByteBuf, used during the play phase. Consider usingentryOf(net.minecraft.util.collection.IndexedIterable<T>)for encoding a value of a static registry during login or configuration phases.- Returns:
- a codec for a RegistryEntry
- See Also:
- Implementation Note:
- If the entry is a reference entry, the value is serialized as the
 corresponding raw ID (as a var int). If it is a direct entry, it is encoded usingdirectCodec.
- Mappings:
- Namespace - Name - Mixin selector - named - registryEntry- Lnet/minecraft/network/codec/PacketCodecs;registryEntry(Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_56367- Lnet/minecraft/class_9135;method_56367(Lnet/minecraft/class_5321;Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;- official - a- Lyl;a(Laku;Lyn;)Lyn;
 
- 
registryEntryListstatic <T> PacketCodec<RegistryByteBuf,RegistryEntryList<T>> registryEntryList(RegistryKey<? extends Registry<T>> registryRef) - Mappings:
- Namespace - Name - Mixin selector - named - registryEntryList- Lnet/minecraft/network/codec/PacketCodecs;registryEntryList(Lnet/minecraft/registry/RegistryKey;)Lnet/minecraft/network/codec/PacketCodec;- intermediary - method_58001- Lnet/minecraft/class_9135;method_58001(Lnet/minecraft/class_5321;)Lnet/minecraft/class_9139;- official - c- Lyl;c(Laku;)Lyn;
 
 
-