Class ServerQueryNetworkHandler

java.lang.Object
net.minecraft.server.network.ServerQueryNetworkHandler
All Implemented Interfaces:
PacketListener, ServerCrashSafePacketListener, ServerPacketListener, ServerQueryPacketListener, ServerQueryPingPacketListener

public class ServerQueryNetworkHandler extends Object implements ServerQueryPacketListener
Mappings:
Namespace Name
official alt
intermediary net/minecraft/class_3251
named net/minecraft/server/network/ServerQueryNetworkHandler
  • Field Details

    • REQUEST_HANDLED

      private static final Text REQUEST_HANDLED
      Mappings:
      Namespace Name Mixin selector
      official a Lalt;a:Ltl;
      intermediary field_14179 Lnet/minecraft/class_3251;field_14179:Lnet/minecraft/class_2561;
      named REQUEST_HANDLED Lnet/minecraft/server/network/ServerQueryNetworkHandler;REQUEST_HANDLED:Lnet/minecraft/text/Text;
    • metadata

      private final ServerMetadata metadata
      Mappings:
      Namespace Name Mixin selector
      official b Lalt;b:Ladz;
      intermediary field_42544 Lnet/minecraft/class_3251;field_42544:Lnet/minecraft/class_2926;
      named metadata Lnet/minecraft/server/network/ServerQueryNetworkHandler;metadata:Lnet/minecraft/server/ServerMetadata;
    • connection

      private final ClientConnection connection
      Mappings:
      Namespace Name Mixin selector
      official c Lalt;c:Lsm;
      intermediary field_14178 Lnet/minecraft/class_3251;field_14178:Lnet/minecraft/class_2535;
      named connection Lnet/minecraft/server/network/ServerQueryNetworkHandler;connection:Lnet/minecraft/network/ClientConnection;
    • responseSent

      private boolean responseSent
      Mappings:
      Namespace Name Mixin selector
      official d Lalt;d:Z
      intermediary field_14177 Lnet/minecraft/class_3251;field_14177:Z
      named responseSent Lnet/minecraft/server/network/ServerQueryNetworkHandler;responseSent:Z
  • Constructor Details

    • ServerQueryNetworkHandler

      public ServerQueryNetworkHandler(ServerMetadata metadata, ClientConnection connection)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lalt;<init>(Ladz;Lsm;)V
      intermediary <init> Lnet/minecraft/class_3251;<init>(Lnet/minecraft/class_2926;Lnet/minecraft/class_2535;)V
      named <init> Lnet/minecraft/server/network/ServerQueryNetworkHandler;<init>(Lnet/minecraft/server/ServerMetadata;Lnet/minecraft/network/ClientConnection;)V
  • Method Details

    • 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 Lsu;a(Ltl;)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
    • isConnectionOpen

      public boolean isConnectionOpen()
      Specified by:
      isConnectionOpen in interface PacketListener
      Mappings:
      Namespace Name Mixin selector
      official c Lsu;c()Z
      intermediary method_48106 Lnet/minecraft/class_2547;method_48106()Z
      named isConnectionOpen Lnet/minecraft/network/listener/PacketListener;isConnectionOpen()Z
    • onRequest

      public void onRequest(QueryRequestC2SPacket packet)
      Specified by:
      onRequest in interface ServerQueryPacketListener
      Mappings:
      Namespace Name Mixin selector
      official a Laea;a(Laec;)V
      intermediary method_12698 Lnet/minecraft/class_2933;method_12698(Lnet/minecraft/class_2937;)V
      named onRequest Lnet/minecraft/network/listener/ServerQueryPacketListener;onRequest(Lnet/minecraft/network/packet/c2s/query/QueryRequestC2SPacket;)V
    • onQueryPing

      public void onQueryPing(QueryPingC2SPacket packet)
      Handles a packet from client to query the "ping" (connection latency). This is different from CommonPingS2CPacket, which can be sent by the server to request acknowledgment.
      Specified by:
      onQueryPing in interface ServerQueryPingPacketListener
      Mappings:
      Namespace Name Mixin selector
      official a Labe;a(Laeb;)V
      intermediary method_12697 Lnet/minecraft/class_8740;method_12697(Lnet/minecraft/class_2935;)V
      named onQueryPing Lnet/minecraft/network/listener/ServerQueryPingPacketListener;onQueryPing(Lnet/minecraft/network/packet/c2s/query/QueryPingC2SPacket;)V