类 PayloadChannel.Builder
java.lang.Object
net.minecraftforge.network.PayloadChannel.Builder
- 所有已实现的接口:
PayloadConnection<CustomPacketPayload>
- 封闭类:
PayloadChannel
private static final class PayloadChannel.Builder
extends Object
implements PayloadConnection<CustomPacketPayload>
-
嵌套类概要
嵌套类修饰符和类型类说明private static final record
private static final record
PayloadChannel.Builder.Flow<BUF extends FriendlyByteBuf,
BASE extends CustomPacketPayload> private static final record
PayloadChannel.Builder.HandlerFlow<BUF extends FriendlyByteBuf,
CTX, BASE extends CustomPacketPayload & SimplePacket<CTX>> private static final record
PayloadChannel.Builder.HandlerProtocol<BUF extends FriendlyByteBuf,
CTX, BASE extends CustomPacketPayload & SimplePacket<CTX>> private static final record
PayloadChannel.Builder.Protocol<BUF extends FriendlyByteBuf,
BASE extends CustomPacketPayload> private static interface
PayloadChannel.Builder.ProtocolFactory<BUF extends FriendlyByteBuf,
BASE extends CustomPacketPayload> -
字段概要
字段修饰符和类型字段说明private boolean
private final NetworkInstance
private final Map
<ResourceLocation, PayloadChannel.Message<?, ?>> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private void
add
(PayloadChannel.Message<?, ?> msg) build()
private void
<NEWBUF extends FriendlyByteBuf,
CTX, NEWBASE extends CustomPacketPayload & SimplePacket<CTX>>
PayloadHandlerProtocol<NEWBUF, NEWBASE> protocol
(io.netty.util.AttributeKey<CTX> context, NetworkProtocol<NEWBUF> protocol) Creates a builder grouping together all packets under the same protocol.<NEWBUF extends FriendlyByteBuf,
NEWBASE extends CustomPacketPayload>
PayloadProtocol<NEWBUF, NEWBASE> protocol
(NetworkProtocol<NEWBUF> protocol) Creates a builder grouping together all packets under the same protocol.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraftforge.network.payload.PayloadConnection
any, any, any, any, configuration, configuration, configuration, configuration, login, login, login, login, play, play, play, play, protocol, protocol
-
字段详细资料
-
instance
-
built
private boolean built -
payloads
-
-
构造器详细资料
-
Builder
-
-
方法详细资料
-
protocol
public <NEWBUF extends FriendlyByteBuf,NEWBASE extends CustomPacketPayload> PayloadProtocol<NEWBUF,NEWBASE> protocol(NetworkProtocol<NEWBUF> protocol) 从接口复制的说明:PayloadConnection
Creates a builder grouping together all packets under the same protocol. This will validate that the protocol matches before the packet is sent or received.- 指定者:
protocol
在接口中PayloadConnection<CustomPacketPayload>
-
protocol
public <NEWBUF extends FriendlyByteBuf,CTX, PayloadHandlerProtocol<NEWBUF,NEWBASE extends CustomPacketPayload & SimplePacket<CTX>> NEWBASE> protocol(io.netty.util.AttributeKey<CTX> context, NetworkProtocol<NEWBUF> protocol) 从接口复制的说明:PayloadConnection
Creates a builder grouping together all packets under the same protocol. This will validate that the protocol matches before the packet is sent or received.- 指定者:
protocol
在接口中PayloadConnection<CustomPacketPayload>
-
add
-
checkBuilt
private void checkBuilt() -
build
-