Package net.minecraft.client.network
Class ClientCommonNetworkHandler
java.lang.Object
net.minecraft.client.network.ClientCommonNetworkHandler
- All Implemented Interfaces:
ClientCommonPacketListener,ClientPacketListener,PacketListener
- Direct Known Subclasses:
ClientConfigurationNetworkHandler,ClientPlayNetworkHandler
@Environment(CLIENT)
public abstract class ClientCommonNetworkHandler
extends Object
implements ClientCommonPacketListener
- Mappings:
Namespace Name official fnpintermediary net/minecraft/class_8673named net/minecraft/client/network/ClientCommonNetworkHandler
-
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 @Nullable ServerInfoprotected final WorldSession -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClientCommonNetworkHandler(MinecraftClient client, ClientConnection connection, ClientConnectionState connectionState) -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate ScreencreateConfirmServerResourcePackScreen(UUID id, URL url, String hash, boolean required, @Nullable Text prompt) protected ScreencreateDisconnectedScreen(Text reason) getBrand()(package private) static Textprotected abstract DynamicRegistryManager.Immutableprivate <T> voidhandleSynchronizedTagGroup(RegistryKey<? extends Registry<? extends T>> registryRef, TagPacketSerializer.Serialized tags) protected abstract voidonCustomPayload(CustomPayload payload) voidvoidonDisconnect(DisconnectS2CPacket packet) voidonDisconnected(Text reason) Called when the connection this listener listens to has disconnected.voidonKeepAlive(KeepAliveS2CPacket packet) voidonPing(CommonPingS2CPacket packet) voidvoidvoidprivate voidsend(Packet<? extends ServerPacketListener> packet, BooleanSupplier sendCondition, Duration expiry) voidsendPacket(Packet<?> packet) protected voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.listener.ClientPacketListener
getSideMethods inherited from interface net.minecraft.network.listener.PacketListener
accepts, fillCrashReport, getState, isConnectionOpen, shouldCrashOnException
-
Field Details
-
LOST_CONNECTION_TEXT
- Mappings:
Namespace Name Mixin selector official gLfnp;g:Lvf;intermediary field_45594Lnet/minecraft/class_8673;field_45594:Lnet/minecraft/class_2561;named LOST_CONNECTION_TEXTLnet/minecraft/client/network/ClientCommonNetworkHandler;LOST_CONNECTION_TEXT:Lnet/minecraft/text/Text;
-
LOGGER
- Mappings:
Namespace Name Mixin selector official hLfnp;h:Lorg/slf4j/Logger;intermediary field_45944Lnet/minecraft/class_8673;field_45944:Lorg/slf4j/Logger;named LOGGERLnet/minecraft/client/network/ClientCommonNetworkHandler;LOGGER:Lorg/slf4j/Logger;
-
client
- Mappings:
Namespace Name Mixin selector official aLfnp;a:Levi;intermediary field_45588Lnet/minecraft/class_8673;field_45588:Lnet/minecraft/class_310;named clientLnet/minecraft/client/network/ClientCommonNetworkHandler;client:Lnet/minecraft/client/MinecraftClient;
-
connection
- Mappings:
Namespace Name Mixin selector official bLfnp;b:Lug;intermediary field_45589Lnet/minecraft/class_8673;field_45589:Lnet/minecraft/class_2535;named connectionLnet/minecraft/client/network/ClientCommonNetworkHandler;connection:Lnet/minecraft/network/ClientConnection;
-
serverInfo
- Mappings:
Namespace Name Mixin selector official cLfnp;c:Lfod;intermediary field_45590Lnet/minecraft/class_8673;field_45590:Lnet/minecraft/class_642;named serverInfoLnet/minecraft/client/network/ClientCommonNetworkHandler;serverInfo:Lnet/minecraft/client/network/ServerInfo;
-
brand
- Mappings:
Namespace Name Mixin selector official dLfnp;d:Ljava/lang/String;intermediary field_45591Lnet/minecraft/class_8673;field_45591:Ljava/lang/String;named brandLnet/minecraft/client/network/ClientCommonNetworkHandler;brand:Ljava/lang/String;
-
worldSession
- Mappings:
Namespace Name Mixin selector official eLfnp;e:Lgjr;intermediary field_45592Lnet/minecraft/class_8673;field_45592:Lnet/minecraft/class_7975;named worldSessionLnet/minecraft/client/network/ClientCommonNetworkHandler;worldSession:Lnet/minecraft/client/session/telemetry/WorldSession;
-
postDisconnectScreen
- Mappings:
Namespace Name Mixin selector official fLfnp;f:Lfdb;intermediary field_45593Lnet/minecraft/class_8673;field_45593:Lnet/minecraft/class_437;named postDisconnectScreenLnet/minecraft/client/network/ClientCommonNetworkHandler;postDisconnectScreen:Lnet/minecraft/client/gui/screen/Screen;
-
queuedPackets
- Mappings:
Namespace Name Mixin selector official iLfnp;i:Ljava/util/List;intermediary field_45595Lnet/minecraft/class_8673;field_45595:Ljava/util/List;named queuedPacketsLnet/minecraft/client/network/ClientCommonNetworkHandler;queuedPackets:Ljava/util/List;
-
-
Constructor Details
-
ClientCommonNetworkHandler
protected ClientCommonNetworkHandler(MinecraftClient client, ClientConnection connection, ClientConnectionState connectionState) - Mappings:
Namespace Name Mixin selector official <init>Lfnp;<init>(Levi;Lug;Lfnw;)Vintermediary <init>Lnet/minecraft/class_8673;<init>(Lnet/minecraft/class_310;Lnet/minecraft/class_2535;Lnet/minecraft/class_8675;)Vnamed <init>Lnet/minecraft/client/network/ClientCommonNetworkHandler;<init>(Lnet/minecraft/client/MinecraftClient;Lnet/minecraft/network/ClientConnection;Lnet/minecraft/client/network/ClientConnectionState;)V
-
-
Method Details
-
onKeepAlive
- Specified by:
onKeepAlivein interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector official aLxi;a(Lxl;)Vintermediary method_52782Lnet/minecraft/class_8705;method_52782(Lnet/minecraft/class_2670;)Vnamed onKeepAliveLnet/minecraft/network/listener/ClientCommonPacketListener;onKeepAlive(Lnet/minecraft/network/packet/s2c/common/KeepAliveS2CPacket;)V
-
onPing
- Specified by:
onPingin interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector official aLxi;a(Lxm;)Vintermediary method_52783Lnet/minecraft/class_8705;method_52783(Lnet/minecraft/class_6373;)Vnamed onPingLnet/minecraft/network/listener/ClientCommonPacketListener;onPing(Lnet/minecraft/network/packet/s2c/common/CommonPingS2CPacket;)V
-
onCustomPayload
- Specified by:
onCustomPayloadin interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector official aLxi;a(Lxj;)Vintermediary method_52780Lnet/minecraft/class_8705;method_52780(Lnet/minecraft/class_2658;)Vnamed onCustomPayloadLnet/minecraft/network/listener/ClientCommonPacketListener;onCustomPayload(Lnet/minecraft/network/packet/s2c/common/CustomPayloadS2CPacket;)V
-
onCustomPayload
- Mappings:
Namespace Name Mixin selector official aLfnp;a(Lya;)Vintermediary method_11152Lnet/minecraft/class_8673;method_11152(Lnet/minecraft/class_8710;)Vnamed onCustomPayloadLnet/minecraft/client/network/ClientCommonNetworkHandler;onCustomPayload(Lnet/minecraft/network/packet/CustomPayload;)V
-
getRegistryManager
- Mappings:
Namespace Name Mixin selector official fLfnp;f()Liu$b;intermediary method_29091Lnet/minecraft/class_8673;method_29091()Lnet/minecraft/class_5455$class_6890;named getRegistryManagerLnet/minecraft/client/network/ClientCommonNetworkHandler;getRegistryManager()Lnet/minecraft/registry/DynamicRegistryManager$Immutable;
-
onResourcePackSend
- Specified by:
onResourcePackSendin interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector official aLxi;a(Lxo;)Vintermediary method_52784Lnet/minecraft/class_8705;method_52784(Lnet/minecraft/class_2720;)Vnamed onResourcePackSendLnet/minecraft/network/listener/ClientCommonPacketListener;onResourcePackSend(Lnet/minecraft/network/packet/s2c/common/ResourcePackSendS2CPacket;)V
-
onResourcePackRemove
- Specified by:
onResourcePackRemovein interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector official aLxi;a(Lxn;)Vintermediary method_55512Lnet/minecraft/class_8705;method_55512(Lnet/minecraft/class_9053;)Vnamed onResourcePackRemoveLnet/minecraft/network/listener/ClientCommonPacketListener;onResourcePackRemove(Lnet/minecraft/network/packet/s2c/common/ResourcePackRemoveS2CPacket;)V
-
getPrompt
- Mappings:
Namespace Name Mixin selector official aLfnp;a(Lvf;Lvf;)Lvf;intermediary method_52778Lnet/minecraft/class_8673;method_52778(Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;)Lnet/minecraft/class_2561;named getPromptLnet/minecraft/client/network/ClientCommonNetworkHandler;getPrompt(Lnet/minecraft/text/Text;Lnet/minecraft/text/Text;)Lnet/minecraft/text/Text;
-
getParsedResourcePackUrl
- Mappings:
Namespace Name Mixin selector official aLfnp;a(Ljava/lang/String;)Ljava/net/URL;intermediary method_52773Lnet/minecraft/class_8673;method_52773(Ljava/lang/String;)Ljava/net/URL;named getParsedResourcePackUrlLnet/minecraft/client/network/ClientCommonNetworkHandler;getParsedResourcePackUrl(Ljava/lang/String;)Ljava/net/URL;
-
onSynchronizeTags
- Specified by:
onSynchronizeTagsin interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector official aLxi;a(Lxp;)Vintermediary method_11126Lnet/minecraft/class_8705;method_11126(Lnet/minecraft/class_2790;)Vnamed onSynchronizeTagsLnet/minecraft/network/listener/ClientCommonPacketListener;onSynchronizeTags(Lnet/minecraft/network/packet/s2c/common/SynchronizeTagsS2CPacket;)V
-
handleSynchronizedTagGroup
private <T> void handleSynchronizedTagGroup(RegistryKey<? extends Registry<? extends T>> registryRef, TagPacketSerializer.Serialized tags) - Mappings:
Namespace Name Mixin selector official aLfnp;a(Lahf;Lasz$a;)Vintermediary method_52771Lnet/minecraft/class_8673;method_52771(Lnet/minecraft/class_5321;Lnet/minecraft/class_6864$class_5748;)Vnamed handleSynchronizedTagGroupLnet/minecraft/client/network/ClientCommonNetworkHandler;handleSynchronizedTagGroup(Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/registry/tag/TagPacketSerializer$Serialized;)V
-
onDisconnect
- Specified by:
onDisconnectin interfaceClientCommonPacketListener- Mappings:
Namespace Name Mixin selector official aLxi;a(Lxk;)Vintermediary method_52781Lnet/minecraft/class_8705;method_52781(Lnet/minecraft/class_2661;)Vnamed onDisconnectLnet/minecraft/network/listener/ClientCommonPacketListener;onDisconnect(Lnet/minecraft/network/packet/s2c/common/DisconnectS2CPacket;)V
-
sendQueuedPackets
protected void sendQueuedPackets()- Mappings:
Namespace Name Mixin selector official gLfnp;g()Vintermediary method_52789Lnet/minecraft/class_8673;method_52789()Vnamed sendQueuedPacketsLnet/minecraft/client/network/ClientCommonNetworkHandler;sendQueuedPackets()V
-
sendPacket
- Mappings:
Namespace Name Mixin selector official bLfnp;b(Lxf;)Vintermediary method_52787Lnet/minecraft/class_8673;method_52787(Lnet/minecraft/class_2596;)Vnamed sendPacketLnet/minecraft/client/network/ClientCommonNetworkHandler;sendPacket(Lnet/minecraft/network/packet/Packet;)V
-
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 aLuo;a(Lvf;)Vintermediary method_10839Lnet/minecraft/class_2547;method_10839(Lnet/minecraft/class_2561;)Vnamed onDisconnectedLnet/minecraft/network/listener/PacketListener;onDisconnected(Lnet/minecraft/text/Text;)V
-
addCustomCrashReportInfo
- Specified by:
addCustomCrashReportInfoin interfacePacketListener- Mappings:
Namespace Name Mixin selector official aLuo;a(Lp;)Vintermediary method_55597Lnet/minecraft/class_2547;method_55597(Lnet/minecraft/class_129;)Vnamed addCustomCrashReportInfoLnet/minecraft/network/listener/PacketListener;addCustomCrashReportInfo(Lnet/minecraft/util/crash/CrashReportSection;)V
-
createDisconnectedScreen
- Mappings:
Namespace Name Mixin selector official bLfnp;b(Lvf;)Lfdb;intermediary method_52786Lnet/minecraft/class_8673;method_52786(Lnet/minecraft/class_2561;)Lnet/minecraft/class_437;named createDisconnectedScreenLnet/minecraft/client/network/ClientCommonNetworkHandler;createDisconnectedScreen(Lnet/minecraft/text/Text;)Lnet/minecraft/client/gui/screen/Screen;
-
getBrand
- Mappings:
Namespace Name Mixin selector official hLfnp;h()Ljava/lang/String;intermediary method_52790Lnet/minecraft/class_8673;method_52790()Ljava/lang/String;named getBrandLnet/minecraft/client/network/ClientCommonNetworkHandler;getBrand()Ljava/lang/String;
-
send
private void send(Packet<? extends ServerPacketListener> packet, BooleanSupplier sendCondition, Duration expiry) - Mappings:
Namespace Name Mixin selector official aLfnp;a(Lxf;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;)Vnamed sendLnet/minecraft/client/network/ClientCommonNetworkHandler;send(Lnet/minecraft/network/packet/Packet;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 official aLfnp;a(Ljava/util/UUID;Ljava/net/URL;Ljava/lang/String;ZLvf;)Lfdb;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;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;
-