net.minecraft.network.codec

public class IdDispatchCodec<B extends io.netty.buffer.ByteBuf, V, T>

implements StreamCodec<B, V>

yw
net.minecraft.network.codec.IdDispatchCodec
net.minecraft.class_9136
net.minecraft.network.handler.PacketCodecDispatcher
net.minecraft.src.C_313375_
net.minecraft.network.codec.IdDispatchCodec

Field summary

Modifier and TypeField
private static final int
a
UNKNOWN_TYPE
field_48576
UNKNOWN_PACKET_INDEX
f_314336_
private final Function<V, ? extends T>
b
typeGetter
field_48577
packetIdGetter
f_316164_
private final List<IdDispatchCodec$Entry<B, V, T>>
c
byId
field_48578
packetTypes
f_316269_
private final it.unimi.dsi.fastutil.objects.Object2IntMap<T>
d
toId
field_48579
typeToIndex
f_316567_

Constructor summary

ModifierConstructor
(Function<V, ? extends T> packetIdGetter, List<IdDispatchCodec$Entry<B, V, T>> packetTypes, it.unimi.dsi.fastutil.objects.Object2IntMap<T> typeToIndex)

Method summary

Modifier and TypeMethod
public V
a(B arg0)
decode(B arg0)
method_56425(B arg0)
decode(B arg0)
m_318688_(B arg0)
public void
a(B arg0, V arg1)
encode(B arg0, V arg1)
method_56426(B arg0, V arg1)
encode(B arg0, V arg1)
m_318638_(B p_327912_, V arg1)
public static <B extends io.netty.buffer.ByteBuf, V, T> IdDispatchCodec$Builder<B, V, T>
a(Function<V, ? extends T> arg0)
builder(Function<V, ? extends T> arg0)
method_56427(Function<V, ? extends T> arg0)
builder(Function<V, ? extends T> packetIdGetter)
m_323921_(Function<V, ? extends T> p_331962_)