# sounds

In minecraft you can add your own sounds as well as modify them.

```
📦resource_pack.zip
  └── 📁assets
       └── 📁minecraft
           ├──📁sounds
           │  └── 📁liminality
           │       ├── 📑valve_water.ogg
           │       └── 📑lobby_song.ogg
           └── 📑sounds.json
```

```json
{
    "liminality.lobby_song": {
        "category": "ambient",
        "sounds": [
            "minecraft:liminality/lobby_song"
        ]
    },
    "liminality.valve_water": {
        "category": "block",
        "sounds": [
            "minecraft:liminality/valve_water"
        ]
    }
}
```

| Parameter | Description                                                                                                                                                                                         |
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| category  | The category of sound type which is, in any case, the one that can be decreased or increased at the user's options choice                                                                           |
| sounds    | the sound path, in this case it refers to `assets/minecraft/sounds/liminality/`                                                                                                                     |
| replace   | `True` if the sounds listed in sounds should replace the sounds listed in the default sounds.json for this sound event. `False` if the sounds listed should be added to the list of default sounds. |
| subtitle  | Translated as the subtitle of the sound if Show Subtitles is enabled ingame. Accepts [formatting codes](https://minecraft.wiki/w/Formatting_codes) and displays them properly in-game. Optional.    |

the list of categories is [here](https://minecraft.wiki/w/Sound#Categories)

### Sounds Options

These are more specific options that you can modify within the sound field

| Parameter             | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name                  | The path to this sound file from the "*`namespace`*`/sounds"` folder (excluding the `.ogg` file extension). The namespace defaults to `minecraft` but it can be changed by prepending a namespace and separating it with a `:`. Uses forward slashes instead of backslashes. May instead be the name of another sound event (according to value of "type"). If the sound file has one channel (mono), it can be played locationally (sound volume decreases the farther you are from the source). If the file has two channels (stereo), the volume does not change (for example music, ambient sounds).    |
| volume                | The volume for playing this sound. Value is a decimal greater than `0.0`. If undefined, defaults to `1.0`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| pitch                 | Plays the pitch at the specified value. Value is a decimal greater than `0`.`0`. If undefined, defaults to `1.0`, but higher and lower values can be chosen.                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| weight                | The chance that this sound is selected to play when this sound event is triggered. Defaults to `1`. An example: putting `2` in for the value would be like placing in the name twice. Only accepts integers.                                                                                                                                                                                                                                                                                                                                                                                                |
| stream                | `true/false`. `True` if this sound should be streamed from its file. It is recommended that this is set to "`true`" for sounds that have a duration longer than a few seconds to avoid lag. Used for all sounds in the "music" and "record" categories (except Note Block sounds), as (almost) all the sounds that belong to those categories are over a minute long. Optional. If undefined, defaults to "`false`". Setting this to false allows many more instances of the sound to be ran at the same time while setting it to true only allows `4` instances (of that type) to be ran at the same time. |
| attenuation\_distance | Modify sound reduction rate based on distance. Used by portals, beacons, and conduits. Defaults to `16`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| preload               | `true`/`false`. `True` if this sound should be loaded when loading the pack instead of when the sound is played. Used by the underwater ambience. Defaults to "`false`".                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| type                  | Two values are available: "`file`" and "`event`"; "`file`" causes the value of "name" to be interpreted as the name of a file, while "`event`" causes the value of "`name`" to be interpreted as the name of an already defined event. If undefined, defaults to "`file`".                                                                                                                                                                                                                                                                                                                                  |

```
📑The root Object.
  └── 📑<sound_name>
       ├── 📑replace:
       │    ├── true
       │    └── false
       ├── 📑subtitle
       │    └── "name"
       │         
       └── 📑sounds
           └── 📑A sound file
                ├── 📑path
                │     └── "minecraft:liminality/valve_water"
                ├── 📑name
                │     └── "liminality.valve_water"
                ├── 📑volume
                │     └── 1
                ├── 📑pitch
                │     └── 1
                ├── 📑weight
                │     └── 1
                ├── 📑stream
                │     ├── true
                │     └── false
                ├── 📑attenuation_distance
                │    └── 16
                ├── 📑preload
                │    ├── true
                │    └── false
                └── 📑type
                     ├── file
                     └── event
```

```json
{
    "liminality.valve_water": {
        "category": "block",
        "replace": false,
        "subtitle": "valve_water",
        "sounds": [
            {
                "name": "minecraft:liminality/valve_water",
                "replace": false,
                "volume": 1,
                "weight": 3,
                "steam": true,
                "attenuation_distance": true,
                "preload": false,
                "type": "event"
            },
            "minecraft:liminality/valve_water"
        ]
    },
    "mob.zombie.hurt": {
        "category": "hostile",
        "replace": true,
        "sounds": [
            {
                "name": "random.burp",
                "type": "event",
                "weight": 6
            },
            "mob/zombie/hurt1",
            "mob/zombie/hurt2",
            "mob/zombie/hurt3",
            "mob/zombie/hurt4"
        ]
    }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guide.elitefantasy.net/resourcepack-guide/beginning/sounds.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
