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 ServerboundSetBeaconPacket implements Packet<ServerGamePacketListener> {
    private int primary;
    private int secondary;
    
    public ServerboundSetBeaconPacket() {
    }
    
    public ServerboundSetBeaconPacket(final int integer1, final int integer2) {
        this.primary = integer1;
        this.secondary = integer2;
    }
    
    @Override
    public void read(final FriendlyByteBuf kv) throws IOException {
        this.primary = kv.readVarInt();
        this.secondary = kv.readVarInt();
    }
    
    @Override
    public void write(final FriendlyByteBuf kv) throws IOException {
        kv.writeVarInt(this.primary);
        kv.writeVarInt(this.secondary);
    }
    
    @Override
    public void handle(final ServerGamePacketListener pl) {
        pl.handleSetBeaconPacket(this);
    }
    
    public int getPrimary() {
        return this.primary;
    }
    
    public int getSecondary() {
        return this.secondary;
    }
}
