Class PlayPingS2CPacket

java.lang.Object
net.minecraft.network.packet.s2c.play.PlayPingS2CPacket
All Implemented Interfaces:
Packet<ClientPlayPacketListener>

public class PlayPingS2CPacket extends Object implements Packet<ClientPlayPacketListener>
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
official tc
intermediary net/minecraft/class_6373
named net/minecraft/network/packet/s2c/play/PlayPingS2CPacket
  • Field Details

    • parameter

      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
      official a Ltc;a:I
      intermediary field_33751 Lnet/minecraft/class_6373;field_33751:I
      named parameter Lnet/minecraft/network/packet/s2c/play/PlayPingS2CPacket;parameter:I
  • Constructor Details

    • PlayPingS2CPacket

      public PlayPingS2CPacket(int parameter)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ltc;<init>(I)V
      intermediary <init> Lnet/minecraft/class_6373;<init>(I)V
      named <init> Lnet/minecraft/network/packet/s2c/play/PlayPingS2CPacket;<init>(I)V
    • PlayPingS2CPacket

      public PlayPingS2CPacket(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ltc;<init>(Lpy;)V
      intermediary <init> Lnet/minecraft/class_6373;<init>(Lnet/minecraft/class_2540;)V
      named <init> Lnet/minecraft/network/packet/s2c/play/PlayPingS2CPacket;<init>(Lnet/minecraft/network/PacketByteBuf;)V
  • Method Details

    • write

      public void write(PacketByteBuf buf)
      Specified by:
      write in interface Packet<ClientPlayPacketListener>
      Mappings:
      Namespace Name Mixin selector
      official a Lrc;a(Lpy;)V
      intermediary method_11052 Lnet/minecraft/class_2596;method_11052(Lnet/minecraft/class_2540;)V
      named write Lnet/minecraft/network/Packet;write(Lnet/minecraft/network/PacketByteBuf;)V
    • apply

      public void apply(ClientPlayPacketListener clientPlayPacketListener)
      Specified by:
      apply in interface Packet<ClientPlayPacketListener>
      Mappings:
      Namespace Name Mixin selector
      official a Ltc;a(Lrf;)V
      intermediary method_36949 Lnet/minecraft/class_6373;method_36949(Lnet/minecraft/class_2602;)V
      named apply Lnet/minecraft/network/packet/s2c/play/PlayPingS2CPacket;apply(Lnet/minecraft/network/listener/ClientPlayPacketListener;)V
    • getParameter

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