package me.zacharias.compadability;

import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.fml.event.config.ModConfigEvent;
import net.neoforged.neoforge.common.ModConfigSpec;

import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

// An example config class. This is not required, but it's a good idea to have one to keep your config organized.
// Demonstrates how to use Neo's config APIs
@EventBusSubscriber(modid = Compadability.MODID)
public class Config {
    private static final ModConfigSpec.Builder BUILDER = new ModConfigSpec.Builder();

    public static final ModConfigSpec.IntValue MAX_WATER_UNIT_CONTENT = BUILDER.comment("The max water content of a water purified drinking unit.").defineInRange("maxWaterUnitContent", 128_000, 0, Integer.MAX_VALUE);
    public static final ModConfigSpec.IntValue MB_PER_THIRST = BUILDER.comment("The amount the milibuckets per thirst point of a water purified drinking unit.").defineInRange("mbPerThirst", 100, 0, Integer.MAX_VALUE);
    public static final ModConfigSpec.IntValue MAX_WATER_UNIT_TRANSFER = BUILDER.comment("The max amount of water that can be transferred per tick from a water purified drinking unit.").defineInRange("maxWaterUnitTransfer", 256, 0, Integer.MAX_VALUE);

    static final ModConfigSpec SPEC = BUILDER.build();

    public static int MaxWaterUnitContent;
    public static int MbPerThirst;

    @SubscribeEvent
    static void onLoad(final ModConfigEvent event) {
        MaxWaterUnitContent = MAX_WATER_UNIT_CONTENT.get();
        MbPerThirst = MB_PER_THIRST.get();
    }
}
