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 mg) throws IOException {
        this.primary = mg.readVarInt();
        this.secondary = mg.readVarInt();
    }
    
    @Override
    public void write(final FriendlyByteBuf mg) throws IOException {
        mg.writeVarInt(this.primary);
        mg.writeVarInt(this.secondary);
    }
    
    @Override
    public void handle(final ServerGamePacketListener qz) {
        qz.handleSetBeaconPacket(this);
    }
    
    public int getPrimary() {
        return this.primary;
    }
    
    public int getSecondary() {
        return this.secondary;
    }
}
