| icon | volume-low |
|---|
Use this website to convert your file (mp3, wav...) to ogg.
{% hint style="warning" %}
Remember to set "Change audio channels" to MONO or you will experience audio problems
{% endhint %}{% hint style="warning" %}
{% endhint %}
Put the sound file in contents/my_sounds/sounds/sound_1.ogg.
info:
namespace: my_sounds
minecraft_lang_overwrite:
my_lang_overwrite:
entries:
sound.sound_1: "Sound 1"
languages:
- ALL
sounds:
sound_1:
path: bruh
settings:
subtitle: sound.sound_1{% content-ref url="jukebox-disc.md" %} jukebox-disc.md {% endcontent-ref %}
Click to read the old method
- create a new folder
ItemsAdder/contents/my_sounds/resourcepack/my_sounds/sounds/
(or use yours if you already have one) - put your
.oggfile in there.
You can also create more folders insidesoundsto organize your sounds.
For exampleeffects,musicetc...
I have a file named song_1.ogg and I put it into a new music folder.
So now I have contents/my_sounds/resourcepack/my_sounds/sounds/music/song_1.ogg
- open the folder
contents/my_sounds/resourcepack/my_sounds/ - create a new file named
sounds.json(or open it if you already created it) - this file is a
.jsonfile so you MUST write it correctly or it won't work.
To add your sound into the file you just have to do this:
{% code title="contents/my_sounds/resourcepack/my_sounds/sounds.json" %}
{
"music.song_1":{
"sounds":[
"my_sounds:music/song_1"
]
}
}{% endcode %}
This is the sound name. You will use it in every part of the plugin and also in Minecraft vanilla /playsound command.
"music.song_1":{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).
{% hint style="warning" %}
Keep in mind that you have to change my_sounds to your own namespace name if it's different!
{% endhint %}
"sounds":[
"my_sounds:music/song_1"
]
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:
"sounds":[
"my_sounds:music/song_1_variant_1",
"my_sounds:music/song_1_variant_2",
"my_sounds:music/song_1_variant_3"
]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)
{
"music.song_1":{
"sounds":[
"my_sounds:music/song_1"
]
},
"music.song_2":{
"sounds":[
"my_sounds:music/song_2"
]
}
}{% hint style="warning" %}
If you want to be sure not to make mistakes use this website to check if your sounds.json file is good or has errors: https://jsonformatter.curiousconcept.com/
{% endhint %}
