package eu.mhsl.minenet.minigames.instance;

import net.minestom.server.MinecraftServer;
import net.minestom.server.registry.DynamicRegistry;
import net.minestom.server.utils.NamespaceID;
import net.minestom.server.world.DimensionType;

/**
 * Prebuilt dimensions
 */
public enum Dimension {
    OVERWORLD(
            NamespaceID.from("minenet:fullbright_overworld"),
            DimensionType
                    .builder()
                    .ambientLight(2.0f)
                    .build()
    ),

    NETHER(
            NamespaceID.from("minenet:fullbright_nether"),
            DimensionType
                    .builder()
                    .ambientLight(2.0f)
                    .effects("minecraft:the_nether")
                    .build()
    ),

    THE_END(
            NamespaceID.from("minenet:fullbright_end"),
            DimensionType
                    .builder()
                    .ambientLight(2.0f)
                    .effects("minecraft:the_end")
                    .build()
    );

    public final DimensionType DIMENSION;
    public final NamespaceID namespaceID;
    public final DynamicRegistry.Key<DimensionType> key;
    Dimension(NamespaceID namespaceID, DimensionType dimType) {
        this.DIMENSION = dimType;
        this.namespaceID = namespaceID;

        this.key = MinecraftServer.getDimensionTypeRegistry().register(namespaceID, DIMENSION);
    }

}
