/*
 * SPDX-FileCopyrightText: 2026 KOKA99CAB
 * SPDX-License-Identifier: LGPL-3.0-or-later
 */

package net.koka99cab.portals.world;

import net.koka99cab.portals.PortalsMod;
import net.koka99cab.portals.world.feature.SkeletonBasaltSpikeFeature;
import net.koka99cab.portals.world.feature.SkeletonRuinFeature;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.Identifier;
import net.minecraft.world.level.levelgen.feature.Feature;
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;

public final class ModFeatures {
	public static final Feature<NoneFeatureConfiguration> SKELETON_BASALT_SPIKE = register(
			"skeleton_basalt_spike",
			new SkeletonBasaltSpikeFeature(NoneFeatureConfiguration.CODEC)
	);
	public static final Feature<NoneFeatureConfiguration> SKELETON_RUIN = register(
			"skeleton_ruin",
			new SkeletonRuinFeature(NoneFeatureConfiguration.CODEC)
	);

	private ModFeatures() {
	}

	public static void init() {
		PortalsMod.LOGGER.debug("Registered skeleton waste worldgen features");
	}

	private static <T extends Feature<?>> T register(String path, T feature) {
		Identifier id = PortalsMod.id(path);
		return Registry.register(BuiltInRegistries.FEATURE, id, feature);
	}
}
