package net.minecraft.network.protocol.game;

import net.minecraft.network.PacketListener;
import java.io.IOException;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.core.BlockPos;
import net.minecraft.network.protocol.Packet;

public class ClientboundOpenSignEditorPacket implements Packet<ClientGamePacketListener> {
    private BlockPos pos;
    
    public ClientboundOpenSignEditorPacket() {
    }
    
    public ClientboundOpenSignEditorPacket(final BlockPos fk) {
        this.pos = fk;
    }
    
    @Override
    public void handle(final ClientGamePacketListener lw) {
        lw.handleOpenSignEditor(this);
    }
    
    @Override
    public void read(final FriendlyByteBuf kv) throws IOException {
        this.pos = kv.readBlockPos();
    }
    
    @Override
    public void write(final FriendlyByteBuf kv) throws IOException {
        kv.writeBlockPos(this.pos);
    }
    
    public BlockPos getPos() {
        return this.pos;
    }
}
