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 ServerboundContainerClosePacket implements Packet<ServerGamePacketListener> {
    private int containerId;
    
    public ServerboundContainerClosePacket() {
    }
    
    public ServerboundContainerClosePacket(final int integer) {
        this.containerId = integer;
    }
    
    @Override
    public void handle(final ServerGamePacketListener qz) {
        qz.handleContainerClose(this);
    }
    
    @Override
    public void read(final FriendlyByteBuf mg) throws IOException {
        this.containerId = mg.readByte();
    }
    
    @Override
    public void write(final FriendlyByteBuf mg) throws IOException {
        mg.writeByte(this.containerId);
    }
}
