@Environment(value=CLIENT) public class ClientLoginNetworkHandler extends Object implements ClientLoginPacketListener
Modifier and Type | Field and Description |
---|---|
private MinecraftClient |
client |
private ClientConnection |
connection |
private static Logger |
LOGGER |
private Screen |
parentGui |
private com.mojang.authlib.GameProfile |
profile |
private Consumer<Text> |
statusConsumer |
Constructor and Description |
---|
ClientLoginNetworkHandler(ClientConnection connection,
MinecraftClient client,
Screen parentGui,
Consumer<Text> statusConsumer) |
Modifier and Type | Method and Description |
---|---|
ClientConnection |
getConnection() |
private com.mojang.authlib.minecraft.MinecraftSessionService |
getSessionService() |
private Text |
joinServerSession(String serverId) |
void |
onCompression(LoginCompressionS2CPacket packet) |
void |
onDisconnect(LoginDisconnectS2CPacket packet) |
void |
onDisconnected(Text reason) |
void |
onHello(LoginHelloS2CPacket packet) |
void |
onLoginSuccess(LoginSuccessS2CPacket packet) |
void |
onQueryRequest(LoginQueryRequestS2CPacket packet) |
private static final Logger LOGGER
private final MinecraftClient client
private final ClientConnection connection
private com.mojang.authlib.GameProfile profile
public ClientLoginNetworkHandler(ClientConnection connection, MinecraftClient client, @Nullable Screen parentGui, Consumer<Text> statusConsumer)
public void onHello(LoginHelloS2CPacket packet)
onHello
in interface ClientLoginPacketListener
private com.mojang.authlib.minecraft.MinecraftSessionService getSessionService()
public void onLoginSuccess(LoginSuccessS2CPacket packet)
onLoginSuccess
in interface ClientLoginPacketListener
public void onDisconnected(Text reason)
onDisconnected
in interface PacketListener
public ClientConnection getConnection()
getConnection
in interface PacketListener
public void onDisconnect(LoginDisconnectS2CPacket packet)
onDisconnect
in interface ClientLoginPacketListener
public void onCompression(LoginCompressionS2CPacket packet)
onCompression
in interface ClientLoginPacketListener
public void onQueryRequest(LoginQueryRequestS2CPacket packet)
onQueryRequest
in interface ClientLoginPacketListener