Package net.minecraft.server.network
Class ServerLoginNetworkHandler
java.lang.Object
net.minecraft.server.network.ServerLoginNetworkHandler
- All Implemented Interfaces:
- PacketListener,- ServerCookieResponsePacketListener,- ServerCrashSafePacketListener,- ServerLoginPacketListener,- ServerPacketListener,- TickablePacketListener
public class ServerLoginNetworkHandler
extends Object
implements ServerLoginPacketListener, TickablePacketListener
The server login network handler.
 
It listens to packets on the netty event loop and is ticked on the server thread simultaneously.
- Implementation Requirements:
- The vanilla implementation is created by a handshake network
 handler. It first receives a hello packet from the client. If it is in
 online mode, it goes through
 an additional authentication process. Then it optionally sends a network
 compression packet. Finally, when it can accept the player (no player
 UUID conflicts), it will accept the player by sending a login success
 packet and then transitions the connection's packet listener to a ServerPlayNetworkHandler.
- Mappings:
- Namespace - Name - named - net/minecraft/server/network/ServerLoginNetworkHandler- intermediary - net/minecraft/class_3248- official - asi
- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescription(package private) final ClientConnection(package private) static final Loggerprivate intprivate static final AtomicIntegerprivate final byte[]private @Nullable com.mojang.authlib.GameProfile(package private) final MinecraftServerprivate final Stringprivate ServerLoginNetworkHandler.Stateprivate static final intprivate final boolean
- 
Constructor SummaryConstructorsConstructorDescriptionServerLoginNetworkHandler(MinecraftServer server, ClientConnection connection, boolean transferred) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddCustomCrashReportInfo(CrashReport report, CrashReportSection section) voiddisconnect(Text reason) private booleanhasPlayerWithId(com.mojang.authlib.GameProfile profile) booleanvoidvoidCalled when the connection this listener listens to has disconnected.voidvoidonHello(LoginHelloC2SPacket packet) voidonKey(LoginKeyC2SPacket packet) voidprivate voidsendSuccessPacket(com.mojang.authlib.GameProfile profile) (package private) voidstartVerify(com.mojang.authlib.GameProfile profile) voidtick()Ticks this packet listener on the game engine thread.private voidtickVerify(com.mojang.authlib.GameProfile profile) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.listener.PacketListeneraccepts, createDisconnectionInfo, fillCrashReportMethods inherited from interface net.minecraft.network.listener.ServerCrashSafePacketListeneronPacketExceptionMethods inherited from interface net.minecraft.network.listener.ServerLoginPacketListenergetPhaseMethods inherited from interface net.minecraft.network.listener.ServerPacketListenergetSide
- 
Field Details- 
NEXT_AUTHENTICATOR_THREAD_ID- Mappings:
- Namespace - Name - Mixin selector - named - NEXT_AUTHENTICATOR_THREAD_ID- Lnet/minecraft/server/network/ServerLoginNetworkHandler;NEXT_AUTHENTICATOR_THREAD_ID:Ljava/util/concurrent/atomic/AtomicInteger;- intermediary - field_14157- Lnet/minecraft/class_3248;field_14157:Ljava/util/concurrent/atomic/AtomicInteger;- official - b- Lasi;b:Ljava/util/concurrent/atomic/AtomicInteger;
 
- 
LOGGER- Mappings:
- Namespace - Name - Mixin selector - named - LOGGER- Lnet/minecraft/server/network/ServerLoginNetworkHandler;LOGGER:Lorg/slf4j/Logger;- intermediary - field_14166- Lnet/minecraft/class_3248;field_14166:Lorg/slf4j/Logger;- official - c- Lasi;c:Lorg/slf4j/Logger;
 
- 
TIMEOUT_TICKSprivate static final int TIMEOUT_TICKS- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - TIMEOUT_TICKS- Lnet/minecraft/server/network/ServerLoginNetworkHandler;TIMEOUT_TICKS:I- intermediary - field_29779- Lnet/minecraft/class_3248;field_29779:I- official - d- Lasi;d:I
 
