Format
This pages describes the format of the JSON used by NoteBetter.
Here's the configuration file which represents vanilla note blocks:
{
"blocks": [
],
"materials": [
{
"material": "minecraft:stone",
"sound": {
"name": "minecraft:note.bd",
"volume": 3.0
}
},
{
"material": "minecraft:sand",
"sound": {
"name": "minecraft:note.snare",
"volume": 3.0
}
},
{
"material": "minecraft:glass",
"sound": {
"name": "minecraft:note.hat",
"volume": 3.0
}
},
{
"material": "minecraft:planks",
"sound": {
"name": "minecraft:note.bassattack",
"volume": 3.0
}
}
],
"default": {
"name": "minecraft:note.harp",
"volume": 3.0
}
}
You may omit any of "blocks"
, "materials"
or "default"
, or explicitly set them to null
.
The blocks array contains values of the form:
{
"block": "minecraft:stone",
"sound": {
"name": "minecraft:note.bd",
"volume": 3.0
}
}
The "block"
is the block name. The "sound"
is the sound to be played, see below.
The materials array contains values of the form:
{
"material": "minecraft:stone",
"sound": {
"name": "minecraft:note.bd",
"volume": 3.0
}
}
The "material"
is a block name from which to retrieve the material. The "sound"
is the sound to be played, see below.
For example:
"minecraft:stone"
has material type "rock", "minecraft:nether_brick"
also has material type "rock". Assigning the sound "minecraft:note.bd"
to the material of "minecraft:stone"
means the block "minecraft:nether_brick"
also plays "minecraft:note.bd"
.
The default sound is the sound used when the block isn't on the "blocks"
array and the material of the block isn't on the "materials"
array. In vanilla, this is { "name": "minecraft:note.harp", "volume": 3.0 }
.
Setting this to null
or omitting this key completely makes NoteBetter fall back to vanilla note block handling if it doesn't know what to do.
Sounds can be one of:
- String
-
null
(except "default" sound) - Object
The sound:
"minecraft:note.harp"
Is the same as:
{
"name": "minecraft.note.harp",
"volume": 3.0
}
Where "name"
is a string specifying the sound name to be played (this is the same sound name as in sounds.json), or null
, in which case no sound will be played, and "volume"
is a raw Minecraft volume (I don't know how this works, but Minecraft uses 3.0 for notes).
The order in which NoteBetter will try to match is:
- Try to match a block. If there is a match, use it.
- Try to match a material. If there is a match, use it.
- Fallback to
"default"
. It is recommended that you allow fallback to vanilla handling, so that other mods can add their own custom instruments by changing the vanilla note handling.