// Generated by delombok at Tue Dec 16 19:35:15 UTC 2025
package net.md_5.bungee.protocol.packet;

import io.netty.buffer.ByteBuf;
import net.md_5.bungee.protocol.AbstractPacketHandler;
import net.md_5.bungee.protocol.DefinedPacket;

public class GameState extends DefinedPacket {
    public static final short IMMEDIATE_RESPAWN = 11;
    //
    private short state;
    private float value;

    @Override
    public void read(ByteBuf buf) {
        state = buf.readUnsignedByte();
        value = buf.readFloat();
    }

    @Override
    public void write(ByteBuf buf) {
        buf.writeByte(state);
        buf.writeFloat(value);
    }

    @Override
    public void handle(AbstractPacketHandler handler) throws Exception {
        handler.handle(this);
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public short getState() {
        return this.state;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public float getValue() {
        return this.value;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setState(final short state) {
        this.state = state;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setValue(final float value) {
        this.value = value;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "GameState(state=" + this.getState() + ", value=" + this.getValue() + ")";
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public GameState() {
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public GameState(final short state, final float value) {
        this.state = state;
        this.value = value;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public boolean equals(final java.lang.Object o) {
        if (o == this) return true;
        if (!(o instanceof GameState)) return false;
        final GameState other = (GameState) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (this.getState() != other.getState()) return false;
        if (java.lang.Float.compare(this.getValue(), other.getValue()) != 0) return false;
        return true;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    protected boolean canEqual(final java.lang.Object other) {
        return other instanceof GameState;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        result = result * PRIME + this.getState();
        result = result * PRIME + java.lang.Float.floatToIntBits(this.getValue());
        return result;
    }
}
