package com.dairymoose.modernlife.core;

import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.common.crafting.conditions.ICondition;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/* loaded from: outputsrg.jar:com/dairymoose/modernlife/core/CraftingFlagCondition.class */
public class CraftingFlagCondition implements ICondition {
    private static final Logger LOGGER = LogManager.getLogger();
    String crafting_flag;

    public CraftingFlagCondition(String crafting_flag) {
        this.crafting_flag = crafting_flag;
    }

    public ResourceLocation getID() {
        return new ResourceLocation("modernlife", "crafting_flag");
    }

    public boolean test() {
        boolean result = ModernLifeCraftingFlags.getFlag(this.crafting_flag);
        if (!result) {
            ModernLifeCommon.LOGGER.debug(this.crafting_flag + ": disabled");
        }
        return result;
    }
}
