/* * Decompiled with CFR 0.152. */ package net.minecraft.network.protocol.cookie; 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.cookie.ClientCookiePacketListener; import net.minecraft.network.protocol.cookie.CookiePacketTypes; import net.minecraft.resources.Identifier; public record ClientboundCookieRequestPacket(Identifier key) implements Packet { public static final StreamCodec STREAM_CODEC = Packet.codec(ClientboundCookieRequestPacket::write, ClientboundCookieRequestPacket::new); private ClientboundCookieRequestPacket(FriendlyByteBuf input) { this(input.readIdentifier()); } private void write(FriendlyByteBuf output) { output.writeIdentifier(this.key); } @Override public PacketType type() { return CookiePacketTypes.CLIENTBOUND_COOKIE_REQUEST; } @Override public void handle(ClientCookiePacketListener listener) { listener.handleRequestCookie(this); } }