Adding Sounds to your Animation - varun-liver/animationlib GitHub Wiki
To add sounds to your animation:
- Get an Ogg sound file, put it in
src\main\resources\assets\<modid>\animationlib\sounds - Add a sound field to your animation JSON:
"sound":"<modid>:<sound_file_name>"
Add no extention to the name.
3. Play the sound as usual, using either <animation_name>.play(entity) or /animation <modid>:<sound_file_name>
To play only sound in your Animation, use the play() function and stop() function:
import con.animationlib.api.AudioTrack;
Audiotrack.play("<modid>:<file_name>")
Audiotrack.stop("<modid>:<file_name>")