package ru.dbotthepony.mc.otm.registry

import net.minecraft.resources.ResourceLocation
import net.minecraft.sounds.SoundEvent
import net.minecraft.sounds.SoundEvents
import net.minecraft.world.entity.EntityType
import net.minecraftforge.eventbus.api.IEventBus
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext
import net.minecraftforge.registries.DeferredRegister
import net.minecraftforge.registries.ForgeRegistries
import ru.dbotthepony.mc.otm.OverdriveThatMatters

object MSoundEvents {
	private val registry: MDeferredRegister<SoundEvent> = MDeferredRegister(ForgeRegistries.SOUND_EVENTS, OverdriveThatMatters.MOD_ID)

	// TODO: 1.19.3
	private fun make(name: String): MDeferredRegister<SoundEvent>.Entry<SoundEvent> = registry.register(name) { SoundEvent.createVariableRangeEvent(ResourceLocation(OverdriveThatMatters.MOD_ID, name)) }

	val RIFLE_SHOT 				by make("item.rifle_shot")
	val PLASMA_WEAPON_OVERHEAT 	by make("item.plasma_weapon_overheat")
	val PLAYER_BECOME_ANDROID 	by make("player_become_android")
	val CARGO_CRATE_OPEN 		by make("cargo_crate_open")

	val ANDROID_JUMP_BOOST		by make("android.jump_boost")
	val ANDROID_SHOCKWAVE		by make("android.shockwave")
	val ANDROID_PROJ_PARRY		by make("android.projectile_parry")

	internal fun register(bus: IEventBus) {
		registry.register(bus)
	}
}
