/* * Decompiled with CFR 0.152. */ package net.minecraft.network.protocol.game; import java.util.List; 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.game.ClientGamePacketListener; import net.minecraft.network.protocol.game.GamePacketTypes; public record ClientboundCustomChatCompletionsPacket(Action action, List entries) implements Packet { public static final StreamCodec STREAM_CODEC = Packet.codec(ClientboundCustomChatCompletionsPacket::write, ClientboundCustomChatCompletionsPacket::new); private ClientboundCustomChatCompletionsPacket(FriendlyByteBuf input) { this(input.readEnum(Action.class), input.readList(FriendlyByteBuf::readUtf)); } private void write(FriendlyByteBuf output) { output.writeEnum(this.action); output.writeCollection(this.entries, FriendlyByteBuf::writeUtf); } @Override public PacketType type() { return GamePacketTypes.CLIENTBOUND_CUSTOM_CHAT_COMPLETIONS; } @Override public void handle(ClientGamePacketListener listener) { listener.handleCustomChatCompletions(this); } public static enum Action { ADD, REMOVE, SET; } }