package net.minecraft.network.protocol.game;

import net.minecraft.network.PacketListener;
import java.io.IOException;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.tags.TagManager;
import net.minecraft.network.protocol.Packet;

public class ClientboundUpdateTagsPacket implements Packet<ClientGamePacketListener> {
    private TagManager tags;
    
    public ClientboundUpdateTagsPacket() {
    }
    
    public ClientboundUpdateTagsPacket(final TagManager abb) {
        this.tags = abb;
    }
    
    @Override
    public void read(final FriendlyByteBuf kv) throws IOException {
        this.tags = TagManager.deserializeFromNetwork(kv);
    }
    
    @Override
    public void write(final FriendlyByteBuf kv) throws IOException {
        this.tags.serializeToNetwork(kv);
    }
    
    @Override
    public void handle(final ClientGamePacketListener lw) {
        lw.handleUpdateTags(this);
    }
    
    public TagManager getTags() {
        return this.tags;
    }
}
