🔊סאונד
Last updated
Last updated
open plugins\ItemsAdder\data\resource_pack\assets folder
open your namespace folder
create a new folder called sounds
put your .ogg file in there (you can also create another folder to organize your sounds, for example "effects" folder, "music" folder...)
for example I have a file named cdk_sunday.ogg and I put it into a new music_disc folder.
So now I have plugin\ItemsAdder\data\resource_pack\assets\NAMESPACE\sounds\music_disc\cdk_sunday.ogg
open plugins\ItemsAdder\data\resource_pack\assets folder
open your namespace folder
create a new file named sounds.json
(or open it if you already created)
this file is a json file, you MUST write it corretly or it won't work. If you need info about Json files please search online.
To add your sound into the file you just have to do this:
Now I explain each part of the code I wrote. This is the sound name, you will use it in every part of the plugin and also in Minecraft vanilla /playsound command
This is the list of sound files Minecraft will play when you call the sound name.
Minecraft will play one of these sounds randomly (only if you set more than one sound).
⚠️Keep in mind that you have to change myitems
to your own namespace name.
For example if you want to have random sounds for the same sound name you just have to create multiple .ogg files and put them like this:
It's easy, the next time you want to add a sound you just have to add a comma at the end, like this. (I'm referring to line 6 comma)
If you want to be sure not to make mistakes use this website to check if your Json file is good or has errors: https://jsonformatter.curiousconcept.com/