Package net.minecraft.network.codec
Interface ByteBufCodecs
public interface ByteBufCodecs
-
Field Summary
Modifier and TypeFieldDescriptionstatic final StreamCodec
<io.netty.buffer.ByteBuf, Boolean> static final StreamCodec
<io.netty.buffer.ByteBuf, Byte> static final StreamCodec
<io.netty.buffer.ByteBuf, byte[]> static final StreamCodec
<io.netty.buffer.ByteBuf, CompoundTag> static final StreamCodec
<io.netty.buffer.ByteBuf, Double> static final StreamCodec
<io.netty.buffer.ByteBuf, Float> static final StreamCodec
<io.netty.buffer.ByteBuf, com.mojang.authlib.GameProfile> static final StreamCodec
<io.netty.buffer.ByteBuf, com.mojang.authlib.properties.PropertyMap> static final StreamCodec
<io.netty.buffer.ByteBuf, Integer> static final int
static final StreamCodec
<io.netty.buffer.ByteBuf, Optional<CompoundTag>> static final StreamCodec
<io.netty.buffer.ByteBuf, org.joml.Quaternionf> static final StreamCodec
<io.netty.buffer.ByteBuf, Short> static final StreamCodec
<io.netty.buffer.ByteBuf, String> static final StreamCodec
<io.netty.buffer.ByteBuf, Tag> static final StreamCodec
<io.netty.buffer.ByteBuf, CompoundTag> static final StreamCodec
<io.netty.buffer.ByteBuf, Tag> static final StreamCodec
<io.netty.buffer.ByteBuf, Integer> static final StreamCodec
<io.netty.buffer.ByteBuf, Integer> static final StreamCodec
<io.netty.buffer.ByteBuf, Long> static final StreamCodec
<io.netty.buffer.ByteBuf, org.joml.Vector3f> -
Method Summary
Modifier and TypeMethodDescriptionstatic StreamCodec
<io.netty.buffer.ByteBuf, byte[]> byteArray
(int p_329369_) static <B extends io.netty.buffer.ByteBuf,
V, C extends Collection<V>>
StreamCodec.CodecOperation<B, V, C> collection
(IntFunction<C> p_333333_) static <B extends io.netty.buffer.ByteBuf,
V, C extends Collection<V>>
StreamCodec<B, C> collection
(IntFunction<C> p_329603_, StreamCodec<? super B, V> p_335274_) static <B extends io.netty.buffer.ByteBuf,
V, C extends Collection<V>>
StreamCodec<B, C> collection
(IntFunction<C> p_330282_, StreamCodec<? super B, V> p_329504_, int p_331395_) static StreamCodec
<io.netty.buffer.ByteBuf, CompoundTag> compoundTagCodec
(Supplier<NbtAccounter> p_334293_) static <B extends io.netty.buffer.ByteBuf,
L, R>
StreamCodec<B, com.mojang.datafixers.util.Either<L, R>> either
(StreamCodec<? super B, L> p_330563_, StreamCodec<? super B, R> p_328664_) static <T> StreamCodec
<io.netty.buffer.ByteBuf, T> fromCodec
(com.mojang.serialization.Codec<T> p_330766_) static <T> StreamCodec
<io.netty.buffer.ByteBuf, T> fromCodec
(com.mojang.serialization.Codec<T> p_332152_, Supplier<NbtAccounter> p_333221_) static <T> StreamCodec
<io.netty.buffer.ByteBuf, T> fromCodecTrusted
(com.mojang.serialization.Codec<T> p_332454_) static <T> StreamCodec
<RegistryFriendlyByteBuf, T> fromCodecWithRegistries
(com.mojang.serialization.Codec<T> p_334037_) static <T> StreamCodec
<RegistryFriendlyByteBuf, T> fromCodecWithRegistries
(com.mojang.serialization.Codec<T> p_332747_, Supplier<NbtAccounter> p_329046_) static <T> StreamCodec
<RegistryFriendlyByteBuf, T> fromCodecWithRegistriesTrusted
(com.mojang.serialization.Codec<T> p_331690_) static <T> StreamCodec
<RegistryFriendlyByteBuf, Holder<T>> holder
(ResourceKey<? extends Registry<T>> p_335347_, StreamCodec<? super RegistryFriendlyByteBuf, T> p_329304_) static <T> StreamCodec
<RegistryFriendlyByteBuf, Holder<T>> holderRegistry
(ResourceKey<? extends Registry<T>> p_332639_) static <T> StreamCodec
<RegistryFriendlyByteBuf, HolderSet<T>> holderSet
(ResourceKey<? extends Registry<T>> p_328506_) static <T> StreamCodec
<io.netty.buffer.ByteBuf, T> idMapper
(IntFunction<T> p_333433_, ToIntFunction<T> p_334959_) static <T> StreamCodec
<io.netty.buffer.ByteBuf, T> static <B extends io.netty.buffer.ByteBuf,
V>
StreamCodec.CodecOperation<B, V, List<V>> list()
static <B extends io.netty.buffer.ByteBuf,
V>
StreamCodec.CodecOperation<B, V, List<V>> list
(int p_331728_) static <B extends io.netty.buffer.ByteBuf,
K, V, M extends Map<K, V>>
StreamCodec<B, M> map
(IntFunction<? extends M> p_329613_, StreamCodec<? super B, K> p_335749_, StreamCodec<? super B, V> p_332695_) static <B extends io.netty.buffer.ByteBuf,
K, V, M extends Map<K, V>>
StreamCodec<B, M> map
(IntFunction<? extends M> p_331225_, StreamCodec<? super B, K> p_334555_, StreamCodec<? super B, V> p_330391_, int p_331122_) static <B extends io.netty.buffer.ByteBuf,
V>
StreamCodec<B, Optional<V>> optional
(StreamCodec<B, V> p_333614_) static int
readCount
(io.netty.buffer.ByteBuf p_335948_, int p_329745_) static <T> StreamCodec
<RegistryFriendlyByteBuf, T> registry
(ResourceKey<? extends Registry<T>> p_332712_) private static <T,
R> StreamCodec <RegistryFriendlyByteBuf, R> static StreamCodec
<io.netty.buffer.ByteBuf, String> stringUtf8
(int p_332577_) static StreamCodec
<io.netty.buffer.ByteBuf, Tag> tagCodec
(Supplier<NbtAccounter> p_334674_) static void
writeCount
(io.netty.buffer.ByteBuf p_332743_, int p_332779_, int p_330804_)
-
Field Details
-
MAX_INITIAL_COLLECTION_SIZE
static final int MAX_INITIAL_COLLECTION_SIZE- See Also:
-
BOOL
-
BYTE
-
SHORT
-
UNSIGNED_SHORT
-
INT
-
VAR_INT
-
VAR_LONG
-
FLOAT
-
DOUBLE
-
BYTE_ARRAY
-
STRING_UTF8
-
TAG
-
TRUSTED_TAG
-
COMPOUND_TAG
-
TRUSTED_COMPOUND_TAG
-
OPTIONAL_COMPOUND_TAG
-
VECTOR3F
-
QUATERNIONF
-
GAME_PROFILE_PROPERTIES
static final StreamCodec<io.netty.buffer.ByteBuf,com.mojang.authlib.properties.PropertyMap> GAME_PROFILE_PROPERTIES -
GAME_PROFILE
-
-
Method Details
-
byteArray
-
stringUtf8
-
tagCodec
-
compoundTagCodec
static StreamCodec<io.netty.buffer.ByteBuf,CompoundTag> compoundTagCodec(Supplier<NbtAccounter> p_334293_) -
fromCodecTrusted
static <T> StreamCodec<io.netty.buffer.ByteBuf,T> fromCodecTrusted(com.mojang.serialization.Codec<T> p_332454_) -
fromCodec
static <T> StreamCodec<io.netty.buffer.ByteBuf,T> fromCodec(com.mojang.serialization.Codec<T> p_330766_) -
fromCodec
static <T> StreamCodec<io.netty.buffer.ByteBuf,T> fromCodec(com.mojang.serialization.Codec<T> p_332152_, Supplier<NbtAccounter> p_333221_) -
fromCodecWithRegistriesTrusted
static <T> StreamCodec<RegistryFriendlyByteBuf,T> fromCodecWithRegistriesTrusted(com.mojang.serialization.Codec<T> p_331690_) -
fromCodecWithRegistries
static <T> StreamCodec<RegistryFriendlyByteBuf,T> fromCodecWithRegistries(com.mojang.serialization.Codec<T> p_334037_) -
fromCodecWithRegistries
static <T> StreamCodec<RegistryFriendlyByteBuf,T> fromCodecWithRegistries(com.mojang.serialization.Codec<T> p_332747_, Supplier<NbtAccounter> p_329046_) -
optional
static <B extends io.netty.buffer.ByteBuf,V> StreamCodec<B,Optional<V>> optional(StreamCodec<B, V> p_333614_) -
readCount
static int readCount(io.netty.buffer.ByteBuf p_335948_, int p_329745_) -
writeCount
static void writeCount(io.netty.buffer.ByteBuf p_332743_, int p_332779_, int p_330804_) -
collection
static <B extends io.netty.buffer.ByteBuf,V, StreamCodec<B,C extends Collection<V>> C> collection(IntFunction<C> p_329603_, StreamCodec<? super B, V> p_335274_) -
collection
static <B extends io.netty.buffer.ByteBuf,V, StreamCodec<B,C extends Collection<V>> C> collection(IntFunction<C> p_330282_, StreamCodec<? super B, V> p_329504_, int p_331395_) -
collection
static <B extends io.netty.buffer.ByteBuf,V, StreamCodec.CodecOperation<B,C extends Collection<V>> V, collectionC> (IntFunction<C> p_333333_) -
list
-
list
static <B extends io.netty.buffer.ByteBuf,V> StreamCodec.CodecOperation<B,V, listList<V>> (int p_331728_) -
map
static <B extends io.netty.buffer.ByteBuf,K, StreamCodec<B,V, M extends Map<K, V>> M> map(IntFunction<? extends M> p_329613_, StreamCodec<? super B, K> p_335749_, StreamCodec<? super B, V> p_332695_) -
map
static <B extends io.netty.buffer.ByteBuf,K, StreamCodec<B,V, M extends Map<K, V>> M> map(IntFunction<? extends M> p_331225_, StreamCodec<? super B, K> p_334555_, StreamCodec<? super B, V> p_330391_, int p_331122_) -
either
static <B extends io.netty.buffer.ByteBuf,L, StreamCodec<B,R> com.mojang.datafixers.util.Either<L, eitherR>> (StreamCodec<? super B, L> p_330563_, StreamCodec<? super B, R> p_328664_) -
idMapper
static <T> StreamCodec<io.netty.buffer.ByteBuf,T> idMapper(IntFunction<T> p_333433_, ToIntFunction<T> p_334959_) -
idMapper
-
registry
private static <T,R> StreamCodec<RegistryFriendlyByteBuf,R> registry(ResourceKey<? extends Registry<T>> p_332046_, Function<Registry<T>, IdMap<R>> p_332827_) -
registry
static <T> StreamCodec<RegistryFriendlyByteBuf,T> registry(ResourceKey<? extends Registry<T>> p_332712_) -
holderRegistry
static <T> StreamCodec<RegistryFriendlyByteBuf,Holder<T>> holderRegistry(ResourceKey<? extends Registry<T>> p_332639_) -
holder
static <T> StreamCodec<RegistryFriendlyByteBuf,Holder<T>> holder(ResourceKey<? extends Registry<T>> p_335347_, StreamCodec<? super RegistryFriendlyByteBuf, T> p_329304_) -
holderSet
static <T> StreamCodec<RegistryFriendlyByteBuf,HolderSet<T>> holderSet(ResourceKey<? extends Registry<T>> p_328506_)
-