package top.r3944realms.lib39.core.register;

import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.sounds.SoundEvent;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.DeferredRegister;
import top.r3944realms.lib39.Lib39;

/**
 * The type Lib 39 sound events.
 */
public class NeoForgeLib39SoundEvents {
    /**
     * The constant SOUND_EVENTS.
     */
    public static final DeferredRegister<SoundEvent> SOUND_EVENTS = DeferredRegister.create(BuiltInRegistries.SOUND_EVENT, Lib39.MOD_ID);

    static {
        Lib39SoundEvents.DUCK_TOY = SOUND_EVENTS.register("duck_toy",
                () -> SoundEvent.createFixedRangeEvent(Lib39SoundEvents.RL_DUCK_TOY, 32.0f));
    }

    /**
     * Register.
     *
     * @param bus the bus
     */
    public static void register(IEventBus bus) {
        SOUND_EVENTS.register(bus);
    }


    /**
     * Gets sub title translate key.
     *
     * @param name the name
     * @return the sub title translate key
     */
    public static String getSubTitleTranslateKey(String name) {
        return "sound." + Lib39.MOD_ID + ".subtitle." + name;
    }
}
