package jesse.keeblarcraft.world.dimension;

import java.util.OptionalLong;

import jesse.keeblarcraft.Keeblarcraft;
import net.minecraft.registry.Registerable;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.tag.BlockTags;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.intprovider.UniformIntProvider;
import net.minecraft.world.World;
import net.minecraft.world.dimension.DimensionOptions;
import net.minecraft.world.dimension.DimensionType;
import net.minecraft.world.dimension.DimensionTypes;

public class ModDimensions {
    public static final RegistryKey<DimensionOptions> KEEBLAR_KEY = RegistryKey.of(RegistryKeys.DIMENSION,
            new Identifier(Keeblarcraft.MOD_ID, "keeblarcraftdim"));

    public static final RegistryKey<World> KEEBLAR_LEVEL_KEY = RegistryKey.of(RegistryKeys.WORLD,
            new Identifier(Keeblarcraft.MOD_ID, "keeblarcraftdim"));

    public static final RegistryKey<DimensionType> KEEBLAR_DIM_TYPE = RegistryKey.of(RegistryKeys.DIMENSION_TYPE,
            new Identifier(Keeblarcraft.MOD_ID, "keeblarcraftdim_type"));

    public static void bootstrapType(Registerable<DimensionType> context) {
        context.register(KEEBLAR_DIM_TYPE, new DimensionType(
            OptionalLong.of(12750), // fixedTime
            true, // hasSkylight
            false, // hasCeiling
            false, // ultraWarm
            false, // natural
            1.0, // coordinateScale
            true, // bedWorks
            false, // respawnAnchorWorks
            0, // minY
            480, // height DO NOT LOWER ANYMORE. IN PRODUCTION
            256, // logicalHeight
            BlockTags.INFINIBURN_OVERWORLD, // infiniburn
            DimensionTypes.OVERWORLD_ID, // effectsLocation
            0.5f, // ambientLight
            new DimensionType.MonsterSettings(false, false, UniformIntProvider.create(0, 0), 0)));
    }
}
