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 ClientboundGameEventPacket implements Packet<ClientGamePacketListener> {
    public static final String[] EVENT_LANGUAGE_ID;
    private int event;
    private float param;
    
    public ClientboundGameEventPacket() {
    }
    
    public ClientboundGameEventPacket(final int integer, final float float2) {
        this.event = integer;
        this.param = float2;
    }
    
    @Override
    public void read(final FriendlyByteBuf kv) throws IOException {
        this.event = kv.readUnsignedByte();
        this.param = kv.readFloat();
    }
    
    @Override
    public void write(final FriendlyByteBuf kv) throws IOException {
        kv.writeByte(this.event);
        kv.writeFloat(this.param);
    }
    
    @Override
    public void handle(final ClientGamePacketListener lw) {
        lw.handleGameEvent(this);
    }
    
    public int getEvent() {
        return this.event;
    }
    
    public float getParam() {
        return this.param;
    }
    
    static {
        EVENT_LANGUAGE_ID = new String[] { "block.minecraft.bed.not_valid" };
    }
}
