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 fu) {
        this.pos = fu;
    }
    
    @Override
    public void handle(final ClientGamePacketListener nl) {
        nl.handleOpenSignEditor(this);
    }
    
    @Override
    public void read(final FriendlyByteBuf mg) throws IOException {
        this.pos = mg.readBlockPos();
    }
    
    @Override
    public void write(final FriendlyByteBuf mg) throws IOException {
        mg.writeBlockPos(this.pos);
    }
    
    public BlockPos getPos() {
        return this.pos;
    }
}
