Ayfri / Kore

A Kotlin library to generate Datapacks for Minecraft Java.
https://kore.ayfri.com
GNU General Public License v3.0
73 stars 3 forks source link

[FEATURE] Add a method to play a sound from a string #82

Closed Aeltumn closed 2 months ago

Aeltumn commented 2 months ago

What module does this feature apply to?

DSL

Feature description

Currently you can only play a sound using the generated definitions (as far as I could find), but you can add your own sounds using resource packs, so it would be nice to have a version that lets you freely pick the sound id to play.

My issue is not duplicated

Ayfri commented 2 months ago

That's a mistake I made, instead of using SoundArgument I've used Sounds, a fix will release for 1.20.5-pre1 !

Then you'll be able to write SoundArgument("my_sound_name", "my_namespace") and put that as a parameter. Then also add a method for playing a sound using only a string if you want, but it's preferred to use Argument instances as you can keep the namespace and the name separated, it's easier to change later.

Aeltumn commented 2 months ago

SoundArgument does make more sense, that'd solve it.