/*
 *  Copyright 2025-2026 R3944Realms
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

package top.r3944realms.eroticdungeongame.datagen.provider;

import net.minecraft.data.PackOutput;
import net.minecraftforge.common.data.ExistingFileHelper;
import net.minecraftforge.common.data.SoundDefinition;
import net.minecraftforge.common.data.SoundDefinitionsProvider;
import top.r3944realms.eroticdungeongame.EroticDungeon;
import top.r3944realms.eroticdungeongame.core.register.EDGSoundEvents;

public class EDGSoundDefinitionsProvider extends SoundDefinitionsProvider {
    public EDGSoundDefinitionsProvider(PackOutput output, ExistingFileHelper helper) {
        super(output, EroticDungeon.MOD_ID, helper);
    }

    public SoundDefinition getSoundDefinition(String subTitle, SoundDefinition.Sound... sounds) {
        return SoundDefinition.definition().subtitle(subTitle).with(sounds);
    }

    @Override
    public void registerSounds() {
        add(
                EDGSoundEvents.LOCKING,
                getSoundDefinition(EDGSoundEvents.getSubTitleTranslateKey("lock"),
                        sound(EDGSoundEvents.RL_LOCKING, SoundDefinition.SoundType.SOUND))
        );
        add(
                EDGSoundEvents.UNLOCKING,
                getSoundDefinition(EDGSoundEvents.getSubTitleTranslateKey("unlock"),
                        sound(EDGSoundEvents.RL_UNLOCKING, SoundDefinition.SoundType.SOUND))
        );
        add(
                EDGSoundEvents.WHIP,
                getSoundDefinition(EDGSoundEvents.getSubTitleTranslateKey("whip"),
                        sound(EDGSoundEvents.RL_WHIP, SoundDefinition.SoundType.SOUND)
                )
        );
        add(
                EDGSoundEvents.IN,
                getSoundDefinition(EDGSoundEvents.getSubTitleTranslateKey("in"),
                        sound(EDGSoundEvents.RL_IN, SoundDefinition.SoundType.SOUND))
        );
        add(
                EDGSoundEvents.OUT,
                getSoundDefinition(EDGSoundEvents.getSubTitleTranslateKey("out"),
                        sound(EDGSoundEvents.RL_OUT, SoundDefinition.SoundType.SOUND))
        );
    }
}
