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 ServerboundContainerButtonClickPacket implements Packet<ServerGamePacketListener> {
    private int containerId;
    private int buttonId;
    
    public ServerboundContainerButtonClickPacket() {
    }
    
    public ServerboundContainerButtonClickPacket(final int integer1, final int integer2) {
        this.containerId = integer1;
        this.buttonId = integer2;
    }
    
    @Override
    public void handle(final ServerGamePacketListener qz) {
        qz.handleContainerButtonClick(this);
    }
    
    @Override
    public void read(final FriendlyByteBuf mg) throws IOException {
        this.containerId = mg.readByte();
        this.buttonId = mg.readByte();
    }
    
    @Override
    public void write(final FriendlyByteBuf mg) throws IOException {
        mg.writeByte(this.containerId);
        mg.writeByte(this.buttonId);
    }
    
    public int getContainerId() {
        return this.containerId;
    }
    
    public int getButtonId() {
        return this.buttonId;
    }
}
