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 fnp
intermediary net/minecraft/class_8673
named net/minecraft/client/network/ClientCommonNetworkHandler
  • Field Details

    • LOST_CONNECTION_TEXT

      private static final Text LOST_CONNECTION_TEXT
      Mappings:
      Namespace Name Mixin selector
      official g Lfnp;g:Lvf;
      intermediary field_45594 Lnet/minecraft/class_8673;field_45594:Lnet/minecraft/class_2561;
      named LOST_CONNECTION_TEXT Lnet/minecraft/client/network/ClientCommonNetworkHandler;LOST_CONNECTION_TEXT:Lnet/minecraft/text/Text;
    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official h Lfnp;h:Lorg/slf4j/Logger;
      intermediary field_45944 Lnet/minecraft/class_8673;field_45944:Lorg/slf4j/Logger;
      named LOGGER Lnet/minecraft/client/network/ClientCommonNetworkHandler;LOGGER:Lorg/slf4j/Logger;
    • client

      protected final MinecraftClient client
      Mappings:
      Namespace Name Mixin selector
      official a Lfnp;a:Levi;
      intermediary field_45588 Lnet/minecraft/class_8673;field_45588:Lnet/minecraft/class_310;
      named client Lnet/minecraft/client/network/ClientCommonNetworkHandler;client:Lnet/minecraft/client/MinecraftClient;
    • connection

      protected final ClientConnection connection
      Mappings:
      Namespace Name Mixin selector
      official b Lfnp;b:Lug;
      intermediary field_45589 Lnet/minecraft/class_8673;field_45589:Lnet/minecraft/class_2535;
      named connection Lnet/minecraft/client/network/ClientCommonNetworkHandler;connection:Lnet/minecraft/network/ClientConnection;
    • serverInfo

      @Nullable protected final @Nullable ServerInfo serverInfo
      Mappings:
      Namespace Name Mixin selector
      official c Lfnp;c:Lfod;
      intermediary field_45590 Lnet/minecraft/class_8673;field_45590:Lnet/minecraft/class_642;
      named serverInfo Lnet/minecraft/client/network/ClientCommonNetworkHandler;serverInfo:Lnet/minecraft/client/network/ServerInfo;
    • brand

      @Nullable protected @Nullable String brand
      Mappings:
      Namespace Name Mixin selector
      official d Lfnp;d:Ljava/lang/String;
      intermediary field_45591 Lnet/minecraft/class_8673;field_45591:Ljava/lang/String;
      named brand Lnet/minecraft/client/network/ClientCommonNetworkHandler;brand:Ljava/lang/String;
    • worldSession

      protected final WorldSession worldSession
      Mappings:
      Namespace Name Mixin selector
      official e Lfnp;e:Lgjr;
      intermediary field_45592 Lnet/minecraft/class_8673;field_45592:Lnet/minecraft/class_7975;
      named worldSession Lnet/minecraft/client/network/ClientCommonNetworkHandler;worldSession:Lnet/minecraft/client/session/telemetry/WorldSession;
    • postDisconnectScreen

      @Nullable protected final @Nullable Screen postDisconnectScreen
      Mappings:
      Namespace Name Mixin selector
      official f Lfnp;f:Lfdb;
      intermediary field_45593 Lnet/minecraft/class_8673;field_45593:Lnet/minecraft/class_437;
      named postDisconnectScreen Lnet/minecraft/client/network/ClientCommonNetworkHandler;postDisconnectScreen:Lnet/minecraft/client/gui/screen/Screen;
    • queuedPackets

      private final List<ClientCommonNetworkHandler.QueuedPacket> queuedPackets
      Mappings:
      Namespace Name Mixin selector
      official i Lfnp;i:Ljava/util/List;
      intermediary field_45595 Lnet/minecraft/class_8673;field_45595:Ljava/util/List;
      named queuedPackets Lnet/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;)V
      intermediary <init> Lnet/minecraft/class_8673;<init>(Lnet/minecraft/class_310;Lnet/minecraft/class_2535;Lnet/minecraft/class_8675;)V
      named <init> Lnet/minecraft/client/network/ClientCommonNetworkHandler;<init>(Lnet/minecraft/client/MinecraftClient;Lnet/minecraft/network/ClientConnection;Lnet/minecraft/client/network/ClientConnectionState;)V
  • Method Details

    • onKeepAlive

      public void onKeepAlive(KeepAliveS2CPacket packet)
      Specified by:
      onKeepAlive in interface ClientCommonPacketListener
      Mappings:
      Namespace Name Mixin selector
      official a Lxi;a(Lxl;)V
      intermediary method_52782 Lnet/minecraft/class_8705;method_52782(Lnet/minecraft/class_2670;)V
      named onKeepAlive Lnet/minecraft/network/listener/ClientCommonPacketListener;onKeepAlive(Lnet/minecraft/network/packet/s2c/common/KeepAliveS2CPacket;)V
    • onPing

      public void onPing(CommonPingS2CPacket packet)
      Specified by:
      onPing in interface ClientCommonPacketListener
      Mappings:
      Namespace Name Mixin selector
      official a Lxi;a(Lxm;)V
      intermediary method_52783 Lnet/minecraft/class_8705;method_52783(Lnet/minecraft/class_6373;)V
      named onPing Lnet/minecraft/network/listener/ClientCommonPacketListener;onPing(Lnet/minecraft/network/packet/s2c/common/CommonPingS2CPacket;)V
    • onCustomPayload

      public void onCustomPayload(CustomPayloadS2CPacket packet)
      Specified by:
      onCustomPayload in interface ClientCommonPacketListener
      Mappings:
      Namespace Name Mixin selector
      official a Lxi;a(Lxj;)V
      intermediary method_52780 Lnet/minecraft/class_8705;method_52780(Lnet/minecraft/class_2658;)V
      named onCustomPayload Lnet/minecraft/network/listener/ClientCommonPacketListener;onCustomPayload(Lnet/minecraft/network/packet/s2c/common/CustomPayloadS2CPacket;)V
    • onCustomPayload

      protected abstract void onCustomPayload(CustomPayload payload)
      Mappings:
      Namespace Name Mixin selector
      official a Lfnp;a(Lya;)V
      intermediary method_11152 Lnet/minecraft/class_8673;method_11152(Lnet/minecraft/class_8710;)V
      named onCustomPayload Lnet/minecraft/client/network/ClientCommonNetworkHandler;onCustomPayload(Lnet/minecraft/network/packet/CustomPayload;)V
    • getRegistryManager

      protected abstract DynamicRegistryManager.Immutable getRegistryManager()
      Mappings:
      Namespace Name Mixin selector
      official f Lfnp;f()Liu$b;
      intermediary method_29091 Lnet/minecraft/class_8673;method_29091()Lnet/minecraft/class_5455$class_6890;
      named getRegistryManager Lnet/minecraft/client/network/ClientCommonNetworkHandler;getRegistryManager()Lnet/minecraft/registry/DynamicRegistryManager$Immutable;
    • onResourcePackSend

      public void onResourcePackSend(ResourcePackSendS2CPacket packet)
      Specified by:
      onResourcePackSend in interface ClientCommonPacketListener
      Mappings:
      Namespace Name Mixin selector
      official a Lxi;a(Lxo;)V
      intermediary method_52784 Lnet/minecraft/class_8705;method_52784(Lnet/minecraft/class_2720;)V
      named onResourcePackSend Lnet/minecraft/network/listener/ClientCommonPacketListener;onResourcePackSend(Lnet/minecraft/network/packet/s2c/common/ResourcePackSendS2CPacket;)V
    • onResourcePackRemove

      public void onResourcePackRemove(ResourcePackRemoveS2CPacket packet)
      Specified by:
      onResourcePackRemove in interface ClientCommonPacketListener
      Mappings:
      Namespace Name Mixin selector
      official a Lxi;a(Lxn;)V
      intermediary method_55512 Lnet/minecraft/class_8705;method_55512(Lnet/minecraft/class_9053;)V
      named onResourcePackRemove Lnet/minecraft/network/listener/ClientCommonPacketListener;onResourcePackRemove(Lnet/minecraft/network/packet/s2c/common/ResourcePackRemoveS2CPacket;)V
    • getPrompt

      static Text getPrompt(Text requirementPrompt, @Nullable @Nullable Text customPrompt)
      Mappings:
      Namespace Name Mixin selector
      official a Lfnp;a(Lvf;Lvf;)Lvf;
      intermediary method_52778 Lnet/minecraft/class_8673;method_52778(Lnet/minecraft/class_2561;Lnet/minecraft/class_2561;)Lnet/minecraft/class_2561;
      named getPrompt Lnet/minecraft/client/network/ClientCommonNetworkHandler;getPrompt(Lnet/minecraft/text/Text;Lnet/minecraft/text/Text;)Lnet/minecraft/text/Text;
    • getParsedResourcePackUrl

      @Nullable private static @Nullable URL getParsedResourcePackUrl(String url)
      Mappings:
      Namespace Name Mixin selector
      official a Lfnp;a(Ljava/lang/String;)Ljava/net/URL;
      intermediary method_52773 Lnet/minecraft/class_8673;method_52773(Ljava/lang/String;)Ljava/net/URL;
      named getParsedResourcePackUrl Lnet/minecraft/client/network/ClientCommonNetworkHandler;getParsedResourcePackUrl(Ljava/lang/String;)Ljava/net/URL;
    • onSynchronizeTags

      public void onSynchronizeTags(SynchronizeTagsS2CPacket packet)
      Specified by:
      onSynchronizeTags in interface ClientCommonPacketListener
      Mappings:
      Namespace Name Mixin selector
      official a Lxi;a(Lxp;)V
      intermediary method_11126 Lnet/minecraft/class_8705;method_11126(Lnet/minecraft/class_2790;)V
      named onSynchronizeTags Lnet/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 a Lfnp;a(Lahf;Lasz$a;)V
      intermediary method_52771 Lnet/minecraft/class_8673;method_52771(Lnet/minecraft/class_5321;Lnet/minecraft/class_6864$class_5748;)V
      named handleSynchronizedTagGroup Lnet/minecraft/client/network/ClientCommonNetworkHandler;handleSynchronizedTagGroup(Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/registry/tag/TagPacketSerializer$Serialized;)V
    • onDisconnect

      public void onDisconnect(DisconnectS2CPacket packet)
      Specified by:
      onDisconnect in interface ClientCommonPacketListener
      Mappings:
      Namespace Name Mixin selector
      official a Lxi;a(Lxk;)V
      intermediary method_52781 Lnet/minecraft/class_8705;method_52781(Lnet/minecraft/class_2661;)V
      named onDisconnect Lnet/minecraft/network/listener/ClientCommonPacketListener;onDisconnect(Lnet/minecraft/network/packet/s2c/common/DisconnectS2CPacket;)V
    • sendQueuedPackets

      protected void sendQueuedPackets()
      Mappings:
      Namespace Name Mixin selector
      official g Lfnp;g()V
      intermediary method_52789 Lnet/minecraft/class_8673;method_52789()V
      named sendQueuedPackets Lnet/minecraft/client/network/ClientCommonNetworkHandler;sendQueuedPackets()V
    • sendPacket

      public void sendPacket(Packet<?> packet)
      Mappings:
      Namespace Name Mixin selector
      official b Lfnp;b(Lxf;)V
      intermediary method_52787 Lnet/minecraft/class_8673;method_52787(Lnet/minecraft/class_2596;)V
      named sendPacket Lnet/minecraft/client/network/ClientCommonNetworkHandler;sendPacket(Lnet/minecraft/network/packet/Packet;)V
    • onDisconnected

      public void onDisconnected(Text reason)
      Called when the connection this listener listens to has disconnected. Can be used to display the disconnection reason.
      Specified by:
      onDisconnected in interface PacketListener
      Parameters:
      reason - the reason of disconnection; may be a generic message
      Mappings:
      Namespace Name Mixin selector
      official a Luo;a(Lvf;)V
      intermediary method_10839 Lnet/minecraft/class_2547;method_10839(Lnet/minecraft/class_2561;)V
      named onDisconnected Lnet/minecraft/network/listener/PacketListener;onDisconnected(Lnet/minecraft/text/Text;)V
    • addCustomCrashReportInfo

      public void addCustomCrashReportInfo(CrashReportSection section)
      Specified by:
      addCustomCrashReportInfo in interface PacketListener
      Mappings:
      Namespace Name Mixin selector
      official a Luo;a(Lp;)V
      intermediary method_55597 Lnet/minecraft/class_2547;method_55597(Lnet/minecraft/class_129;)V
      named addCustomCrashReportInfo Lnet/minecraft/network/listener/PacketListener;addCustomCrashReportInfo(Lnet/minecraft/util/crash/CrashReportSection;)V
    • createDisconnectedScreen

      protected Screen createDisconnectedScreen(Text reason)
      Mappings:
      Namespace Name Mixin selector
      official b Lfnp;b(Lvf;)Lfdb;
      intermediary method_52786 Lnet/minecraft/class_8673;method_52786(Lnet/minecraft/class_2561;)Lnet/minecraft/class_437;
      named createDisconnectedScreen Lnet/minecraft/client/network/ClientCommonNetworkHandler;createDisconnectedScreen(Lnet/minecraft/text/Text;)Lnet/minecraft/client/gui/screen/Screen;
    • getBrand

      @Nullable public @Nullable String getBrand()
      Mappings:
      Namespace Name Mixin selector
      official h Lfnp;h()Ljava/lang/String;
      intermediary method_52790 Lnet/minecraft/class_8673;method_52790()Ljava/lang/String;
      named getBrand Lnet/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 a Lfnp;a(Lxf;Ljava/util/function/BooleanSupplier;Ljava/time/Duration;)V
      intermediary method_52779 Lnet/minecraft/class_8673;method_52779(Lnet/minecraft/class_2596;Ljava/util/function/BooleanSupplier;Ljava/time/Duration;)V
      named send Lnet/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 a Lfnp;a(Ljava/util/UUID;Ljava/net/URL;Ljava/lang/String;ZLvf;)Lfdb;
      intermediary method_55609 Lnet/minecraft/class_8673;method_55609(Ljava/util/UUID;Ljava/net/URL;Ljava/lang/String;ZLnet/minecraft/class_2561;)Lnet/minecraft/class_437;
      named createConfirmServerResourcePackScreen Lnet/minecraft/client/network/ClientCommonNetworkHandler;createConfirmServerResourcePackScreen(Ljava/util/UUID;Ljava/net/URL;Ljava/lang/String;ZLnet/minecraft/text/Text;)Lnet/minecraft/client/gui/screen/Screen;