Package net.minecraftforge.network
Class NetworkRegistry.LoginPayload
java.lang.Object
net.minecraftforge.network.NetworkRegistry.LoginPayload
- Enclosing class:
- NetworkRegistry
Tracks individual outbound messages for dispatch to clients during login handling. Gathered by dispatching
NetworkEvent.GatherLoginPayloadsEvent
during early connection handling.-
Field Summary
Modifier and TypeFieldDescriptionprivate final ResourceLocation
A channel which will receive aNetworkEvent.LoginPayloadEvent
from theLoginWrapper
private final FriendlyByteBuf
The data for sendingprivate final String
Some context for logging purposesprivate final boolean
If the connection should await a response to this packet to continue with the handshake -
Constructor Summary
ConstructorDescriptionLoginPayload
(FriendlyByteBuf buffer, ResourceLocation channelName, String messageContext) LoginPayload
(FriendlyByteBuf buffer, ResourceLocation channelName, String messageContext, boolean needsResponse) -
Method Summary
-
Field Details
-
data
The data for sending -
channelName
A channel which will receive aNetworkEvent.LoginPayloadEvent
from theLoginWrapper
-
messageContext
Some context for logging purposes -
needsResponse
private final boolean needsResponseIf the connection should await a response to this packet to continue with the handshake
-
-
Constructor Details
-
LoginPayload
-
LoginPayload
public LoginPayload(FriendlyByteBuf buffer, ResourceLocation channelName, String messageContext, boolean needsResponse)
-
-
Method Details
-
getData
-
getChannelName
-
getMessageContext
-
needsResponse
public boolean needsResponse()
-