/* * Decompiled with CFR 0.152. */ package net.minecraft.network.protocol.common; 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.common.CommonPacketTypes; import net.minecraft.network.protocol.common.ServerCommonPacketListener; public class ServerboundPongPacket implements Packet { public static final StreamCodec STREAM_CODEC = Packet.codec(ServerboundPongPacket::write, ServerboundPongPacket::new); private final int id; public ServerboundPongPacket(int id) { this.id = id; } private ServerboundPongPacket(FriendlyByteBuf input) { this.id = input.readInt(); } private void write(FriendlyByteBuf output) { output.writeInt(this.id); } @Override public PacketType type() { return CommonPacketTypes.SERVERBOUND_PONG; } @Override public void handle(ServerCommonPacketListener listener) { listener.handlePong(this); } public int getId() { return this.id; } }