package com.dairymoose.modernlife.core;

import java.util.List;
import net.minecraftforge.common.ForgeConfigSpec;

/* loaded from: outputsrg.jar:com/dairymoose/modernlife/core/ConfigOverrideIntValue.class */
public class ConfigOverrideIntValue implements IConfigOverride<Integer> {
    private Integer override = null;
    public ForgeConfigSpec.IntValue value;

    public ConfigOverrideIntValue(ForgeConfigSpec.IntValue value) {
        this.value = value;
    }

    public Integer getValue() {
        if (this.override != null) {
            return this.override;
        }
        return (Integer) this.value.get();
    }

    @Override // com.dairymoose.modernlife.core.IConfigOverride
    public String getKey() {
        List<String> path = this.value.getPath();
        if (path == null) {
            return null;
        }
        String key = path.get(path.size() - 1);
        return key;
    }

    @Override // com.dairymoose.modernlife.core.IConfigOverride
    public void setOverride(Integer override) {
        this.override = override;
    }
}
