net.minecraft.network.codec

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

implements StreamCodec<B, V>

ym
net.minecraft.network.codec.IdDispatchCodec
net.minecraft.class_9136
net.minecraft.network.handler.PacketCodecDispatcher
net.minecraft.network.codec.IdDispatchCodec

Field summary

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

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)
public void
a(B arg0, V arg1)
encode(B arg0, V arg1)
method_56426(B arg0, V arg1)
encode(B arg0, 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)