Package net.minecraftforge.network
Class PayloadChannel
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprivate static final classprivate static final recordPayloadChannel.Message<MSG extends CustomPacketPayload,BUF extends FriendlyByteBuf> Nested classes/interfaces inherited from class net.minecraftforge.network.ChannelChannel.VersionTest
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final org.apache.logging.log4j.Loggerprivate static final org.apache.logging.log4j.Markerprivate final Map<ResourceLocation, PayloadChannel.Message<?, ?>> 
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription(package private) static PayloadConnection<CustomPacketPayload> builder(NetworkInstance instance) voidencode(FriendlyByteBuf out, CustomPacketPayload message) private voidget(ResourceLocation type, boolean send) (package private) ResourceLocationgetName(CustomPacketPayload packet) Retrieves the channel name to use for the specified packet This typically is the main channel's name, but in some cases you want to specify a custom one.private voidprotected Packet<?> toVanillaPacket(Connection con, CustomPacketPayload message) Methods inherited from class net.minecraftforge.network.ChannelgetName, getProtocolVersion, isRemotePresent, reply, send, send, validate
- 
Field Details- 
LOGGERprivate static final org.apache.logging.log4j.Logger LOGGER
- 
MARKERprivate static final org.apache.logging.log4j.Marker MARKER
- 
payloads
 
- 
- 
Constructor Details- 
PayloadChannel
 
- 
- 
Method Details- 
builder
- 
getprivate PayloadChannel.Message<CustomPacketPayload,FriendlyByteBuf> get(ResourceLocation type, boolean send) 
- 
error
- 
onPacketReceived
- 
toVanillaPacket- Overrides:
- toVanillaPacketin class- Channel<CustomPacketPayload>
 
- 
getNameDescription copied from class:ChannelRetrieves the channel name to use for the specified packet This typically is the main channel's name, but in some cases you want to specify a custom one. If your channel haschildren- Overrides:
- getNamein class- Channel<CustomPacketPayload>
 
- 
encode- Specified by:
- encodein class- Channel<CustomPacketPayload>
 
 
-