net.minecraft.network.codec

public interface ByteBufCodecs

yv
net.minecraft.network.codec.ByteBufCodecs
net.minecraft.class_9135
net.minecraft.network.codec.PacketCodecs
net.minecraft.src.C_313613_
net.minecraft.network.codec.ByteBufCodecs

Field summary

Modifier and TypeField
int
a
MAX_INITIAL_COLLECTION_SIZE
field_49674
field_49674
f_317061_
StreamCodec<io.netty.buffer.ByteBuf, Boolean>
b
BOOL
field_48547
BOOL
f_315514_
StreamCodec<io.netty.buffer.ByteBuf, Byte>
c
BYTE
field_48548
BYTE
f_313954_
StreamCodec<io.netty.buffer.ByteBuf, Short>
d
SHORT
field_48549
SHORT
f_315014_
StreamCodec<io.netty.buffer.ByteBuf, Integer>
e
UNSIGNED_SHORT
field_51470
UNSIGNED_SHORT
f_315371_
StreamCodec<io.netty.buffer.ByteBuf, Integer>
f
INT
field_49675
INTEGER
f_316612_
StreamCodec<io.netty.buffer.ByteBuf, Integer>
g
VAR_INT
field_48550
VAR_INT
f_316730_
StreamCodec<io.netty.buffer.ByteBuf, Long>
h
VAR_LONG
field_48551
VAR_LONG
f_315478_
StreamCodec<io.netty.buffer.ByteBuf, Float>
i
FLOAT
field_48552
FLOAT
f_314734_
StreamCodec<io.netty.buffer.ByteBuf, Double>
j
DOUBLE
field_48553
DOUBLE
f_315477_
StreamCodec<io.netty.buffer.ByteBuf, byte[]>
k
BYTE_ARRAY
field_48987
BYTE_ARRAY
f_315847_
StreamCodec<io.netty.buffer.ByteBuf, String>
l
STRING_UTF8
field_48554
STRING
f_315450_
StreamCodec<io.netty.buffer.ByteBuf, Tag>
m
TAG
field_48555
NBT_ELEMENT
f_316427_
StreamCodec<io.netty.buffer.ByteBuf, Tag>
n
TRUSTED_TAG
field_49676
UNLIMITED_NBT_ELEMENT
f_314848_
StreamCodec<io.netty.buffer.ByteBuf, CompoundTag>
o
COMPOUND_TAG
field_48556
NBT_COMPOUND
f_314933_
StreamCodec<io.netty.buffer.ByteBuf, CompoundTag>
p
TRUSTED_COMPOUND_TAG
field_49677
UNLIMITED_NBT_COMPOUND
f_315964_
StreamCodec<io.netty.buffer.ByteBuf, Optional<CompoundTag>>
q
OPTIONAL_COMPOUND_TAG
field_48557
OPTIONAL_NBT
f_314919_
StreamCodec<io.netty.buffer.ByteBuf, org.joml.Vector3f>
r
VECTOR3F
field_48558
VECTOR3F
f_314483_
StreamCodec<io.netty.buffer.ByteBuf, org.joml.Quaternionf>
s
QUATERNIONF
field_48559
QUATERNIONF
f_313943_
StreamCodec<io.netty.buffer.ByteBuf, com.mojang.authlib.properties.PropertyMap>
t
GAME_PROFILE_PROPERTIES
field_49678
PROPERTY_MAP
f_315576_
StreamCodec<io.netty.buffer.ByteBuf, com.mojang.authlib.GameProfile>
u
GAME_PROFILE
field_49679
GAME_PROFILE
f_314168_

Method summary

