Package net.minecraft.network
Class ConnectionProtocol.CodecData<T extends PacketListener>
java.lang.Object
net.minecraft.network.ConnectionProtocol.CodecData<T>
- All Implemented Interfaces:
BundlerInfo.Provider
- Enclosing class:
ConnectionProtocol
public static class ConnectionProtocol.CodecData<T extends PacketListener>
extends Object
implements BundlerInfo.Provider
-
Field Summary
Modifier and TypeFieldDescriptionprivate final PacketFlow
private final ConnectionProtocol.PacketSet<T>
private final ConnectionProtocol
-
Constructor Summary
ConstructorDescriptionCodecData
(ConnectionProtocol p_294701_, PacketFlow p_296318_, ConnectionProtocol.PacketSet<T> p_295008_) -
Method Summary
Modifier and TypeMethodDescriptionPacket<?>
createPacket
(int p_294972_, FriendlyByteBuf p_296217_) Deprecated.Packet<?>
createPacket
(int p_294972_, FriendlyByteBuf p_296217_, io.netty.channel.ChannelHandlerContext p_130535_) Creates a new packet from the discriminator and the buffer.flow()
boolean
isValidPacketType
(Packet<?> p_294142_) int
protocol()
-
Field Details
-
protocol
-
flow
-
packetSet
-
-
Constructor Details
-
CodecData
public CodecData(ConnectionProtocol p_294701_, PacketFlow p_296318_, ConnectionProtocol.PacketSet<T> p_295008_)
-
-
Method Details
-
protocol
-
flow
-
packetId
-
bundlerInfo
- Specified by:
bundlerInfo
in interfaceBundlerInfo.Provider
-
packetsByIds
-
createPacket
Deprecated.UsecreatePacket(int, FriendlyByteBuf, io.netty.channel.ChannelHandlerContext)
instead, which provides the channel context for creating custom packet payloads. -
createPacket
@Nullable public Packet<?> createPacket(int p_294972_, FriendlyByteBuf p_296217_, io.netty.channel.ChannelHandlerContext p_130535_) Creates a new packet from the discriminator and the buffer.- Parameters:
p_294972_
- The discriminatorp_296217_
- The bufferp_130535_
- The channel context- Returns:
- The packet
-
isValidPacketType
-
createPacket(int, FriendlyByteBuf, io.netty.channel.ChannelHandlerContext)
instead, which provides the channel context for creating custom packet payloads.