Package net.minecraft.client.network
Class ClientCommonNetworkHandler
java.lang.Object
net.minecraft.client.network.ClientCommonNetworkHandler
- All Implemented Interfaces:
ClientCommonPacketListener,ClientCookieRequestPacketListener,ClientPacketListener,PacketListener
- Direct Known Subclasses:
ClientConfigurationNetworkHandler,ClientPlayNetworkHandler
@Environment(CLIENT)
public abstract class ClientCommonNetworkHandler
extends Object
implements ClientCommonPacketListener
- Mappings:
Namespace Name named net/minecraft/client/network/ClientCommonNetworkHandlerintermediary net/minecraft/class_8673official grj
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classprivate static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final MinecraftClientprotected final ClientConnectionprivate static final Loggerprivate static final Textprivate final List<ClientCommonNetworkHandler.QueuedPacket> protected final Map<Identifier, byte[]> protected final @Nullable ServerInfoprivate ServerLinksprotected booleanprotected final WorldSession -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClientCommonNetworkHandler(MinecraftClient client, ClientConnection connection, ClientConnectionState connectionState) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidaddCustomCrashReportInfo(CrashReport report, CrashReportSection section) voidprivate ScreencreateConfirmServerResourcePackScreen(UUID id, URL url, String hash, boolean required, @Nullable Text prompt) protected abstract DialogNetworkAccessprotected ScreencreateDisconnectionInfo(Text reason, Throwable exception) getBrand()(package private) static TextvoidonClearDialog(ClearDialogS2CPacket packet) voidprotected abstract voidonCustomPayload(CustomPayload payload) voidvoidvoidonDisconnect(DisconnectS2CPacket packet) voidCalled when the connection this listener listens to has disconnected.voidonKeepAlive(KeepAliveS2CPacket packet) voidonPacketException(Packet packet, Exception exception) voidonPing(CommonPingS2CPacket packet) voidvoidvoidonServerLinks(ServerLinksS2CPacket packet) voidvoidonShowDialog(ShowDialogS2CPacket packet) voidonStoreCookie(StoreCookieS2CPacket packet) savePacketErrorReport(@Nullable Packet packet, Throwable exception) private voidsend(Packet<? extends ServerPacketListener> packet, BooleanSupplier sendCondition, Duration expiry) voidsendPacket(Packet<?> packet) protected voidvoidshowDialog(RegistryEntry<Dialog> dialog) 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.ClientCommonPacketListener
onSynchronizeTagsMethods inherited from interface net.minecraft.network.listener.ClientPacketListener
getSideMethods inherited from interface net.minecraft.network.listener.PacketListener
fillCrashReport, getPhase, isConnectionOpen
-
Field Details
-
LOST_CONNECTION_TEXT
- Mappings:
Namespace Name Mixin selector named LOST_CONNECTION_TEXTLnet/minecraft/client/network/ClientCommonNetworkHandler;LOST_CONNECTION_TEXT:Lnet/minecraft/text/Text;intermediary field_45594Lnet/minecraft/class_8673;field_45594:Lnet/minecraft/class_2561;official jLgrj;j:Lxo;
-
LOGGER
- Mappings:
Namespace Name Mixin selector named LOGGERLnet/minecraft/client/network/ClientCommonNetworkHandler;LOGGER:Lorg/slf4j/Logger;intermediary field_45944Lnet/minecraft/class_8673;field_45944:Lorg/slf4j/Logger;official kLgrj;k:Lorg/slf4j/Logger;
-
client
- Mappings:
Namespace Name Mixin selector named clientLnet/minecraft/client/network/ClientCommonNetworkHandler;client:Lnet/minecraft/client/MinecraftClient;intermediary field_45588Lnet/minecraft/class_8673;field_45588:Lnet/minecraft/class_310;official aLgrj;a:Lfue;
-
connection
- Mappings:
Namespace Name Mixin selector named connectionLnet/minecraft/client/network/ClientCommonNetworkHandler;connection:Lnet/minecraft/network/ClientConnection;intermediary field_45589Lnet/minecraft/class_8673;field_45589:Lnet/minecraft/class_2535;official bLgrj;b:Lwd;
-
serverInfo
- Mappings:
Namespace Name Mixin selector named serverInfoLnet/minecraft/client/network/ClientCommonNetworkHandler;serverInfo:Lnet/minecraft/client/network/ServerInfo;intermediary field_45590Lnet/minecraft/class_8673;field_45590:Lnet/minecraft/class_642;official cLgrj;c:Lgsb;
-
brand
- Mappings:
Namespace Name Mixin selector named brandLnet/minecraft/client/network/ClientCommonNetworkHandler;brand:Ljava/lang/String;intermediary field_45591Lnet/minecraft/class_8673;field_45591:Ljava/lang/String;official dLgrj;d:Ljava/lang/String;
-
worldSession
- Mappings:
Namespace Name Mixin selector named worldSessionLnet/minecraft/client/network/ClientCommonNetworkHandler;worldSession:Lnet/minecraft/client/session/telemetry/WorldSession;intermediary field_45592Lnet/minecraft/class_8673;field_45592:Lnet/minecraft/class_7975;official eLgrj;e:Lhxi;
-
postDisconnectScreen
- Mappings:
Namespace Name Mixin selector named postDisconnectScreenLnet/minecraft/client/network/ClientCommonNetworkHandler;postDisconnectScreen:Lnet/minecraft/client/gui/screen/Screen;intermediary field_45593Lnet/minecraft/class_8673;field_45593:Lnet/minecraft/class_437;official fLgrj;f:Lger;
-
transferring
protected boolean transferring- Mappings:
Namespace Name Mixin selector named transferringLnet/minecraft/client/network/ClientCommonNetworkHandler;transferring:Zintermediary field_51516Lnet/minecraft/class_8673;field_51516:Zofficial gLgrj;g:Z
-
queuedPackets
- Mappings:
Namespace Name Mixin selector named queuedPacketsLnet/minecraft/client/network/ClientCommonNetworkHandler;queuedPackets:Ljava/util/List;intermediary field_45595Lnet/minecraft/class_8673;field_45595:Ljava/util/List;official lLgrj;l:Ljava/util/List;
-
serverCookies
- Mappings:
Namespace Name Mixin selector named serverCookiesLnet/minecraft/client/network/ClientCommonNetworkHandler;serverCookies:Ljava/util/Map;intermediary field_48399Lnet/minecraft/class_8673;field_48399:Ljava/util/Map;official hLgrj;h:Ljava/util/Map;
-
customReportDetails
- Mappings:
Namespace Name Mixin selector named customReportDetailsLnet/minecraft/client/network/ClientCommonNetworkHandler;customReportDetails:Ljava/util/Map;intermediary field_52154Lnet/minecraft/class_8673;field_52154:Ljava/util/Map;official iLgrj;i:Ljava/util/Map;
-
serverLinks
- Mappings:
Namespace Name Mixin selector named serverLinksLnet/minecraft/client/network/ClientCommonNetworkHandler;serverLinks:Lnet/minecraft/server/ServerLinks;intermediary field_52155Lnet/minecraft/class_8673;field_52155:Lnet/minecraft/class_9782;official mLgrj;m:Lamw;
-
-
Constructor Details
-
ClientCommonNetworkHandler
protected ClientCommonNetworkHandler(MinecraftClient client, ClientConnection connection, ClientConnectionState connectionState) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/client/network/ClientCommonNetworkHandler;<init>(Lnet/minecraft/client/MinecraftClient;Lnet/minecraft/network/ClientConnection;Lnet/minecraft/client/network/ClientConnectionState;)Vintermediary <init>Lnet/minecraft/class_8673;<init>(Lnet/minecraft/class_310;Lnet/minecraft/class_2535;Lnet/minecraft/class_8675;)Vofficial <init>Lgrj;<init>(Lfue;Lwd;Lgrr;)V
-
-
Method Details
-
getServerLinks
- Mappings:
Namespace Name Mixin selector named getServerLinksLnet/minecraft/client/network/ClientCommonNetworkHandler;getServerLinks()Lnet/minecraft/server/ServerLinks;intermediary method_72016Lnet/minecraft/class_8673;method_72016()Lnet/minecraft/class_9782;official aLgrj;a()Lamw;
-
onPacketException
- Specified by:
onPacketExceptionin interfacePacketListener- Mappings:
Namespace Name Mixin selector named onPacketExceptionLnet/minecraft/network/listener/PacketListener;onPacketException(Lnet/minecraft/network/packet/Packet;Ljava/lang/Exception;)Vintermediary method_59807Lnet/minecraft/class_2547;method_59807(Lnet/minecraft/class_2596;Ljava/lang/Exception;)Vofficial aLws;a(Lzw;Ljava/lang/Exception;)V
-
createDisconnectionInfo
- Specified by:
createDisconnectionInfoin interfacePacketListener- Mappings:
Namespace Name Mixin selector named createDisconnectionInfoLnet/minecraft/network/listener/PacketListener;createDisconnectionInfo(Lnet/minecraft/text/Text;Ljava/lang/Throwable;)Lnet/minecraft/network/DisconnectionInfo;intermediary method_60881Lnet/minecraft/class_2547;method_60881(Lnet/minecraft/class_2561;Ljava/lang/Throwable;)Lnet/minecraft/class_9812;official aLws;a(Lxo;Ljava/lang/Throwable;)Lwf;
-
savePacketErrorReport
private Optional<Path> savePacketErrorReport(@Nullable @Nullable Packet packet, Throwable exception) - Mappings:
Namespace Name Mixin selector named savePacketErrorReportLnet/minecraft/client/network/ClientCommonNetworkHandler;savePacketErrorReport(Lnet/minecraft/network/packet/Packet;Ljava/lang/Throwable;)Ljava/util/Optional;intermediary method_60882Lnet/minecraft/class_8673;method_60882(Lnet/minecraft/class_2596;Ljava/lang/Throwable;)Ljava/util/Optional;official aLgrj;a(Lzw;Ljava/lang/Throwable;)Ljava/util/Optional;
-
accepts
- Specified by:
acceptsin interfacePacketListener- Mappings:
Namespace Name Mixin selector named acceptsLnet/minecraft/network/listener/PacketListener;accepts(Lnet/minecraft/network/packet/Packet;)Zintermediary method_52413Lnet/minecraft/class_2547;method_52413(Lnet/minecraft/class_2596;)Zofficial aLws;a(Lzw;)Z
-
onKeepAlive
- Specified by:
onKeepAlivein interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector named onKeepAliveLnet/minecraft/network/listener/ClientCommonPacketListener;onKeepAlive(Lnet/minecraft/network/packet/s2c/common/KeepAliveS2CPacket;)Vintermediary method_52782Lnet/minecraft/class_8705;method_52782(Lnet/minecraft/class_2670;)Vofficial aLaae;a(Laaj;)V
-
onPing
- Specified by:
onPingin interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector named onPingLnet/minecraft/network/listener/ClientCommonPacketListener;onPing(Lnet/minecraft/network/packet/s2c/common/CommonPingS2CPacket;)Vintermediary method_52783Lnet/minecraft/class_8705;method_52783(Lnet/minecraft/class_6373;)Vofficial aLaae;a(Laak;)V
-
onCustomPayload
- Specified by:
onCustomPayloadin interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector named onCustomPayloadLnet/minecraft/network/listener/ClientCommonPacketListener;onCustomPayload(Lnet/minecraft/network/packet/s2c/common/CustomPayloadS2CPacket;)Vintermediary method_52780Lnet/minecraft/class_8705;method_52780(Lnet/minecraft/class_2658;)Vofficial aLaae;a(Laag;)V
-
onCustomPayload
- Mappings:
Namespace Name Mixin selector named onCustomPayloadLnet/minecraft/client/network/ClientCommonNetworkHandler;onCustomPayload(Lnet/minecraft/network/packet/CustomPayload;)Vintermediary method_11152Lnet/minecraft/class_8673;method_11152(Lnet/minecraft/class_8710;)Vofficial aLgrj;a(Labe;)V
-
onResourcePackSend
- Specified by:
onResourcePackSendin interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector named onResourcePackSendLnet/minecraft/network/listener/ClientCommonPacketListener;onResourcePackSend(Lnet/minecraft/network/packet/s2c/common/ResourcePackSendS2CPacket;)Vintermediary method_52784Lnet/minecraft/class_8705;method_52784(Lnet/minecraft/class_2720;)Vofficial aLaae;a(Laam;)V
-
onResourcePackRemove
- Specified by:
onResourcePackRemovein interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector named onResourcePackRemoveLnet/minecraft/network/listener/ClientCommonPacketListener;onResourcePackRemove(Lnet/minecraft/network/packet/s2c/common/ResourcePackRemoveS2CPacket;)Vintermediary method_55512Lnet/minecraft/class_8705;method_55512(Lnet/minecraft/class_9053;)Vofficial aLaae;a(Laal;)V
-
getPrompt
- Mappings:
Namespace Name Mixin selector named getPromptLnet/minecraft/client/network/ClientCommonNetworkHandler;getPrompt(Lnet/minecraft/text/Text;Lnet/minecraft/text/Text;)Lnet/minecraft/text/Text;intermediary method_52778Lnet/minecraft/class_8673;method_52778(Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;)Lnet/minecraft/class_2561;official aLgrj;a(Lxo;Lxo;)Lxo;
-
getParsedResourcePackUrl
- Mappings:
Namespace Name Mixin selector named getParsedResourcePackUrlLnet/minecraft/client/network/ClientCommonNetworkHandler;getParsedResourcePackUrl(Ljava/lang/String;)Ljava/net/URL;intermediary method_52773Lnet/minecraft/class_8673;method_52773(Ljava/lang/String;)Ljava/net/URL;official aLgrj;a(Ljava/lang/String;)Ljava/net/URL;
-
onCookieRequest
- Specified by:
onCookieRequestin interfaceClientCookieRequestPacketListener- Mappings:
Namespace Name Mixin selector named onCookieRequestLnet/minecraft/network/listener/ClientCookieRequestPacketListener;onCookieRequest(Lnet/minecraft/network/packet/s2c/common/CookieRequestS2CPacket;)Vintermediary method_55845Lnet/minecraft/class_9087;method_55845(Lnet/minecraft/class_9088;)Vofficial aLack;a(Lacl;)V
-
onStoreCookie
- Specified by:
onStoreCookiein interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector named onStoreCookieLnet/minecraft/network/listener/ClientCommonPacketListener;onStoreCookie(Lnet/minecraft/network/packet/s2c/common/StoreCookieS2CPacket;)Vintermediary method_56149Lnet/minecraft/class_8705;method_56149(Lnet/minecraft/class_9150;)Vofficial aLaae;a(Laap;)V
-
onCustomReportDetails
- Specified by:
onCustomReportDetailsin interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector named onCustomReportDetailsLnet/minecraft/network/listener/ClientCommonPacketListener;onCustomReportDetails(Lnet/minecraft/network/packet/s2c/common/CustomReportDetailsS2CPacket;)Vintermediary method_60883Lnet/minecraft/class_8705;method_60883(Lnet/minecraft/class_9814;)Vofficial aLaae;a(Laah;)V
-
onServerLinks
- Specified by:
onServerLinksin interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector named onServerLinksLnet/minecraft/network/listener/ClientCommonPacketListener;onServerLinks(Lnet/minecraft/network/packet/s2c/common/ServerLinksS2CPacket;)Vintermediary method_60884Lnet/minecraft/class_8705;method_60884(Lnet/minecraft/class_9815;)Vofficial aLaae;a(Laan;)V
-
onShowDialog
- Specified by:
onShowDialogin interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector named onShowDialogLnet/minecraft/network/listener/ClientCommonPacketListener;onShowDialog(Lnet/minecraft/network/packet/s2c/common/ShowDialogS2CPacket;)Vintermediary method_71666Lnet/minecraft/class_8705;method_71666(Lnet/minecraft/class_11407;)Vofficial aLaae;a(Laao;)V
-
createDialogNetworkAccess
- Mappings:
Namespace Name Mixin selector named createDialogNetworkAccessLnet/minecraft/client/network/ClientCommonNetworkHandler;createDialogNetworkAccess()Lnet/minecraft/client/gui/screen/dialog/DialogNetworkAccess;intermediary method_72017Lnet/minecraft/class_8673;method_72017()Lnet/minecraft/class_11513;official eLgrj;e()Lgfg;
-
showDialog
- Mappings:
Namespace Name Mixin selector named showDialogLnet/minecraft/client/network/ClientCommonNetworkHandler;showDialog(Lnet/minecraft/registry/entry/RegistryEntry;)Vintermediary method_71924Lnet/minecraft/class_8673;method_71924(Lnet/minecraft/class_6880;)Vofficial aLgrj;a(Ljl;)V
-
onClearDialog
- Specified by:
onClearDialogin interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector named onClearDialogLnet/minecraft/network/listener/ClientCommonPacketListener;onClearDialog(Lnet/minecraft/network/packet/s2c/common/ClearDialogS2CPacket;)Vintermediary method_71665Lnet/minecraft/class_8705;method_71665(Lnet/minecraft/class_11406;)Vofficial aLaae;a(Laaf;)V
-
clearDialog
public void clearDialog()- Mappings:
Namespace Name Mixin selector named clearDialogLnet/minecraft/client/network/ClientCommonNetworkHandler;clearDialog()Vintermediary method_72018Lnet/minecraft/class_8673;method_72018()Vofficial fLgrj;f()V
-
onServerTransfer
- Specified by:
onServerTransferin interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector named onServerTransferLnet/minecraft/network/listener/ClientCommonPacketListener;onServerTransfer(Lnet/minecraft/network/packet/s2c/common/ServerTransferS2CPacket;)Vintermediary method_56150Lnet/minecraft/class_8705;method_56150(Lnet/minecraft/class_9151;)Vofficial aLaae;a(Laaq;)V
-
onDisconnect
- Specified by:
onDisconnectin interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector named onDisconnectLnet/minecraft/network/listener/ClientCommonPacketListener;onDisconnect(Lnet/minecraft/network/packet/s2c/common/DisconnectS2CPacket;)Vintermediary method_52781Lnet/minecraft/class_8705;method_52781(Lnet/minecraft/class_2661;)Vofficial aLaae;a(Laai;)V
-
sendQueuedPackets
protected void sendQueuedPackets()- Mappings:
Namespace Name Mixin selector named sendQueuedPacketsLnet/minecraft/client/network/ClientCommonNetworkHandler;sendQueuedPackets()Vintermediary method_52789Lnet/minecraft/class_8673;method_52789()Vofficial gLgrj;g()V
-
sendPacket
- Mappings:
Namespace Name Mixin selector named sendPacketLnet/minecraft/client/network/ClientCommonNetworkHandler;sendPacket(Lnet/minecraft/network/packet/Packet;)Vintermediary method_52787Lnet/minecraft/class_8673;method_52787(Lnet/minecraft/class_2596;)Vofficial bLgrj;b(Lzw;)V
-
onDisconnected
Called when the connection this listener listens to has disconnected. Can be used to display the disconnection reason.- Specified by:
onDisconnectedin interfacePacketListener- Mappings:
Namespace Name Mixin selector named onDisconnectedLnet/minecraft/network/listener/PacketListener;onDisconnected(Lnet/minecraft/network/DisconnectionInfo;)Vintermediary method_10839Lnet/minecraft/class_2547;method_10839(Lnet/minecraft/class_9812;)Vofficial aLws;a(Lwf;)V
-
addCustomCrashReportInfo
- Specified by:
addCustomCrashReportInfoin interfacePacketListener- Mappings:
Namespace Name Mixin selector named addCustomCrashReportInfoLnet/minecraft/network/listener/PacketListener;addCustomCrashReportInfo(Lnet/minecraft/util/crash/CrashReport;Lnet/minecraft/util/crash/CrashReportSection;)Vintermediary method_55597Lnet/minecraft/class_2547;method_55597(Lnet/minecraft/class_128;Lnet/minecraft/class_129;)Vofficial aLws;a(Lp;Lq;)V
-
createDisconnectedScreen
- Mappings:
Namespace Name Mixin selector named createDisconnectedScreenLnet/minecraft/client/network/ClientCommonNetworkHandler;createDisconnectedScreen(Lnet/minecraft/network/DisconnectionInfo;)Lnet/minecraft/client/gui/screen/Screen;intermediary method_52786Lnet/minecraft/class_8673;method_52786(Lnet/minecraft/class_9812;)Lnet/minecraft/class_437;official bLgrj;b(Lwf;)Lger;
-
getBrand
- Mappings:
Namespace Name Mixin selector named getBrandLnet/minecraft/client/network/ClientCommonNetworkHandler;getBrand()Ljava/lang/String;intermediary method_52790Lnet/minecraft/class_8673;method_52790()Ljava/lang/String;official hLgrj;h()Ljava/lang/String;
-
send
private void send(Packet<? extends ServerPacketListener> packet, BooleanSupplier sendCondition, Duration expiry) - Mappings:
Namespace Name Mixin selector named sendLnet/minecraft/client/network/ClientCommonNetworkHandler;send(Lnet/minecraft/network/packet/Packet;Ljava/util/function/BooleanSupplier;Ljava/time/Duration;)Vintermediary method_52779Lnet/minecraft/class_8673;method_52779(Lnet/minecraft/class_2596;Ljava/util/function/BooleanSupplier;Ljava/time/Duration;)Vofficial aLgrj;a(Lzw;Ljava/util/function/BooleanSupplier;Ljava/time/Duration;)V
-
createConfirmServerResourcePackScreen
private Screen createConfirmServerResourcePackScreen(UUID id, URL url, String hash, boolean required, @Nullable @Nullable Text prompt) - Mappings:
Namespace Name Mixin selector named createConfirmServerResourcePackScreenLnet/minecraft/client/network/ClientCommonNetworkHandler;createConfirmServerResourcePackScreen(Ljava/util/UUID;Ljava/net/URL;Ljava/lang/String;ZLnet/minecraft/text/Text;)Lnet/minecraft/client/gui/screen/Screen;intermediary method_55609Lnet/minecraft/class_8673;method_55609(Ljava/util/UUID;Ljava/net/URL;Ljava/lang/String;ZLnet/minecraft/class_2561;)Lnet/minecraft/class_437;official aLgrj;a(Ljava/util/UUID;Ljava/net/URL;Ljava/lang/String;ZLxo;)Lger;
-