package net.minecraft.network.protocol.game;

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

public class ServerboundPickItemPacket implements Packet<ServerGamePacketListener> {
    private int slot;
    
    public ServerboundPickItemPacket() {
    }
    
    public ServerboundPickItemPacket(final int integer) {
        this.slot = integer;
    }
    
    @Override
    public void read(final FriendlyByteBuf mg) throws IOException {
        this.slot = mg.readVarInt();
    }
    
    @Override
    public void write(final FriendlyByteBuf mg) throws IOException {
        mg.writeVarInt(this.slot);
    }
    
    @Override
    public void handle(final ServerGamePacketListener qz) {
        qz.handlePickItem(this);
    }
    
    public int getSlot() {
        return this.slot;
    }
}