- 
nonceprivate final byte[] nonce- Mappings:
- Namespace - Name - Mixin selector - named - nonce- Lnet/minecraft/server/network/ServerLoginNetworkHandler;nonce:[B- intermediary - field_14167- Lnet/minecraft/class_3248;field_14167:[B- official - e- Lasi;e:[B
 
- 
server- Mappings:
- Namespace - Name - Mixin selector - named - server- Lnet/minecraft/server/network/ServerLoginNetworkHandler;server:Lnet/minecraft/server/MinecraftServer;- intermediary - field_14162- Lnet/minecraft/class_3248;field_14162:Lnet/minecraft/server/MinecraftServer;- official - f- Lasi;f:Lnet/minecraft/server/MinecraftServer;
 
- 
connection- Mappings:
- Namespace - Name - Mixin selector - named - connection- Lnet/minecraft/server/network/ServerLoginNetworkHandler;connection:Lnet/minecraft/network/ClientConnection;- intermediary - field_14158- Lnet/minecraft/class_3248;field_14158:Lnet/minecraft/class_2535;- official - g- Lasi;g:Lvi;
 
- 
state- Mappings:
- Namespace - Name - Mixin selector - named - state- Lnet/minecraft/server/network/ServerLoginNetworkHandler;state:Lnet/minecraft/server/network/ServerLoginNetworkHandler$State;- intermediary - field_14163- Lnet/minecraft/class_3248;field_14163:Lnet/minecraft/class_3248$class_3249;- official - h- Lasi;h:Lasi$a;
 
- 
loginTicksprivate int loginTicks- Mappings:
- Namespace - Name - Mixin selector - named - loginTicks- Lnet/minecraft/server/network/ServerLoginNetworkHandler;loginTicks:I- intermediary - field_14156- Lnet/minecraft/class_3248;field_14156:I- official - i- Lasi;i:I
 
- 
profileName- Mappings:
- Namespace - Name - Mixin selector - named - profileName- Lnet/minecraft/server/network/ServerLoginNetworkHandler;profileName:Ljava/lang/String;- intermediary - field_45028- Lnet/minecraft/class_3248;field_45028:Ljava/lang/String;- official - j- Lasi;j:Ljava/lang/String;
 
- 
profile- Mappings:
- Namespace - Name - Mixin selector - named - profile- Lnet/minecraft/server/network/ServerLoginNetworkHandler;profile:Lcom/mojang/authlib/GameProfile;- intermediary - field_45029- Lnet/minecraft/class_3248;field_45029:Lcom/mojang/authlib/GameProfile;- official - k- Lasi;k:Lcom/mojang/authlib/GameProfile;
 
- 
serverId- See Also:
- Mappings:
- Namespace - Name - Mixin selector - named - serverId- Lnet/minecraft/server/network/ServerLoginNetworkHandler;serverId:Ljava/lang/String;- intermediary - field_14165- Lnet/minecraft/class_3248;field_14165:Ljava/lang/String;- official - l- Lasi;l:Ljava/lang/String;
 
- 
transferredprivate final boolean transferred- Mappings:
- Namespace - Name - Mixin selector - named - transferred- Lnet/minecraft/server/network/ServerLoginNetworkHandler;transferred:Z- intermediary - field_48275- Lnet/minecraft/class_3248;field_48275:Z- official - m- Lasi;m:Z
 
 
- 
- 
Constructor Details- 
ServerLoginNetworkHandlerpublic ServerLoginNetworkHandler(MinecraftServer server, ClientConnection connection, boolean transferred) - Mappings:
- Namespace - Name - Mixin selector - named - <init>- Lnet/minecraft/server/network/ServerLoginNetworkHandler;<init>(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/network/ClientConnection;Z)V- intermediary - <init>- Lnet/minecraft/class_3248;<init>(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/class_2535;Z)V- official - <init>- Lasi;<init>(Lnet/minecraft/server/MinecraftServer;Lvi;Z)V
 
 
- 
- 
Method Details- 
tickpublic void tick()Ticks this packet listener on the game engine thread. The listener is responsible for synchronizing between the game engine and netty event loop threads.- Specified by:
- tickin interface- TickablePacketListener
- Mappings:
- Namespace - Name - Mixin selector - named - tick- Lnet/minecraft/network/listener/TickablePacketListener;tick()V- intermediary - method_18784- Lnet/minecraft/class_7633;method_18784()V- official - d- Lwd;d()V
 
- 
isConnectionOpenpublic boolean isConnectionOpen()- Specified by:
- isConnectionOpenin interface- PacketListener
- Mappings:
- Namespace - Name - Mixin selector - named - isConnectionOpen- Lnet/minecraft/network/listener/PacketListener;isConnectionOpen()Z- intermediary - method_48106- Lnet/minecraft/class_2547;method_48106()Z- official - c- Lvv;c()Z
 
- 
disconnect- Mappings:
- Namespace - Name - Mixin selector - named - disconnect- Lnet/minecraft/server/network/ServerLoginNetworkHandler;disconnect(Lnet/minecraft/text/Text;)V- intermediary - method_14380- Lnet/minecraft/class_3248;method_14380(Lnet/minecraft/class_2561;)V- official - a- Lasi;a(Lwp;)V
 
- 
hasPlayerWithIdprivate boolean hasPlayerWithId(com.mojang.authlib.GameProfile profile) - Mappings:
- Namespace - Name - Mixin selector - named - hasPlayerWithId- Lnet/minecraft/server/network/ServerLoginNetworkHandler;hasPlayerWithId(Lcom/mojang/authlib/GameProfile;)Z- intermediary - method_52416- Lnet/minecraft/class_3248;method_52416(Lcom/mojang/authlib/GameProfile;)Z- official - a- Lasi;a(Lcom/mojang/authlib/GameProfile;)Z
 
- 
onDisconnectedCalled when the connection this listener listens to has disconnected. Can be used to display the disconnection reason.- Specified by:
- onDisconnectedin interface- PacketListener
- Mappings:
- Namespace - Name - Mixin selector - named - onDisconnected- Lnet/minecraft/network/listener/PacketListener;onDisconnected(Lnet/minecraft/network/DisconnectionInfo;)V- intermediary - method_10839- Lnet/minecraft/class_2547;method_10839(Lnet/minecraft/class_9812;)V- official - a- Lvv;a(Lvk;)V
 
- 
getConnectionInfo- Mappings:
- Namespace - Name - Mixin selector - named - getConnectionInfo- Lnet/minecraft/server/network/ServerLoginNetworkHandler;getConnectionInfo()Ljava/lang/String;- intermediary - method_14383- Lnet/minecraft/class_3248;method_14383()Ljava/lang/String;- official - e- Lasi;e()Ljava/lang/String;
 
- 
onHello- Specified by:
- onHelloin interface- ServerLoginPacketListener
- Mappings:
- Namespace - Name - Mixin selector - named - onHello- Lnet/minecraft/network/listener/ServerLoginPacketListener;onHello(Lnet/minecraft/network/packet/c2s/login/LoginHelloC2SPacket;)V- intermediary - method_12641- Lnet/minecraft/class_2911;method_12641(Lnet/minecraft/class_2915;)V- official - a- Laiy;a(Laja;)V
 
- 
startVerifyvoid startVerify(com.mojang.authlib.GameProfile profile) - Mappings:
- Namespace - Name - Mixin selector - named - startVerify- Lnet/minecraft/server/network/ServerLoginNetworkHandler;startVerify(Lcom/mojang/authlib/GameProfile;)V- intermediary - method_52417- Lnet/minecraft/class_3248;method_52417(Lcom/mojang/authlib/GameProfile;)V- official - b- Lasi;b(Lcom/mojang/authlib/GameProfile;)V
 
- 
tickVerifyprivate void tickVerify(com.mojang.authlib.GameProfile profile) - Mappings:
- Namespace - Name - Mixin selector - named - tickVerify- Lnet/minecraft/server/network/ServerLoginNetworkHandler;tickVerify(Lcom/mojang/authlib/GameProfile;)V- intermediary - method_52419- Lnet/minecraft/class_3248;method_52419(Lcom/mojang/authlib/GameProfile;)V- official - c- Lasi;c(Lcom/mojang/authlib/GameProfile;)V
 
- 
sendSuccessPacketprivate void sendSuccessPacket(com.mojang.authlib.GameProfile profile) - Mappings:
- Namespace - Name - Mixin selector - named - sendSuccessPacket- Lnet/minecraft/server/network/ServerLoginNetworkHandler;sendSuccessPacket(Lcom/mojang/authlib/GameProfile;)V- intermediary - method_52420- Lnet/minecraft/class_3248;method_52420(Lcom/mojang/authlib/GameProfile;)V- official - d- Lasi;d(Lcom/mojang/authlib/GameProfile;)V
 
- 
onKey- Specified by:
- onKeyin interface- ServerLoginPacketListener
- Mappings:
- Namespace - Name - Mixin selector - named - onKey- Lnet/minecraft/network/listener/ServerLoginPacketListener;onKey(Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;)V- intermediary - method_12642- Lnet/minecraft/class_2911;method_12642(Lnet/minecraft/class_2917;)V- official - a- Laiy;a(Lajb;)V
 
- 
onQueryResponse- Specified by:
- onQueryResponsein interface- ServerLoginPacketListener
- Mappings:
- Namespace - Name - Mixin selector - named - onQueryResponse- Lnet/minecraft/network/listener/ServerLoginPacketListener;onQueryResponse(Lnet/minecraft/network/packet/c2s/login/LoginQueryResponseC2SPacket;)V- intermediary - method_12640- Lnet/minecraft/class_2911;method_12640(Lnet/minecraft/class_2913;)V- official - a- Laiy;a(Laiz;)V
 
- 
onEnterConfiguration- Specified by:
- onEnterConfigurationin interface- ServerLoginPacketListener
- Mappings:
- Namespace - Name - Mixin selector - named - onEnterConfiguration- Lnet/minecraft/network/listener/ServerLoginPacketListener;onEnterConfiguration(Lnet/minecraft/network/packet/c2s/login/EnterConfigurationC2SPacket;)V- intermediary - method_52289- Lnet/minecraft/class_2911;method_52289(Lnet/minecraft/class_8593;)V- official - a- Laiy;a(Lajc;)V
 
- 
addCustomCrashReportInfo- Specified by:
- addCustomCrashReportInfoin interface- PacketListener
- Mappings:
- Namespace - Name - Mixin selector - named - addCustomCrashReportInfo- Lnet/minecraft/network/listener/PacketListener;addCustomCrashReportInfo(Lnet/minecraft/util/crash/CrashReport;Lnet/minecraft/util/crash/CrashReportSection;)V- intermediary - method_55597- Lnet/minecraft/class_2547;method_55597(Lnet/minecraft/class_128;Lnet/minecraft/class_129;)V- official - a- Lvv;a(Lo;Lp;)V
 
- 
onCookieResponse- Specified by:
- onCookieResponsein interface- ServerCookieResponsePacketListener
- Mappings:
- Namespace - Name - Mixin selector - named - onCookieResponse- Lnet/minecraft/network/listener/ServerCookieResponsePacketListener;onCookieResponse(Lnet/minecraft/network/packet/c2s/common/CookieResponseC2SPacket;)V- intermediary - method_55851- Lnet/minecraft/class_9090;method_55851(Lnet/minecraft/class_9091;)V- official - a- Labi;a(Labj;)V
 
 
-