/* * Decompiled with CFR 0.152. */ package net.minecraft.network.protocol.ping; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.codec.StreamCodec; import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.PacketType; import net.minecraft.network.protocol.ping.ClientPongPacketListener; import net.minecraft.network.protocol.ping.PingPacketTypes; public record ClientboundPongResponsePacket(long time) implements Packet { public static final StreamCodec STREAM_CODEC = Packet.codec(ClientboundPongResponsePacket::write, ClientboundPongResponsePacket::new); private ClientboundPongResponsePacket(FriendlyByteBuf input) { this(input.readLong()); } private void write(FriendlyByteBuf output) { output.writeLong(this.time); } @Override public PacketType type() { return PingPacketTypes.CLIENTBOUND_PONG_RESPONSE; } @Override public void handle(ClientPongPacketListener listener) { listener.handlePongResponse(this); } }