package net.halbear.aotg.registries;

import net.halbear.aotg.AgeoftheGods;
import net.halbear.aotg.custom.WorldGen.GenerationFeatures.LeafBunchFoliagePlacer;
import net.minecraft.core.registries.Registries;
import net.minecraft.world.level.levelgen.feature.foliageplacers.FoliagePlacerType;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredHolder;
import net.neoforged.neoforge.registries.DeferredRegister;

public class ModFoliagePlacers {

    public static final DeferredRegister<FoliagePlacerType<?>> FOLIAGE_PLACERS =
            DeferredRegister.create(Registries.FOLIAGE_PLACER_TYPE, AgeoftheGods.MODID);

    public static final DeferredHolder<FoliagePlacerType<?>, FoliagePlacerType<LeafBunchFoliagePlacer>> LEAF_BUNCH_FOLIAGE_PLACER =
            FOLIAGE_PLACERS.register("spherical_foliage_placer", () -> new FoliagePlacerType<>(LeafBunchFoliagePlacer.CODEC));

    public static void register(IEventBus eventBus) {
        FOLIAGE_PLACERS.register(eventBus);
    }
}
