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 ClientboundHorseScreenOpenPacket implements Packet<ClientGamePacketListener> {
    private int containerId;
    private int size;
    private int entityId;
    
    public ClientboundHorseScreenOpenPacket() {
    }
    
    public ClientboundHorseScreenOpenPacket(final int integer1, final int integer2, final int integer3) {
        this.containerId = integer1;
        this.size = integer2;
        this.entityId = integer3;
    }
    
    @Override
    public void handle(final ClientGamePacketListener lw) {
        lw.handleHorseScreenOpen(this);
    }
    
    @Override
    public void read(final FriendlyByteBuf kv) throws IOException {
        this.containerId = kv.readUnsignedByte();
        this.size = kv.readVarInt();
        this.entityId = kv.readInt();
    }
    
    @Override
    public void write(final FriendlyByteBuf kv) throws IOException {
        kv.writeByte(this.containerId);
        kv.writeVarInt(this.size);
        kv.writeInt(this.entityId);
    }
    
    public int getContainerId() {
        return this.containerId;
    }
    
    public int getSize() {
        return this.size;
    }
    
    public int getEntityId() {
        return this.entityId;
    }
}
