Package net.minecraft.server.network
Class ServerCommonNetworkHandler
java.lang.Object
net.minecraft.server.network.ServerCommonNetworkHandler
- All Implemented Interfaces:
PacketListener,ServerCommonPacketListener,ServerCrashSafePacketListener,ServerPacketListener
- Direct Known Subclasses:
ServerConfigurationNetworkHandler,ServerPlayNetworkHandler
public abstract class ServerCommonNetworkHandler
extends Object
implements ServerCommonPacketListener
- Mappings:
Namespace Name official aldintermediary net/minecraft/class_8609named net/minecraft/server/network/ServerCommonNetworkHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ClientConnectionstatic final intprivate longprivate longprivate intprivate static final Loggerprotected final MinecraftServerprivate static final Textprivate boolean -
Constructor Summary
ConstructorsConstructorDescriptionServerCommonNetworkHandler(MinecraftServer server, ClientConnection connection, int keepAliveId) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbaseTick()voiddisconnect(Text reason) voidflush()com.mojang.authlib.GameProfileintprotected abstract com.mojang.authlib.GameProfileprotected booleanisHost()voidvoidonDisconnected(Text reason) Called when the connection this listener listens to has disconnected.voidonKeepAlive(KeepAliveC2SPacket packet) voidonPlayPong(PlayPongC2SPacket packet) voidvoidsend(Packet<?> packet, @Nullable PacketCallbacks callbacks, boolean flush) voidsendPacket(Packet<?> packet) voidsendPacketWithoutFlush(Packet<?> packet) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.listener.PacketListener
accepts, getState, isConnectionOpenMethods inherited from interface net.minecraft.network.listener.ServerCrashSafePacketListener
shouldCrashOnExceptionMethods inherited from interface net.minecraft.network.listener.ServerPacketListener
getSide
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official dLald;d:Lorg/slf4j/Logger;intermediary field_45014Lnet/minecraft/class_8609;field_45014:Lorg/slf4j/Logger;named LOGGERLnet/minecraft/server/network/ServerCommonNetworkHandler;LOGGER:Lorg/slf4j/Logger;
-
KEEP_ALIVE_INTERVAL
public static final int KEEP_ALIVE_INTERVAL- See Also:
- Mappings:
Namespace Name Mixin selector official aLald;a:Iintermediary field_45011Lnet/minecraft/class_8609;field_45011:Inamed KEEP_ALIVE_INTERVALLnet/minecraft/server/network/ServerCommonNetworkHandler;KEEP_ALIVE_INTERVAL:I
-
TIMEOUT_TEXT
- Mappings:
Namespace Name Mixin selector official eLald;e:Lte;intermediary field_45015Lnet/minecraft/class_8609;field_45015:Lnet/minecraft/class_2561;named TIMEOUT_TEXTLnet/minecraft/server/network/ServerCommonNetworkHandler;TIMEOUT_TEXT:Lnet/minecraft/text/Text;
-
server
- Mappings:
Namespace Name Mixin selector official bLald;b:Lnet/minecraft/server/MinecraftServer;intermediary field_45012Lnet/minecraft/class_8609;field_45012:Lnet/minecraft/server/MinecraftServer;named serverLnet/minecraft/server/network/ServerCommonNetworkHandler;server:Lnet/minecraft/server/MinecraftServer;
-
connection
- Mappings:
Namespace Name Mixin selector official cLald;c:Lsf;intermediary field_45013Lnet/minecraft/class_8609;field_45013:Lnet/minecraft/class_2535;named connectionLnet/minecraft/server/network/ServerCommonNetworkHandler;connection:Lnet/minecraft/network/ClientConnection;
-
lastKeepAliveTime
private long lastKeepAliveTime- Mappings:
Namespace Name Mixin selector official fLald;f:Jintermediary field_45016Lnet/minecraft/class_8609;field_45016:Jnamed lastKeepAliveTimeLnet/minecraft/server/network/ServerCommonNetworkHandler;lastKeepAliveTime:J
-
waitingForKeepAlive
private boolean waitingForKeepAlive- Mappings:
Namespace Name Mixin selector official gLald;g:Zintermediary field_45017Lnet/minecraft/class_8609;field_45017:Znamed waitingForKeepAliveLnet/minecraft/server/network/ServerCommonNetworkHandler;waitingForKeepAlive:Z
-
keepAliveId
private long keepAliveId- Mappings:
Namespace Name Mixin selector official hLald;h:Jintermediary field_45018Lnet/minecraft/class_8609;field_45018:Jnamed keepAliveIdLnet/minecraft/server/network/ServerCommonNetworkHandler;keepAliveId:J
-
latency
private int latency- Mappings:
Namespace Name Mixin selector official iLald;i:Iintermediary field_45019Lnet/minecraft/class_8609;field_45019:Inamed latencyLnet/minecraft/server/network/ServerCommonNetworkHandler;latency:I
-
-
Constructor Details
-
ServerCommonNetworkHandler
public ServerCommonNetworkHandler(MinecraftServer server, ClientConnection connection, int keepAliveId) - Mappings:
Namespace Name Mixin selector official <init>Lald;<init>(Lnet/minecraft/server/MinecraftServer;Lsf;I)Vintermediary <init>Lnet/minecraft/class_8609;<init>(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/class_2535;I)Vnamed <init>Lnet/minecraft/server/network/ServerCommonNetworkHandler;<init>(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/network/ClientConnection;I)V
-
-
Method Details
-
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
-
onKeepAlive
- Specified by:
onKeepAlivein interfaceServerCommonPacketListener- Mappings:
Namespace Name Mixin selector official aLvg;a(Lvi;)Vintermediary method_52393Lnet/minecraft/class_8706;method_52393(Lnet/minecraft/class_2827;)Vnamed onKeepAliveLnet/minecraft/network/listener/ServerCommonPacketListener;onKeepAlive(Lnet/minecraft/network/packet/c2s/common/KeepAliveC2SPacket;)V
-
onPlayPong
- Specified by:
onPlayPongin interfaceServerCommonPacketListener- Mappings:
Namespace Name Mixin selector official aLvg;a(Lvj;)Vintermediary method_52394Lnet/minecraft/class_8706;method_52394(Lnet/minecraft/class_6374;)Vnamed onPlayPongLnet/minecraft/network/listener/ServerCommonPacketListener;onPlayPong(Lnet/minecraft/network/packet/c2s/common/PlayPongC2SPacket;)V
-
onCustomPayload
- Specified by:
onCustomPayloadin interfaceServerCommonPacketListener- Mappings:
Namespace Name Mixin selector official aLvg;a(Lvh;)Vintermediary method_52392Lnet/minecraft/class_8706;method_52392(Lnet/minecraft/class_2817;)Vnamed onCustomPayloadLnet/minecraft/network/listener/ServerCommonPacketListener;onCustomPayload(Lnet/minecraft/network/packet/c2s/common/CustomPayloadC2SPacket;)V
-
onResourcePackStatus
- Specified by:
onResourcePackStatusin interfaceServerCommonPacketListener- Mappings:
Namespace Name Mixin selector official aLvg;a(Lvk;)Vintermediary method_52395Lnet/minecraft/class_8706;method_52395(Lnet/minecraft/class_2856;)Vnamed onResourcePackStatusLnet/minecraft/network/listener/ServerCommonPacketListener;onResourcePackStatus(Lnet/minecraft/network/packet/c2s/common/ResourcePackStatusC2SPacket;)V
-
baseTick
protected void baseTick()- Mappings:
Namespace Name Mixin selector official fLald;f()Vintermediary method_52400Lnet/minecraft/class_8609;method_52400()Vnamed baseTickLnet/minecraft/server/network/ServerCommonNetworkHandler;baseTick()V
-
sendPacket
- Mappings:
Namespace Name Mixin selector official bLald;b(Luw;)Vintermediary method_14364Lnet/minecraft/class_8609;method_14364(Lnet/minecraft/class_2596;)Vnamed sendPacketLnet/minecraft/server/network/ServerCommonNetworkHandler;sendPacket(Lnet/minecraft/network/packet/Packet;)V
-
sendPacketWithoutFlush
- Mappings:
Namespace Name Mixin selector official cLald;c(Luw;)Vintermediary method_52398Lnet/minecraft/class_8609;method_52398(Lnet/minecraft/class_2596;)Vnamed sendPacketWithoutFlushLnet/minecraft/server/network/ServerCommonNetworkHandler;sendPacketWithoutFlush(Lnet/minecraft/network/packet/Packet;)V
-
flush
public void flush()- Mappings:
Namespace Name Mixin selector official gLald;g()Vintermediary method_52401Lnet/minecraft/class_8609;method_52401()Vnamed flushLnet/minecraft/server/network/ServerCommonNetworkHandler;flush()V
-
send
- Mappings:
Namespace Name Mixin selector official aLald;a(Luw;Lso;Z)Vintermediary method_52391Lnet/minecraft/class_8609;method_52391(Lnet/minecraft/class_2596;Lnet/minecraft/class_7648;Z)Vnamed sendLnet/minecraft/server/network/ServerCommonNetworkHandler;send(Lnet/minecraft/network/packet/Packet;Lnet/minecraft/network/PacketCallbacks;Z)V
-
disconnect
- Mappings:
Namespace Name Mixin selector official bLald;b(Lte;)Vintermediary method_52396Lnet/minecraft/class_8609;method_52396(Lnet/minecraft/class_2561;)Vnamed disconnectLnet/minecraft/server/network/ServerCommonNetworkHandler;disconnect(Lnet/minecraft/text/Text;)V
-
isHost
protected boolean isHost()- Mappings:
Namespace Name Mixin selector official hLald;h()Zintermediary method_52402Lnet/minecraft/class_8609;method_52402()Znamed isHostLnet/minecraft/server/network/ServerCommonNetworkHandler;isHost()Z
-
getProfile
protected abstract com.mojang.authlib.GameProfile getProfile()- Mappings:
Namespace Name Mixin selector official iLald;i()Lcom/mojang/authlib/GameProfile;intermediary method_52403Lnet/minecraft/class_8609;method_52403()Lcom/mojang/authlib/GameProfile;named getProfileLnet/minecraft/server/network/ServerCommonNetworkHandler;getProfile()Lcom/mojang/authlib/GameProfile;
-
getDebugProfile
public com.mojang.authlib.GameProfile getDebugProfile()- Mappings:
Namespace Name Mixin selector official jLald;j()Lcom/mojang/authlib/GameProfile;intermediary method_52404Lnet/minecraft/class_8609;method_52404()Lcom/mojang/authlib/GameProfile;named getDebugProfileLnet/minecraft/server/network/ServerCommonNetworkHandler;getDebugProfile()Lcom/mojang/authlib/GameProfile;
-
getLatency
public int getLatency()- Mappings:
Namespace Name Mixin selector official kLald;k()Iintermediary method_52405Lnet/minecraft/class_8609;method_52405()Inamed getLatencyLnet/minecraft/server/network/ServerCommonNetworkHandler;getLatency()I
-