Package net.minecraft.network.codec
Interface PacketCodecs
public interface PacketCodecs
- Mappings:
Namespace Name official xmintermediary net/minecraft/class_9135named net/minecraft/network/codec/PacketCodecs
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PacketCodec<ByteBuf,Boolean> static final PacketCodec<ByteBuf,Byte> static final PacketCodec<ByteBuf,Double> static final PacketCodec<ByteBuf,Float> static final PacketCodec<ByteBuf,NbtCompound> static final PacketCodec<ByteBuf,NbtElement> static final PacketCodec<ByteBuf,Optional<NbtCompound>> static final PacketCodec<ByteBuf,Quaternionf> static final PacketCodec<ByteBuf,Short> static final PacketCodec<ByteBuf,String> static final PacketCodec<ByteBuf,Integer> static final PacketCodec<ByteBuf,Long> static final PacketCodec<ByteBuf,Vector3f> -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <B extends ByteBuf,V, C extends Collection<V>>
PacketCodec<B,C> collection(IntFunction<C> factory, PacketCodec<? super B, V> elementCodec) static <B extends ByteBuf,V, C extends Collection<V>>
PacketCodec.ResultFunction<B,V, C> collectionMapper(IntFunction<C> factory) static <T> PacketCodec<ByteBuf,T> indexed(IntFunction<T> from, ToIntFunction<T> to) static <B extends ByteBuf,V>
PacketCodec.ResultFunction<B,V, List<V>> 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) static PacketCodec<ByteBuf,NbtElement> nbt(Supplier<NbtSizeTracker> sizeTracker) static <T> PacketCodec<ByteBuf,T> ofCodec(com.mojang.serialization.Codec<T> codec) static <T> PacketCodec<ByteBuf,T> ofIterable(IndexedIterable<T> iterable) static <B extends ByteBuf,V>
PacketCodec<B,Optional<V>> optional(PacketCodec<B, V> codec) static <T> PacketCodec<RegistryByteBuf,T> registry(RegistryKey<? extends Registry<T>> registry) private static <T,R> PacketCodec<RegistryByteBuf, R> registry(RegistryKey<? extends Registry<T>> registry, Function<Registry<T>, IndexedIterable<R>> registryTransformer) static <T> PacketCodec<RegistryByteBuf,RegistryEntry<T>> registryEntry(RegistryKey<? extends Registry<T>> registry) static <T> PacketCodec<RegistryByteBuf,RegistryEntry<T>> registryEntry(RegistryKey<? extends Registry<T>> registry, PacketCodec<? super RegistryByteBuf, T> fallback) static PacketCodec<ByteBuf,String> string(int length)
-
Field Details
-
BOOL
- Mappings:
Namespace Name Mixin selector official aLxm;a:Lxo;intermediary field_48547Lnet/minecraft/class_9135;field_48547:Lnet/minecraft/class_9139;named BOOLLnet/minecraft/network/codec/PacketCodecs;BOOL:Lnet/minecraft/network/codec/PacketCodec;
-
BYTE
- Mappings:
Namespace Name Mixin selector official bLxm;b:Lxo;intermediary field_48548Lnet/minecraft/class_9135;field_48548:Lnet/minecraft/class_9139;named BYTELnet/minecraft/network/codec/PacketCodecs;BYTE:Lnet/minecraft/network/codec/PacketCodec;
-
SHORT
- Mappings:
Namespace Name Mixin selector official cLxm;c:Lxo;intermediary field_48549Lnet/minecraft/class_9135;field_48549:Lnet/minecraft/class_9139;named SHORTLnet/minecraft/network/codec/PacketCodecs;SHORT:Lnet/minecraft/network/codec/PacketCodec;
-
VAR_INT
- Mappings:
Namespace Name Mixin selector official dLxm;d:Lxo;intermediary field_48550Lnet/minecraft/class_9135;field_48550:Lnet/minecraft/class_9139;named VAR_INTLnet/minecraft/network/codec/PacketCodecs;VAR_INT:Lnet/minecraft/network/codec/PacketCodec;
-
VAR_LONG
- Mappings:
Namespace Name Mixin selector official eLxm;e:Lxo;intermediary field_48551Lnet/minecraft/class_9135;field_48551:Lnet/minecraft/class_9139;named VAR_LONGLnet/minecraft/network/codec/PacketCodecs;VAR_LONG:Lnet/minecraft/network/codec/PacketCodec;
-
FLOAT
- Mappings:
Namespace Name Mixin selector official fLxm;f:Lxo;intermediary field_48552Lnet/minecraft/class_9135;field_48552:Lnet/minecraft/class_9139;named FLOATLnet/minecraft/network/codec/PacketCodecs;FLOAT:Lnet/minecraft/network/codec/PacketCodec;
-
DOUBLE
- Mappings:
Namespace Name Mixin selector official gLxm;g:Lxo;intermediary field_48553Lnet/minecraft/class_9135;field_48553:Lnet/minecraft/class_9139;named DOUBLELnet/minecraft/network/codec/PacketCodecs;DOUBLE:Lnet/minecraft/network/codec/PacketCodec;
-
STRING
- Mappings:
Namespace Name Mixin selector official hLxm;h:Lxo;intermediary field_48554Lnet/minecraft/class_9135;field_48554:Lnet/minecraft/class_9139;named STRINGLnet/minecraft/network/codec/PacketCodecs;STRING:Lnet/minecraft/network/codec/PacketCodec;
-
NBT_ELEMENT
- Mappings:
Namespace Name Mixin selector official iLxm;i:Lxo;intermediary field_48555Lnet/minecraft/class_9135;field_48555:Lnet/minecraft/class_9139;named NBT_ELEMENTLnet/minecraft/network/codec/PacketCodecs;NBT_ELEMENT:Lnet/minecraft/network/codec/PacketCodec;
-
NBT_COMPUND
- Mappings:
Namespace Name Mixin selector official jLxm;j:Lxo;intermediary field_48556Lnet/minecraft/class_9135;field_48556:Lnet/minecraft/class_9139;named NBT_COMPUNDLnet/minecraft/network/codec/PacketCodecs;NBT_COMPUND:Lnet/minecraft/network/codec/PacketCodec;
-
OPTIONAL_NBT
- Mappings:
Namespace Name Mixin selector official kLxm;k:Lxo;intermediary field_48557Lnet/minecraft/class_9135;field_48557:Lnet/minecraft/class_9139;named OPTIONAL_NBTLnet/minecraft/network/codec/PacketCodecs;OPTIONAL_NBT:Lnet/minecraft/network/codec/PacketCodec;
-
VECTOR3F
- Mappings:
Namespace Name Mixin selector official lLxm;l:Lxo;intermediary field_48558Lnet/minecraft/class_9135;field_48558:Lnet/minecraft/class_9139;named VECTOR3FLnet/minecraft/network/codec/PacketCodecs;VECTOR3F:Lnet/minecraft/network/codec/PacketCodec;
-
QUATERNION
- Mappings:
Namespace Name Mixin selector official mLxm;m:Lxo;intermediary field_48559Lnet/minecraft/class_9135;field_48559:Lnet/minecraft/class_9139;named QUATERNIONLnet/minecraft/network/codec/PacketCodecs;QUATERNION:Lnet/minecraft/network/codec/PacketCodec;
-
-
Method Details
-
string
- Mappings:
Namespace Name Mixin selector official aLxm;a(I)Lxo;intermediary method_56364Lnet/minecraft/class_9135;method_56364(I)Lnet/minecraft/class_9139;named stringLnet/minecraft/network/codec/PacketCodecs;string(I)Lnet/minecraft/network/codec/PacketCodec;
-
nbt
- Mappings:
Namespace Name Mixin selector official aLxm;a(Ljava/util/function/Supplier;)Lxo;intermediary method_56378Lnet/minecraft/class_9135;method_56378(Ljava/util/function/Supplier;)Lnet/minecraft/class_9139;named nbtLnet/minecraft/network/codec/PacketCodecs;nbt(Ljava/util/function/Supplier;)Lnet/minecraft/network/codec/PacketCodec;
-
ofCodec
- Mappings:
Namespace Name Mixin selector official aLxm;a(Lcom/mojang/serialization/Codec;)Lxo;intermediary method_56368Lnet/minecraft/class_9135;method_56368(Lcom/mojang/serialization/Codec;)Lnet/minecraft/class_9139;named ofCodecLnet/minecraft/network/codec/PacketCodecs;ofCodec(Lcom/mojang/serialization/Codec;)Lnet/minecraft/network/codec/PacketCodec;
-
optional
- Mappings:
Namespace Name Mixin selector official aLxm;a(Lxo;)Lxo;intermediary method_56382Lnet/minecraft/class_9135;method_56382(Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;named optionalLnet/minecraft/network/codec/PacketCodecs;optional(Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;
-
collection
static <B extends ByteBuf,V, PacketCodec<B,C extends Collection<V>> C> collection(IntFunction<C> factory, PacketCodec<? super B, V> elementCodec) - Mappings:
Namespace Name Mixin selector official aLxm;a(Ljava/util/function/IntFunction;Lxo;)Lxo;intermediary method_56376Lnet/minecraft/class_9135;method_56376(Ljava/util/function/IntFunction;Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;named collectionLnet/minecraft/network/codec/PacketCodecs;collection(Ljava/util/function/IntFunction;Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;
-
collectionMapper
static <B extends ByteBuf,V, PacketCodec.ResultFunction<B,C extends Collection<V>> V, collectionMapperC> (IntFunction<C> factory) - Mappings:
Namespace Name Mixin selector official aLxm;a(Ljava/util/function/IntFunction;)Lxo$a;intermediary method_56374Lnet/minecraft/class_9135;method_56374(Ljava/util/function/IntFunction;)Lnet/minecraft/class_9139$class_9140;named collectionMapperLnet/minecraft/network/codec/PacketCodecs;collectionMapper(Ljava/util/function/IntFunction;)Lnet/minecraft/network/codec/PacketCodec$ResultFunction;
-
listMapper
- Mappings:
Namespace Name Mixin selector official aLxm;a()Lxo$a;intermediary method_56363Lnet/minecraft/class_9135;method_56363()Lnet/minecraft/class_9139$class_9140;named listMapperLnet/minecraft/network/codec/PacketCodecs;listMapper()Lnet/minecraft/network/codec/PacketCodec$ResultFunction;
-
map
static <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) - Mappings:
Namespace Name Mixin selector official aLxm;a(Ljava/util/function/IntFunction;Lxo;Lxo;)Lxo;intermediary method_56377Lnet/minecraft/class_9135;method_56377(Ljava/util/function/IntFunction;Lnet/minecraft/class_9139;Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;named mapLnet/minecraft/network/codec/PacketCodecs;map(Ljava/util/function/IntFunction;Lnet/minecraft/network/codec/PacketCodec;Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;
-
indexed
- Mappings:
Namespace Name Mixin selector official aLxm;a(Ljava/util/function/IntFunction;Ljava/util/function/ToIntFunction;)Lxo;intermediary method_56375Lnet/minecraft/class_9135;method_56375(Ljava/util/function/IntFunction;Ljava/util/function/ToIntFunction;)Lnet/minecraft/class_9139;named indexedLnet/minecraft/network/codec/PacketCodecs;indexed(Ljava/util/function/IntFunction;Ljava/util/function/ToIntFunction;)Lnet/minecraft/network/codec/PacketCodec;
-
ofIterable
- Mappings:
Namespace Name Mixin selector official aLxm;a(Lio;)Lxo;intermediary method_56371Lnet/minecraft/class_9135;method_56371(Lnet/minecraft/class_2359;)Lnet/minecraft/class_9139;named ofIterableLnet/minecraft/network/codec/PacketCodecs;ofIterable(Lnet/minecraft/util/collection/IndexedIterable;)Lnet/minecraft/network/codec/PacketCodec;
-
registry
private static <T,R> PacketCodec<RegistryByteBuf,R> registry(RegistryKey<? extends Registry<T>> registry, Function<Registry<T>, IndexedIterable<R>> registryTransformer) - Mappings:
Namespace Name Mixin selector official aLxm;a(Laix;Ljava/util/function/Function;)Lxo;intermediary method_56366Lnet/minecraft/class_9135;method_56366(Lnet/minecraft/class_5321;Ljava/util/function/Function;)Lnet/minecraft/class_9139;named registryLnet/minecraft/network/codec/PacketCodecs;registry(Lnet/minecraft/registry/RegistryKey;Ljava/util/function/Function;)Lnet/minecraft/network/codec/PacketCodec;
-
registry
- Mappings:
Namespace Name Mixin selector official aLxm;a(Laix;)Lxo;intermediary method_56365Lnet/minecraft/class_9135;method_56365(Lnet/minecraft/class_5321;)Lnet/minecraft/class_9139;named registryLnet/minecraft/network/codec/PacketCodecs;registry(Lnet/minecraft/registry/RegistryKey;)Lnet/minecraft/network/codec/PacketCodec;
-
registryEntry
static <T> PacketCodec<RegistryByteBuf,RegistryEntry<T>> registryEntry(RegistryKey<? extends Registry<T>> registry) - Mappings:
Namespace Name Mixin selector official bLxm;b(Laix;)Lxo;intermediary method_56383Lnet/minecraft/class_9135;method_56383(Lnet/minecraft/class_5321;)Lnet/minecraft/class_9139;named registryEntryLnet/minecraft/network/codec/PacketCodecs;registryEntry(Lnet/minecraft/registry/RegistryKey;)Lnet/minecraft/network/codec/PacketCodec;
-
registryEntry
static <T> PacketCodec<RegistryByteBuf,RegistryEntry<T>> registryEntry(RegistryKey<? extends Registry<T>> registry, PacketCodec<? super RegistryByteBuf, T> fallback) - Mappings:
Namespace Name Mixin selector official aLxm;a(Laix;Lxo;)Lxo;intermediary method_56367Lnet/minecraft/class_9135;method_56367(Lnet/minecraft/class_5321;Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;named registryEntryLnet/minecraft/network/codec/PacketCodecs;registryEntry(Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;
-