Skip to content

Package net.minecraft.network.protocol.ping

Part 1/1


ClientboundPongResponsePacket

  • Full name: net.minecraft.network.protocol.ping.ClientboundPongResponsePacket
  • Package: net.minecraft.network.protocol.ping
  • Source: commonnet/minecraft/network/protocol/ping/ClientboundPongResponsePacket.java
  • Type: record
  • Modifiers: public
  • Implements: Packet<ClientPongPacketListener>

net.minecraft.network.protocol.ping.ClientboundPongResponsePacket#handle(ClientPongPacketListener)

  • Origin: common
  • Source: net/minecraft/network/protocol/ping/ClientboundPongResponsePacket.java:26
  • Modifiers: public
  • Return: void

คืออะไร

จัดการ handle

ทำงานยังไง

เรียกต่อ: handlePongResponse().

Parameters

  • ClientPongPacketListener clientPongPacketListener

ตัวอย่างใช้งาน

ClientboundPongResponsePacket instance = ...;
ClientPongPacketListener clientPongPacketListener = ...;
instance.handle(clientPongPacketListener);

net.minecraft.network.protocol.ping.ClientboundPongResponsePacket#type()

  • Origin: common
  • Source: net/minecraft/network/protocol/ping/ClientboundPongResponsePacket.java:21
  • Modifiers: public
  • Return: PacketType<ClientboundPongResponsePacket>

คืออะไร

ดำเนินการ type ตาม implementation ของ ClientboundPongResponsePacket

ทำงานยังไง

คืนค่า: PingPacketTypes.CLIENTBOUND_PONG_RESPONSE.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ClientboundPongResponsePacket instance = ...;
PacketType<ClientboundPongResponsePacket> result = instance.type();

ClientPongPacketListener

  • Full name: net.minecraft.network.protocol.ping.ClientPongPacketListener
  • Package: net.minecraft.network.protocol.ping
  • Source: commonnet/minecraft/network/protocol/ping/ClientPongPacketListener.java
  • Type: interface
  • Modifiers: public
  • Implements: PacketListener

net.minecraft.network.protocol.ping.ClientPongPacketListener#handlePongResponse(ClientboundPongResponsePacket)

  • Origin: common
  • Source: net/minecraft/network/protocol/ping/ClientPongPacketListener.java:6
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการ Pong Response

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ClientboundPongResponsePacket clientboundPongResponsePacket

ตัวอย่างใช้งาน

ClientPongPacketListener instance = ...;
ClientboundPongResponsePacket clientboundPongResponsePacket = ...;
instance.handlePongResponse(clientboundPongResponsePacket);

ServerboundPingRequestPacket

  • Full name: net.minecraft.network.protocol.ping.ServerboundPingRequestPacket
  • Package: net.minecraft.network.protocol.ping
  • Source: commonnet/minecraft/network/protocol/ping/ServerboundPingRequestPacket.java
  • Type: class
  • Modifiers: public
  • Implements: Packet<ServerPingPacketListener>

net.minecraft.network.protocol.ping.ServerboundPingRequestPacket#getTime()

  • Origin: common
  • Source: net/minecraft/network/protocol/ping/ServerboundPingRequestPacket.java:35
  • Modifiers: public
  • Return: long

คืออะไร

อ่านค่า Time

ทำงานยังไง

คืนค่า: this.time.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ServerboundPingRequestPacket instance = ...;
long result = instance.getTime();

net.minecraft.network.protocol.ping.ServerboundPingRequestPacket#handle(ServerPingPacketListener)

  • Origin: common
  • Source: net/minecraft/network/protocol/ping/ServerboundPingRequestPacket.java:31
  • Modifiers: public
  • Return: void

คืออะไร

จัดการ handle

ทำงานยังไง

เรียกต่อ: handlePingRequest().

Parameters

  • ServerPingPacketListener serverPingPacketListener

ตัวอย่างใช้งาน

ServerboundPingRequestPacket instance = ...;
ServerPingPacketListener serverPingPacketListener = ...;
instance.handle(serverPingPacketListener);

net.minecraft.network.protocol.ping.ServerboundPingRequestPacket#ServerboundPingRequestPacket(long)

  • Origin: common
  • Source: net/minecraft/network/protocol/ping/ServerboundPingRequestPacket.java:14
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ ServerboundPingRequestPacket ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: time.

Parameters

  • long l

ตัวอย่างใช้งาน

ServerboundPingRequestPacket instance = new ServerboundPingRequestPacket(0L);

net.minecraft.network.protocol.ping.ServerboundPingRequestPacket#type()

  • Origin: common
  • Source: net/minecraft/network/protocol/ping/ServerboundPingRequestPacket.java:26
  • Modifiers: public
  • Return: PacketType<ServerboundPingRequestPacket>

คืออะไร

ดำเนินการ type ตาม implementation ของ ServerboundPingRequestPacket

ทำงานยังไง

คืนค่า: PingPacketTypes.SERVERBOUND_PING_REQUEST.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ServerboundPingRequestPacket instance = ...;
PacketType<ServerboundPingRequestPacket> result = instance.type();

ServerPingPacketListener

  • Full name: net.minecraft.network.protocol.ping.ServerPingPacketListener
  • Package: net.minecraft.network.protocol.ping
  • Source: commonnet/minecraft/network/protocol/ping/ServerPingPacketListener.java
  • Type: interface
  • Modifiers: public
  • Implements: PacketListener

net.minecraft.network.protocol.ping.ServerPingPacketListener#handlePingRequest(ServerboundPingRequestPacket)

  • Origin: common
  • Source: net/minecraft/network/protocol/ping/ServerPingPacketListener.java:6
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการ Ping Request

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ServerboundPingRequestPacket serverboundPingRequestPacket

ตัวอย่างใช้งาน

ServerPingPacketListener instance = ...;
ServerboundPingRequestPacket serverboundPingRequestPacket = ...;
instance.handlePingRequest(serverboundPingRequestPacket);