Package net.minecraft.server.network
Class ServerLoginNetworkHandler
java.lang.Object
net.minecraft.server.network.ServerLoginNetworkHandler
- All Implemented Interfaces:
class_8701,PacketListener,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 official aliintermediary net/minecraft/class_3248named net/minecraft/server/network/ServerLoginNetworkHandler
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final ClientConnectionprivate static final Textprivate @Nullable com.mojang.authlib.GameProfile(package private) static final Loggerprivate intprivate static final AtomicIntegerprivate final byte[](package private) final MinecraftServerprivate final Stringprivate ServerLoginNetworkHandler.Stateprivate static final int -
Constructor Summary
ConstructorsConstructorDescriptionServerLoginNetworkHandler(MinecraftServer server, ClientConnection connection) -
Method Summary
Modifier and TypeMethodDescriptionvoiddisconnect(Text reason) booleanstatic booleanisValidName(String name) voidmethod_52289(class_8593 class_8593) private booleanmethod_52416(com.mojang.authlib.GameProfile gameProfile) (package private) voidmethod_52417(com.mojang.authlib.GameProfile gameProfile) protected static com.mojang.authlib.GameProfilemethod_52418(String string) private voidmethod_52419(com.mojang.authlib.GameProfile gameProfile) private voidmethod_52420(com.mojang.authlib.GameProfile gameProfile) voidonDisconnected(Text reason) Called when the connection this listener listens to has disconnected.voidonHello(LoginHelloC2SPacket packet) voidonKey(LoginKeyC2SPacket packet) voidvoidtick()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.class_8701
method_52895Methods inherited from interface net.minecraft.network.listener.PacketListener
method_52413Methods inherited from interface net.minecraft.network.listener.ServerLoginPacketListener
method_52280Methods inherited from interface net.minecraft.network.listener.ServerPacketListener
shouldCrashOnException
-
Field Details
-
NEXT_AUTHENTICATOR_THREAD_ID
- Mappings:
Namespace Name Mixin selector official aLali;a:Ljava/util/concurrent/atomic/AtomicInteger;intermediary field_14157Lnet/minecraft/class_3248;field_14157:Ljava/util/concurrent/atomic/AtomicInteger;named NEXT_AUTHENTICATOR_THREAD_IDLnet/minecraft/server/network/ServerLoginNetworkHandler;NEXT_AUTHENTICATOR_THREAD_ID:Ljava/util/concurrent/atomic/AtomicInteger;
-
LOGGER
- Mappings:
Namespace Name Mixin selector official bLali;b:Lorg/slf4j/Logger;intermediary field_14166Lnet/minecraft/class_3248;field_14166:Lorg/slf4j/Logger;named LOGGERLnet/minecraft/server/network/ServerLoginNetworkHandler;LOGGER:Lorg/slf4j/Logger;
-
TIMEOUT_TICKS
private static final int TIMEOUT_TICKS- See Also:
- Mappings:
Namespace Name Mixin selector official cLali;c:Iintermediary field_29779Lnet/minecraft/class_3248;field_29779:Inamed TIMEOUT_TICKSLnet/minecraft/server/network/ServerLoginNetworkHandler;TIMEOUT_TICKS:I
-
field_45027
- Mappings:
Namespace Name Mixin selector official dLali;d:Lte;intermediary field_45027Lnet/minecraft/class_3248;field_45027:Lnet/minecraft/class_2561;named field_45027Lnet/minecraft/server/network/ServerLoginNetworkHandler;field_45027:Lnet/minecraft/text/Text;
-
nonce
private final byte[] nonce- Mappings:
Namespace Name Mixin selector official eLali;e:[Bintermediary field_14167Lnet/minecraft/class_3248;field_14167:[Bnamed nonceLnet/minecraft/server/network/ServerLoginNetworkHandler;nonce:[B
-
server
- Mappings:
Namespace Name Mixin selector official fLali;f:Lnet/minecraft/server/MinecraftServer;intermediary field_14162Lnet/minecraft/class_3248;field_14162:Lnet/minecraft/server/MinecraftServer;named serverLnet/minecraft/server/network/ServerLoginNetworkHandler;server:Lnet/minecraft/server/MinecraftServer;
-
connection
- Mappings:
Namespace Name Mixin selector official gLali;g:Lsf;intermediary field_14158Lnet/minecraft/class_3248;field_14158:Lnet/minecraft/class_2535;named connectionLnet/minecraft/server/network/ServerLoginNetworkHandler;connection:Lnet/minecraft/network/ClientConnection;
-
state
- Mappings:
Namespace Name Mixin selector official hLali;h:Lali$a;intermediary field_14163Lnet/minecraft/class_3248;field_14163:Lnet/minecraft/class_3248$class_3249;named stateLnet/minecraft/server/network/ServerLoginNetworkHandler;state:Lnet/minecraft/server/network/ServerLoginNetworkHandler$State;
-
loginTicks
private int loginTicks- Mappings:
Namespace Name Mixin selector official iLali;i:Iintermediary field_14156Lnet/minecraft/class_3248;field_14156:Inamed loginTicksLnet/minecraft/server/network/ServerLoginNetworkHandler;loginTicks:I
-
field_45028
- Mappings:
Namespace Name Mixin selector official jLali;j:Ljava/lang/String;intermediary field_45028Lnet/minecraft/class_3248;field_45028:Ljava/lang/String;named field_45028Lnet/minecraft/server/network/ServerLoginNetworkHandler;field_45028:Ljava/lang/String;
-
field_45029
- Mappings:
Namespace Name Mixin selector official kLali;k:Lcom/mojang/authlib/GameProfile;intermediary field_45029Lnet/minecraft/class_3248;field_45029:Lcom/mojang/authlib/GameProfile;named field_45029Lnet/minecraft/server/network/ServerLoginNetworkHandler;field_45029:Lcom/mojang/authlib/GameProfile;
-
serverId
- See Also:
- Mappings:
Namespace Name Mixin selector official lLali;l:Ljava/lang/String;intermediary field_14165Lnet/minecraft/class_3248;field_14165:Ljava/lang/String;named serverIdLnet/minecraft/server/network/ServerLoginNetworkHandler;serverId:Ljava/lang/String;
-
-
Constructor Details
-
ServerLoginNetworkHandler
- Mappings:
Namespace Name Mixin selector official <init>Lali;<init>(Lnet/minecraft/server/MinecraftServer;Lsf;)Vintermediary <init>Lnet/minecraft/class_3248;<init>(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/class_2535;)Vnamed <init>Lnet/minecraft/server/network/ServerLoginNetworkHandler;<init>(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/network/ClientConnection;)V
-
-
Method Details
-
tick
public void tick()- Specified by:
tickin interfaceTickablePacketListener- Mappings:
Namespace Name Mixin selector official eLst;e()Vintermediary method_18784Lnet/minecraft/class_7633;method_18784()Vnamed tickLnet/minecraft/network/listener/TickablePacketListener;tick()V
-
isConnectionOpen
public boolean isConnectionOpen()- Specified by:
isConnectionOpenin interfacePacketListener- Mappings:
Namespace Name Mixin selector official cLsn;c()Zintermediary method_48106Lnet/minecraft/class_2547;method_48106()Znamed isConnectionOpenLnet/minecraft/network/listener/PacketListener;isConnectionOpen()Z
-
disconnect
- Mappings:
Namespace Name Mixin selector official bLali;b(Lte;)Vintermediary method_14380Lnet/minecraft/class_3248;method_14380(Lnet/minecraft/class_2561;)Vnamed disconnectLnet/minecraft/server/network/ServerLoginNetworkHandler;disconnect(Lnet/minecraft/text/Text;)V
-
method_52416
private boolean method_52416(com.mojang.authlib.GameProfile gameProfile) - Mappings:
Namespace Name Mixin selector official aLali;a(Lcom/mojang/authlib/GameProfile;)Zintermediary method_52416Lnet/minecraft/class_3248;method_52416(Lcom/mojang/authlib/GameProfile;)Znamed method_52416Lnet/minecraft/server/network/ServerLoginNetworkHandler;method_52416(Lcom/mojang/authlib/GameProfile;)Z
-
onDisconnected
Called when the connection this listener listens to has disconnected. Can be used to display the disconnection reason.- Specified by:
onDisconnectedin interfacePacketListener- Parameters:
reason- the reason of disconnection; may be a generic message- Mappings:
Namespace Name Mixin selector official aLsn;a(Lte;)Vintermediary method_10839Lnet/minecraft/class_2547;method_10839(Lnet/minecraft/class_2561;)Vnamed onDisconnectedLnet/minecraft/network/listener/PacketListener;onDisconnected(Lnet/minecraft/text/Text;)V
-
getConnectionInfo
- Mappings:
Namespace Name Mixin selector official fLali;f()Ljava/lang/String;intermediary method_14383Lnet/minecraft/class_3248;method_14383()Ljava/lang/String;named getConnectionInfoLnet/minecraft/server/network/ServerLoginNetworkHandler;getConnectionInfo()Ljava/lang/String;
-
onHello
- Specified by:
onHelloin interfaceServerLoginPacketListener- Mappings:
Namespace Name Mixin selector official aLadd;a(Ladf;)Vintermediary method_12641Lnet/minecraft/class_2911;method_12641(Lnet/minecraft/class_2915;)Vnamed onHelloLnet/minecraft/network/listener/ServerLoginPacketListener;onHello(Lnet/minecraft/network/packet/c2s/login/LoginHelloC2SPacket;)V
-
method_52417
void method_52417(com.mojang.authlib.GameProfile gameProfile) - Mappings:
Namespace Name Mixin selector official bLali;b(Lcom/mojang/authlib/GameProfile;)Vintermediary method_52417Lnet/minecraft/class_3248;method_52417(Lcom/mojang/authlib/GameProfile;)Vnamed method_52417Lnet/minecraft/server/network/ServerLoginNetworkHandler;method_52417(Lcom/mojang/authlib/GameProfile;)V
-
method_52419
private void method_52419(com.mojang.authlib.GameProfile gameProfile) - Mappings:
Namespace Name Mixin selector official cLali;c(Lcom/mojang/authlib/GameProfile;)Vintermediary method_52419Lnet/minecraft/class_3248;method_52419(Lcom/mojang/authlib/GameProfile;)Vnamed method_52419Lnet/minecraft/server/network/ServerLoginNetworkHandler;method_52419(Lcom/mojang/authlib/GameProfile;)V
-
method_52420
private void method_52420(com.mojang.authlib.GameProfile gameProfile) - Mappings:
Namespace Name Mixin selector official dLali;d(Lcom/mojang/authlib/GameProfile;)Vintermediary method_52420Lnet/minecraft/class_3248;method_52420(Lcom/mojang/authlib/GameProfile;)Vnamed method_52420Lnet/minecraft/server/network/ServerLoginNetworkHandler;method_52420(Lcom/mojang/authlib/GameProfile;)V
-
isValidName
- Mappings:
Namespace Name Mixin selector official aLali;a(Ljava/lang/String;)Zintermediary method_40085Lnet/minecraft/class_3248;method_40085(Ljava/lang/String;)Znamed isValidNameLnet/minecraft/server/network/ServerLoginNetworkHandler;isValidName(Ljava/lang/String;)Z
-
onKey
- Specified by:
onKeyin interfaceServerLoginPacketListener- Mappings:
Namespace Name Mixin selector official aLadd;a(Ladg;)Vintermediary method_12642Lnet/minecraft/class_2911;method_12642(Lnet/minecraft/class_2917;)Vnamed onKeyLnet/minecraft/network/listener/ServerLoginPacketListener;onKey(Lnet/minecraft/network/packet/c2s/login/LoginKeyC2SPacket;)V
-
onQueryResponse
- Specified by:
onQueryResponsein interfaceServerLoginPacketListener- Mappings:
Namespace Name Mixin selector official aLadd;a(Lade;)Vintermediary method_12640Lnet/minecraft/class_2911;method_12640(Lnet/minecraft/class_2913;)Vnamed onQueryResponseLnet/minecraft/network/listener/ServerLoginPacketListener;onQueryResponse(Lnet/minecraft/network/packet/c2s/login/LoginQueryResponseC2SPacket;)V
-
method_52289
- Specified by:
method_52289in interfaceServerLoginPacketListener- Mappings:
Namespace Name Mixin selector official aLadd;a(Ladh;)Vintermediary method_52289Lnet/minecraft/class_2911;method_52289(Lnet/minecraft/class_8593;)Vnamed method_52289Lnet/minecraft/network/listener/ServerLoginPacketListener;method_52289(Lnet/minecraft/class_8593;)V
-
method_52418
- Mappings:
Namespace Name Mixin selector official bLali;b(Ljava/lang/String;)Lcom/mojang/authlib/GameProfile;intermediary method_52418Lnet/minecraft/class_3248;method_52418(Ljava/lang/String;)Lcom/mojang/authlib/GameProfile;named method_52418Lnet/minecraft/server/network/ServerLoginNetworkHandler;method_52418(Ljava/lang/String;)Lcom/mojang/authlib/GameProfile;
-