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_324182_) static <B extends io.netty.buffer.ByteBuf,
V, C extends Collection<V>>
StreamCodec.CodecOperation<B, V, C> collection
(IntFunction<C> p_319808_) static <B extends io.netty.buffer.ByteBuf,
V, C extends Collection<V>>
StreamCodec<B, C> collection
(IntFunction<C> p_320579_, StreamCodec<? super B, V> p_319970_) static <B extends io.netty.buffer.ByteBuf,
V, C extends Collection<V>>
StreamCodec<B, C> collection
(IntFunction<C> p_332198_, StreamCodec<? super B, V> p_332183_, int p_332173_) static StreamCodec
<io.netty.buffer.ByteBuf, CompoundTag> compoundTagCodec
(Supplier<NbtAccounter> p_331128_) static <B extends io.netty.buffer.ByteBuf,
L, R>
StreamCodec<B, com.mojang.datafixers.util.Either<L, R>> either
(StreamCodec<? super B, L> p_331983_, StreamCodec<? super B, R> p_332156_) static <T> StreamCodec
<io.netty.buffer.ByteBuf, T> fromCodec
(com.mojang.serialization.Codec<T> p_320615_) static <T> StreamCodec
<io.netty.buffer.ByteBuf, T> fromCodec
(com.mojang.serialization.Codec<T> p_330943_, Supplier<NbtAccounter> p_330382_) static <T> StreamCodec
<io.netty.buffer.ByteBuf, T> fromCodecTrusted
(com.mojang.serialization.Codec<T> p_331105_) static <T> StreamCodec
<RegistryFriendlyByteBuf, T> fromCodecWithRegistries
(com.mojang.serialization.Codec<T> p_323797_) static <T> StreamCodec
<RegistryFriendlyByteBuf, T> fromCodecWithRegistries
(com.mojang.serialization.Codec<T> p_331571_, Supplier<NbtAccounter> p_331922_) static <T> StreamCodec
<RegistryFriendlyByteBuf, T> fromCodecWithRegistriesTrusted
(com.mojang.serialization.Codec<T> p_331713_) static <T> StreamCodec
<RegistryFriendlyByteBuf, Holder<T>> holder
(ResourceKey<? extends Registry<T>> p_320391_, StreamCodec<? super RegistryFriendlyByteBuf, T> p_320595_) static <T> StreamCodec
<RegistryFriendlyByteBuf, Holder<T>> holderRegistry
(ResourceKey<? extends Registry<T>> p_320387_) static <T> StreamCodec
<RegistryFriendlyByteBuf, HolderSet<T>> holderSet
(ResourceKey<? extends Registry<T>> p_332137_) static <T> StreamCodec
<io.netty.buffer.ByteBuf, T> idMapper
(IntFunction<T> p_320877_, ToIntFunction<T> p_319985_) 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_330434_) static <B extends io.netty.buffer.ByteBuf,
K, V, M extends Map<K, V>>
StreamCodec<B, M> map
(IntFunction<? extends M> p_320265_, StreamCodec<? super B, K> p_320113_, StreamCodec<? super B, V> p_320275_) static <B extends io.netty.buffer.ByteBuf,
K, V, M extends Map<K, V>>
StreamCodec<B, M> map
(IntFunction<? extends M> p_331325_, StreamCodec<? super B, K> p_331975_, StreamCodec<? super B, V> p_331254_, int p_330938_) static <B extends io.netty.buffer.ByteBuf,
V>
StreamCodec<B, Optional<V>> optional
(StreamCodec<B, V> p_320522_) static int
readCount
(io.netty.buffer.ByteBuf p_331813_, int p_331668_) static <T> StreamCodec
<RegistryFriendlyByteBuf, T> registry
(ResourceKey<? extends Registry<T>> p_320404_) private static <T,
R> StreamCodec <RegistryFriendlyByteBuf, R> static StreamCodec
<io.netty.buffer.ByteBuf, String> stringUtf8
(int p_320693_) static StreamCodec
<io.netty.buffer.ByteBuf, Tag> tagCodec
(Supplier<NbtAccounter> p_320506_) static void
writeCount
(io.netty.buffer.ByteBuf p_330907_, int p_330535_, int p_331447_)
-
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_331128_) -
fromCodecTrusted
static <T> StreamCodec<io.netty.buffer.ByteBuf,T> fromCodecTrusted(com.mojang.serialization.Codec<T> p_331105_) -
fromCodec
static <T> StreamCodec<io.netty.buffer.ByteBuf,T> fromCodec(com.mojang.serialization.Codec<T> p_320615_) -
fromCodec
static <T> StreamCodec<io.netty.buffer.ByteBuf,T> fromCodec(com.mojang.serialization.Codec<T> p_330943_, Supplier<NbtAccounter> p_330382_) -
fromCodecWithRegistriesTrusted
static <T> StreamCodec<RegistryFriendlyByteBuf,T> fromCodecWithRegistriesTrusted(com.mojang.serialization.Codec<T> p_331713_) -
fromCodecWithRegistries
static <T> StreamCodec<RegistryFriendlyByteBuf,T> fromCodecWithRegistries(com.mojang.serialization.Codec<T> p_323797_) -
fromCodecWithRegistries
static <T> StreamCodec<RegistryFriendlyByteBuf,T> fromCodecWithRegistries(com.mojang.serialization.Codec<T> p_331571_, Supplier<NbtAccounter> p_331922_) -
optional
static <B extends io.netty.buffer.ByteBuf,V> StreamCodec<B,Optional<V>> optional(StreamCodec<B, V> p_320522_) -
readCount
static int readCount(io.netty.buffer.ByteBuf p_331813_, int p_331668_) -
writeCount
static void writeCount(io.netty.buffer.ByteBuf p_330907_, int p_330535_, int p_331447_) -
collection
static <B extends io.netty.buffer.ByteBuf,V, StreamCodec<B,C extends Collection<V>> C> collection(IntFunction<C> p_320579_, StreamCodec<? super B, V> p_319970_) -
collection
static <B extends io.netty.buffer.ByteBuf,V, StreamCodec<B,C extends Collection<V>> C> collection(IntFunction<C> p_332198_, StreamCodec<? super B, V> p_332183_, int p_332173_) -
collection
static <B extends io.netty.buffer.ByteBuf,V, StreamCodec.CodecOperation<B,C extends Collection<V>> V, collectionC> (IntFunction<C> p_319808_) -
list
-
list
static <B extends io.netty.buffer.ByteBuf,V> StreamCodec.CodecOperation<B,V, listList<V>> (int p_330434_) -
map
static <B extends io.netty.buffer.ByteBuf,K, StreamCodec<B,V, M extends Map<K, V>> M> map(IntFunction<? extends M> p_320265_, StreamCodec<? super B, K> p_320113_, StreamCodec<? super B, V> p_320275_) -
map
static <B extends io.netty.buffer.ByteBuf,K, StreamCodec<B,V, M extends Map<K, V>> M> map(IntFunction<? extends M> p_331325_, StreamCodec<? super B, K> p_331975_, StreamCodec<? super B, V> p_331254_, int p_330938_) -
either
static <B extends io.netty.buffer.ByteBuf,L, StreamCodec<B,R> com.mojang.datafixers.util.Either<L, eitherR>> (StreamCodec<? super B, L> p_331983_, StreamCodec<? super B, R> p_332156_) -
idMapper
static <T> StreamCodec<io.netty.buffer.ByteBuf,T> idMapper(IntFunction<T> p_320877_, ToIntFunction<T> p_319985_) -
idMapper
-
registry
private static <T,R> StreamCodec<RegistryFriendlyByteBuf,R> registry(ResourceKey<? extends Registry<T>> p_319942_, Function<Registry<T>, IdMap<R>> p_320353_) -
registry
static <T> StreamCodec<RegistryFriendlyByteBuf,T> registry(ResourceKey<? extends Registry<T>> p_320404_) -
holderRegistry
static <T> StreamCodec<RegistryFriendlyByteBuf,Holder<T>> holderRegistry(ResourceKey<? extends Registry<T>> p_320387_) -
holder
static <T> StreamCodec<RegistryFriendlyByteBuf,Holder<T>> holder(ResourceKey<? extends Registry<T>> p_320391_, StreamCodec<? super RegistryFriendlyByteBuf, T> p_320595_) -
holderSet
static <T> StreamCodec<RegistryFriendlyByteBuf,HolderSet<T>> holderSet(ResourceKey<? extends Registry<T>> p_332137_)
-