Class CommonPingS2CPacket

java.lang.Object
net.minecraft.network.packet.s2c.common.CommonPingS2CPacket
All Implemented Interfaces:
Packet<ClientCommonPacketListener>

public class CommonPingS2CPacket extends Object implements Packet<ClientCommonPacketListener>
A packet sent by the server; the client will reply with a pong packet on the first tick after it receives this packet, with the same parameter.
See Also:
Mappings:
Namespace Name
named net/minecraft/network/packet/s2c/common/CommonPingS2CPacket
intermediary net/minecraft/class_6373
official zh
  • Field Details Link icon

    • CODEC Link icon

      public static final PacketCodec<PacketByteBuf,CommonPingS2CPacket> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/network/packet/s2c/common/CommonPingS2CPacket;CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_48624 Lnet/minecraft/class_6373;field_48624:Lnet/minecraft/class_9139;
      official a Lzh;a:Lyn;
    • parameter Link icon

      private final int parameter
      The parameter of this ping packet.

      If this number represents a tick, this could measure the network delay in ticks. It is possible to be a tick number given the reply packet is sent on the client on the main thread's tick, and the number is sent as a regular int than a varint.

      Mappings:
      Namespace Name Mixin selector
      named parameter Lnet/minecraft/network/packet/s2c/common/CommonPingS2CPacket;parameter:I
      intermediary field_33751 Lnet/minecraft/class_6373;field_33751:I
      official b Lzh;b:I
  • Constructor Details Link icon

    • CommonPingS2CPacket Link icon

      public CommonPingS2CPacket(int parameter)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/network/packet/s2c/common/CommonPingS2CPacket;<init>(I)V
      intermediary <init> Lnet/minecraft/class_6373;<init>(I)V
      official <init> Lzh;<init>(I)V
    • CommonPingS2CPacket Link icon

      private CommonPingS2CPacket(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/network/packet/s2c/common/CommonPingS2CPacket;<init>(Lnet/minecraft/network/PacketByteBuf;)V
      intermediary <init> Lnet/minecraft/class_6373;<init>(Lnet/minecraft/class_2540;)V
      official <init> Lzh;<init>(Lvl;)V
  • Method Details Link icon

    • write Link icon

      private void write(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      named write Lnet/minecraft/network/packet/s2c/common/CommonPingS2CPacket;write(Lnet/minecraft/network/PacketByteBuf;)V
      intermediary method_56464 Lnet/minecraft/class_6373;method_56464(Lnet/minecraft/class_2540;)V
      official a Lzh;a(Lvl;)V
    • getPacketType Link icon

      public PacketType<CommonPingS2CPacket> getPacketType()
      Specified by:
      getPacketType in interface Packet<ClientCommonPacketListener>
      Mappings:
      Namespace Name Mixin selector
      named getPacketType Lnet/minecraft/network/packet/Packet;getPacketType()Lnet/minecraft/network/packet/PacketType;
      intermediary method_65080 Lnet/minecraft/class_2596;method_65080()Lnet/minecraft/class_9145;
      official a Lyw;a()Lyy;
    • apply Link icon

      public void apply(ClientCommonPacketListener clientCommonPacketListener)
      Specified by:
      apply in interface Packet<ClientCommonPacketListener>
      Mappings:
      Namespace Name Mixin selector
      named apply Lnet/minecraft/network/packet/s2c/common/CommonPingS2CPacket;apply(Lnet/minecraft/network/listener/ClientCommonPacketListener;)V
      intermediary method_36949 Lnet/minecraft/class_6373;method_36949(Lnet/minecraft/class_8705;)V
      official a Lzh;a(Lzc;)V
    • getParameter Link icon

      public int getParameter()
      Mappings:
      Namespace Name Mixin selector
      named getParameter Lnet/minecraft/network/packet/s2c/common/CommonPingS2CPacket;getParameter()I
      intermediary method_36950 Lnet/minecraft/class_6373;method_36950()I
      official b Lzh;b()I