resourcepack.ai
DOCS

Building

Sounds

A sound is an effect you generate from a description and drop into the pack. It either replaces a noise the game already makes or becomes a new one your commands can play, and which of those it is comes down entirely to what you name it.

Making one#

Describe the sound the way you'd describe it to somebody who has to make it:

a heavy iron door dragging open, stone grinding, echoing hall

Three settings shape the result:

SettingWhat it does
Length0.5 to 30 seconds. Ask for roughly what you need; an effect padded with silence reads as sloppy in game
TakesHow many candidates one prompt draws. Four by default, ten at most
LoopMakes the audio seamless end-to-end, for anything that plays continuously

Takes are the setting that matters most. One prompt drawing four candidates and you keeping the best is most of the difference between a prompt that works and one that doesn't. Each take is charged, so ten is ten sounds' worth.

Past six takes it costs wall-clock time as well: they go out in two waves rather than one. Slower, not broken.

Choosing and refining#

Every take sits on the sound's page as its own waveform you can play, and the list is the reason to be on that page. You pick which one the pack uses; the others stay there for comparison until you delete them.

If none of them land, Another take re-runs the same prompt and adds to the list rather than replacing it, so a good take is never lost to a worse one. Editing the prompt draws against the new wording instead.

The event name and category are editable afterwards, which means a sound generated as a new event can be renamed onto a vanilla one later without regenerating any audio.

The event name decides everything#

There is no setting for "replace" versus "add". There is only the name.

  1. 1

    Name it after a vanilla event

    entity.creeper.primed, block.chest.open, entity.player.levelup. The pack's audio replaces the game's, everywhere the game would have played it. Nothing has to run a command, and nothing has to know your pack exists.

  2. 2

    Name it something new

    custom.laser, boss.phase_two. Nothing triggers it on its own; it's a sound waiting for something to play it, by command or from a plugin.

Both land in the minecraft namespace, so a new event is played as minecraft:custom.laser.

Playing one by command#

/sound @p custom.laser player

/sound comes from the ResourcePack AI plugin, and any player may run it. The last argument is the source, the volume slider that playback obeys. It's chosen per command, not stored in the pack; see below.

Vanilla's own /playsound minecraft:custom.laser player @p does the same thing, but needs operator permissions, which is why the plugin has its own.

A client can only play a sound it already has. Sync the pack to the player first; playing an event they haven't downloaded fails silently.

Categories are not a pack setting#

A sound's category (which volume slider governs it) cannot be set by a resource pack on Java. sounds.json had a category field until 1.10-pre2 and hasn't since; the game takes it from whatever code plays the event.

That means:

  • Replacing a vanilla event keeps that event's original category. Your audio replaces the creeper fuse, and it's still a Hostile Creatures sound.
  • A new event has no category of its own at all. It gets one per playback, from the source argument of whatever command fires it, so in practice the category is chosen by whoever writes the command, not by the pack.

The "Play as" setting in the Studio is the source it puts in the command it generates for you. It's a convenience for that command, not something baked into the exported pack.

Bedrock is the opposite: its sound definitions do take a category. If you've read Bedrock docs, this is the difference that catches people.

Exporting#

assets/minecraft/sounds.json
assets/minecraft/sounds/<name>.ogg

Files are Ogg Vorbis, mono. Both parts matter:

  • Minecraft reads Ogg Vorbis only. Ogg Opus has the same extension and plays in every desktop audio player, and the game refuses to load it.
  • Minecraft only attenuates and pans a sound positionally if it has one channel. A stereo effect plays flat, at full volume, wherever the player is standing.

Sounds longer than ten seconds are marked stream, which is what vanilla does for music and records: decoded as they play rather than loaded whole.

Several sounds on one event#

Give two sounds the same event name and Minecraft picks between them at random each time it fires, the way vanilla gives a block several footstep noises. Nothing extra to switch on.

On Bedrock#

Sounds are not included in the Bedrock .mcpack. Bedrock uses a different sound format (sound_definitions.json), and the Java pack's audio is skipped rather than half-converted.