Modifier and TypeMethod
static StreamCodec<io.netty.buffer.ByteBuf, byte[]>
a(int arg0)
byteArray(int arg0)
method_56895(int arg0)
byteArray(int maxLength)
m_323478_(int p_329369_)
static StreamCodec<io.netty.buffer.ByteBuf, String>
b(int arg0)
stringUtf8(int arg0)
method_56364(int arg0)
string(int maxLength)
m_319534_(int p_332577_)
static StreamCodec<io.netty.buffer.ByteBuf, Tag>
a(Supplier<uk> arg0)
tagCodec(Supplier<NbtAccounter> arg0)
method_56378(Supplier<class_2505> arg0)
nbt(Supplier<NbtSizeTracker> sizeTracker)
m_322191_(Supplier<C_4937_> p_334674_)
static StreamCodec<io.netty.buffer.ByteBuf, CompoundTag>
b(Supplier<uk> arg0)
compoundTagCodec(Supplier<NbtAccounter> arg0)
method_57998(Supplier<class_2505> arg0)
nbtCompound(Supplier<NbtSizeTracker> sizeTracker)
m_319469_(Supplier<C_4937_> p_334293_)
static <T> StreamCodec<io.netty.buffer.ByteBuf, T>
a(com.mojang.serialization.Codec<T> arg0)
fromCodecTrusted(com.mojang.serialization.Codec<T> arg0)
method_57987(com.mojang.serialization.Codec<T> arg0)
unlimitedCodec(com.mojang.serialization.Codec<T> codec)
m_319482_(com.mojang.serialization.Codec<T> p_332454_)
static <T> StreamCodec<io.netty.buffer.ByteBuf, T>
b(com.mojang.serialization.Codec<T> arg0)
fromCodec(com.mojang.serialization.Codec<T> arg0)
method_56368(com.mojang.serialization.Codec<T> arg0)
codec(com.mojang.serialization.Codec<T> codec)
m_321502_(com.mojang.serialization.Codec<T> p_330766_)
static <T> StreamCodec<io.netty.buffer.ByteBuf, T>
a(com.mojang.serialization.Codec<T> arg0, Supplier<uk> arg1)
fromCodec(com.mojang.serialization.Codec<T> arg0, Supplier<NbtAccounter> arg1)
method_57988(com.mojang.serialization.Codec<T> arg0, Supplier<class_2505> arg1)
codec(com.mojang.serialization.Codec<T> codec, Supplier<NbtSizeTracker> sizeTracker)
m_322579_(com.mojang.serialization.Codec<T> p_332152_, Supplier<C_4937_> p_333221_)
static <T> StreamCodec<RegistryFriendlyByteBuf, T>
c(com.mojang.serialization.Codec<T> arg0)
fromCodecWithRegistriesTrusted(com.mojang.serialization.Codec<T> arg0)
method_58002(com.mojang.serialization.Codec<T> arg0)
unlimitedRegistryCodec(com.mojang.serialization.Codec<T> codec)
m_322295_(com.mojang.serialization.Codec<T> p_331690_)
static <T> StreamCodec<RegistryFriendlyByteBuf, T>
d(com.mojang.serialization.Codec<T> arg0)
fromCodecWithRegistries(com.mojang.serialization.Codec<T> arg0)
method_56896(com.mojang.serialization.Codec<T> arg0)
registryCodec(com.mojang.serialization.Codec<T> codec)
m_319284_(com.mojang.serialization.Codec<T> p_334037_)
static <T> StreamCodec<RegistryFriendlyByteBuf, T>
b(com.mojang.serialization.Codec<T> arg0, Supplier<uk> arg1)
fromCodecWithRegistries(com.mojang.serialization.Codec<T> arg0, Supplier<NbtAccounter> arg1)
method_57997(com.mojang.serialization.Codec<T> arg0, Supplier<class_2505> arg1)
registryCodec(com.mojang.serialization.Codec<T> codec, Supplier<NbtSizeTracker> sizeTracker)
m_320197_(com.mojang.serialization.Codec<T> p_332747_, Supplier<C_4937_> p_329046_)
static <B extends io.netty.buffer.ByteBuf, V> StreamCodec<B, Optional<V>>
a(yx<B, V> arg0)
optional(StreamCodec<B, V> arg0)
method_56382(class_9139<B, V> arg0)
optional(PacketCodec<B, V> codec)
m_319027_(C_313866_<B, V> p_333614_)
static int
a(io.netty.buffer.ByteBuf arg0, int arg1)
readCount(io.netty.buffer.ByteBuf arg0, int arg1)
method_57989(io.netty.buffer.ByteBuf arg0, int arg1)
readCollectionSize(io.netty.buffer.ByteBuf buf, int maxSize)
m_319449_(io.netty.buffer.ByteBuf p_335948_, int p_329745_)
static void
a(io.netty.buffer.ByteBuf arg0, int arg1, int arg2)
writeCount(io.netty.buffer.ByteBuf arg0, int arg1, int arg2)
method_57990(io.netty.buffer.ByteBuf arg0, int arg1, int arg2)
writeCollectionSize(io.netty.buffer.ByteBuf buf, int size, int maxSize)
m_324291_(io.netty.buffer.ByteBuf p_332743_, int p_332779_, int p_330804_)
static <B extends io.netty.buffer.ByteBuf, V, C extends Collection<V>> StreamCodec<B, C>
a(IntFunction<C> arg0, yx<? super B, V> arg1)
collection(IntFunction<C> arg0, StreamCodec<? super B, V> arg1)
method_56376(IntFunction<C> arg0, class_9139<? super B, V> arg1)
collection(IntFunction<C> factory, PacketCodec<? super B, V> elementCodec)
m_323861_(IntFunction<C> p_329603_, C_313866_<? super B, V> p_335274_)
static <B extends io.netty.buffer.ByteBuf, V, C extends Collection<V>> StreamCodec<B, C>
a(IntFunction<C> arg0, yx<? super B, V> arg1, int arg2)
collection(IntFunction<C> arg0, StreamCodec<? super B, V> arg1, int arg2)
method_57991(IntFunction<C> arg0, class_9139<? super B, V> arg1, int arg2)
collection(IntFunction<C> factory, PacketCodec<? super B, V> elementCodec, int maxSize)
m_324703_(IntFunction<C> p_330282_, C_313866_<? super B, V> p_329504_, int p_331395_)
static <B extends io.netty.buffer.ByteBuf, V, C extends Collection<V>> StreamCodec$CodecOperation<B, V, C>
a(IntFunction<C> arg0)
collection(IntFunction<C> arg0)
method_56374(IntFunction<C> arg0)
toCollection(IntFunction<C> collectionFactory)
m_323312_(IntFunction<C> p_333333_)
static <B extends io.netty.buffer.ByteBuf, V> StreamCodec$CodecOperation<B, V, List<V>>
a()
list()
method_56363()
toList()
m_324765_()
static <B extends io.netty.buffer.ByteBuf, V> StreamCodec$CodecOperation<B, V, List<V>>
c(int arg0)
list(int arg0)
method_58000(int arg0)
toList(int maxLength)
m_319259_(int p_331728_)
static <B extends io.netty.buffer.ByteBuf, K, V, M extends Map<K, V>> StreamCodec<B, M>
a(IntFunction<? extends M> arg0, yx<? super B, K> arg1, yx<? super B, V> arg2)
map(IntFunction<? extends M> arg0, StreamCodec<? super B, K> arg1, StreamCodec<? super B, V> arg2)
method_56377(IntFunction<? extends M> arg0, class_9139<? super B, K> arg1, class_9139<? super B, V> arg2)
map(IntFunction<? extends M> factory, PacketCodec<? super B, K> keyCodec, PacketCodec<? super B, V> valueCodec)
m_322136_(IntFunction<? extends M> p_329613_, C_313866_<? super B, K> p_335749_, C_313866_<? super B, V> p_332695_)
static <B extends io.netty.buffer.ByteBuf, K, V, M extends Map<K, V>> StreamCodec<B, M>
a(IntFunction<? extends M> arg0, yx<? super B, K> arg1, yx<? super B, V> arg2, int arg3)
map(IntFunction<? extends M> arg0, StreamCodec<? super B, K> arg1, StreamCodec<? super B, V> arg2, int arg3)
method_57992(IntFunction<? extends M> arg0, class_9139<? super B, K> arg1, class_9139<? super B, V> arg2, int arg3)
map(IntFunction<? extends M> factory, PacketCodec<? super B, K> keyCodec, PacketCodec<? super B, V> valueCodec, int maxSize)
m_319874_(IntFunction<? extends M> p_331225_, C_313866_<? super B, K> p_334555_, C_313866_<? super B, V> p_330391_, int p_331122_)
static <B extends io.netty.buffer.ByteBuf, L, R> StreamCodec<B, com.mojang.datafixers.util.Either<L, R>>
a(yx<? super B, L> arg0, yx<? super B, R> arg1)
either(StreamCodec<? super B, L> arg0, StreamCodec<? super B, R> arg1)
method_57995(class_9139<? super B, L> arg0, class_9139<? super B, R> arg1)
either(PacketCodec<? super B, L> left, PacketCodec<? super B, R> right)
m_319489_(C_313866_<? super B, L> p_330563_, C_313866_<? super B, R> p_328664_)
static <T> StreamCodec<io.netty.buffer.ByteBuf, T>
a(IntFunction<T> arg0, ToIntFunction<T> arg1)
idMapper(IntFunction<T> arg0, ToIntFunction<T> arg1)
method_56375(IntFunction<T> arg0, ToIntFunction<T> arg1)
indexed(IntFunction<T> indexToValue, ToIntFunction<T> valueToIndex)
m_321301_(IntFunction<T> p_333433_, ToIntFunction<T> p_334959_)
static <T> StreamCodec<io.netty.buffer.ByteBuf, T>
a(jr<T> arg0)
idMapper(IdMap<T> arg0)
method_56371(class_2359<T> arg0)
entryOf(IndexedIterable<T> iterable)
m_323411_(C_4698_<T> p_332036_)
private static <T, R> StreamCodec<RegistryFriendlyByteBuf, R>
a(akq<? extends jz<T>> arg0, Function<jz<T>, jr<R>> arg1)
registry(ResourceKey<? extends Registry<T>> arg0, Function<Registry<T>, IdMap<R>> arg1)
method_56366(class_5321<? extends class_2378<T>> arg0, Function<class_2378<T>, class_2359<R>> arg1)
registry(RegistryKey<? extends Registry<T>> registry, Function<Registry<T>, IndexedIterable<R>> registryTransformer)
m_320301_(C_5264_<? extends C_4705_<T>> p_332046_, Function<C_4705_<T>, C_4698_<R>> p_332827_)
static <T> StreamCodec<RegistryFriendlyByteBuf, T>
a(akq<? extends jz<T>> arg0)
registry(ResourceKey<? extends Registry<T>> arg0)
method_56365(class_5321<? extends class_2378<T>> arg0)
registryValue(RegistryKey<? extends Registry<T>> registry)
m_320159_(C_5264_<? extends C_4705_<T>> p_332712_)
static <T> StreamCodec<RegistryFriendlyByteBuf, Holder<T>>
b(akq<? extends jz<T>> arg0)
holderRegistry(ResourceKey<? extends Registry<T>> arg0)
method_56383(class_5321<? extends class_2378<T>> arg0)
registryEntry(RegistryKey<? extends Registry<T>> registry)
m_322636_(C_5264_<? extends C_4705_<T>> p_332639_)
static <T> StreamCodec<RegistryFriendlyByteBuf, Holder<T>>
a(akq<? extends jz<T>> arg0, yx<? super wk, T> arg1)
holder(ResourceKey<? extends Registry<T>> arg0, StreamCodec<? super RegistryFriendlyByteBuf, T> arg1)
method_56367(class_5321<? extends class_2378<T>> arg0, class_9139<? super class_9129, T> arg1)
registryEntry(RegistryKey<? extends Registry<T>> registry, PacketCodec<? super RegistryByteBuf, T> directCodec)
m_321333_(C_5264_<? extends C_4705_<T>> p_335347_, C_313866_<? super C_313350_, T> p_329304_)
static <T> StreamCodec<RegistryFriendlyByteBuf, HolderSet<T>>
c(akq<? extends jz<T>> arg0)
holderSet(ResourceKey<? extends Registry<T>> arg0)
method_58001(class_5321<? extends class_2378<T>> arg0)
registryEntryList(RegistryKey<? extends Registry<T>> registryRef)
m_319169_(C_5264_<? extends C_4705_<T>> p_328506_)