Package net.minecraft.network.codec
Class IdDispatchCodec<B extends io.netty.buffer.ByteBuf,V,T>
java.lang.Object
net.minecraft.network.codec.IdDispatchCodec<B,V,T>
- All Implemented Interfaces:
StreamCodec<B,
,V> StreamDecoder<B,
,V> StreamEncoder<B,
V>
public class IdDispatchCodec<B extends io.netty.buffer.ByteBuf,V,T>
extends Object
implements StreamCodec<B,V>
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
IdDispatchCodec.Builder<B extends io.netty.buffer.ByteBuf,
V, T> (package private) static final record
Nested classes/interfaces inherited from interface net.minecraft.network.codec.StreamCodec
StreamCodec.CodecOperation<B,
S, T> -
Field Summary
-
Constructor Summary
ConstructorDescriptionIdDispatchCodec
(Function<V, ? extends T> p_330610_, List<IdDispatchCodec.Entry<B, V, T>> p_334834_, it.unimi.dsi.fastutil.objects.Object2IntMap<T> p_327784_) -
Method Summary
-
Field Details
-
UNKNOWN_TYPE
private static final int UNKNOWN_TYPE- See Also:
-
typeGetter
-
byId
-
toId
-
-
Constructor Details
-
IdDispatchCodec
-
-
Method Details
-
decode
- Specified by:
decode
in interfaceStreamDecoder<B extends io.netty.buffer.ByteBuf,
V>
-
encode
- Specified by:
encode
in interfaceStreamEncoder<B extends io.netty.buffer.ByteBuf,
V>
-
builder
public static <B extends io.netty.buffer.ByteBuf,V, IdDispatchCodec.Builder<B,T> V, builderT> (Function<V, ? extends T> p_331962_)
-