Package net.minecraft.network.protocol
Class ProtocolInfoBuilder<T extends PacketListener,B extends io.netty.buffer.ByteBuf>
java.lang.Object
net.minecraft.network.protocol.ProtocolInfoBuilder<T,B>
public class ProtocolInfoBuilder<T extends PacketListener,B extends io.netty.buffer.ByteBuf>
extends Object
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final record
ProtocolInfoBuilder.CodecEntry<T extends PacketListener,
P extends Packet<? super T>, B extends io.netty.buffer.ByteBuf> (package private) static final record
-
Field Summary
Modifier and TypeFieldDescriptionprivate BundlerInfo
private final List
<ProtocolInfoBuilder.CodecEntry<T, ?, B>> (package private) final PacketFlow
(package private) final ConnectionProtocol
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<P extends Packet<? super T>>
ProtocolInfoBuilder<T, B> addPacket
(PacketType<P> p_335373_, StreamCodec<? super B, P> p_333531_) (package private) StreamCodec
<io.netty.buffer.ByteBuf, Packet<? super T>> buildPacketCodec
(Function<io.netty.buffer.ByteBuf, B> p_331741_, List<ProtocolInfoBuilder.CodecEntry<T, ?, B>> p_329135_) static <T extends ClientboundPacketListener,
B extends io.netty.buffer.ByteBuf>
ProtocolInfo.Unbound<T, B> clientboundProtocol
(ConnectionProtocol p_329688_, Consumer<ProtocolInfoBuilder<T, B>> p_332900_) private static <L extends PacketListener,
B extends io.netty.buffer.ByteBuf>
ProtocolInfo.Unbound<L, B> protocol
(ConnectionProtocol p_330235_, PacketFlow p_335045_, Consumer<ProtocolInfoBuilder<L, B>> p_329753_) static <T extends ServerboundPacketListener,
B extends io.netty.buffer.ByteBuf>
ProtocolInfo.Unbound<T, B> serverboundProtocol
(ConnectionProtocol p_331618_, Consumer<ProtocolInfoBuilder<T, B>> p_330318_) <P extends BundlePacket<? super T>,
D extends BundleDelimiterPacket<? super T>>
ProtocolInfoBuilder<T, B> withBundlePacket
(PacketType<P> p_336277_, Function<Iterable<Packet<? super T>>, P> p_331716_, D p_328432_)
-
Field Details
-
protocol
-
flow
-
codecs
private final List<ProtocolInfoBuilder.CodecEntry<T extends PacketListener,?, codecsB extends io.netty.buffer.ByteBuf>> -
bundlerInfo
-
-
Constructor Details
-
ProtocolInfoBuilder
-
-
Method Details
-
addPacket
public <P extends Packet<? super T>> ProtocolInfoBuilder<T,B> addPacket(PacketType<P> p_335373_, StreamCodec<? super B, P> p_333531_) -
withBundlePacket
public <P extends BundlePacket<? super T>,D extends BundleDelimiterPacket<? super T>> ProtocolInfoBuilder<T,B> withBundlePacket(PacketType<P> p_336277_, Function<Iterable<Packet<? super T>>, P> p_331716_, D p_328432_) -
buildPacketCodec
StreamCodec<io.netty.buffer.ByteBuf,Packet<? super T>> buildPacketCodec(Function<io.netty.buffer.ByteBuf, B> p_331741_, List<ProtocolInfoBuilder.CodecEntry<T, ?, B>> p_329135_) -
build
-
buildUnbound
-
protocol
private static <L extends PacketListener,B extends io.netty.buffer.ByteBuf> ProtocolInfo.Unbound<L,B> protocol(ConnectionProtocol p_330235_, PacketFlow p_335045_, Consumer<ProtocolInfoBuilder<L, B>> p_329753_) -
serverboundProtocol
public static <T extends ServerboundPacketListener,B extends io.netty.buffer.ByteBuf> ProtocolInfo.Unbound<T,B> serverboundProtocol(ConnectionProtocol p_331618_, Consumer<ProtocolInfoBuilder<T, B>> p_330318_) -
clientboundProtocol
public static <T extends ClientboundPacketListener,B extends io.netty.buffer.ByteBuf> ProtocolInfo.Unbound<T,B> clientboundProtocol(ConnectionProtocol p_329688_, Consumer<ProtocolInfoBuilder<T, B>> p_332900_)
-