PaperMC / PaperMC/Paper

Inlined sounds are not possible to create using the API

Open
#14,171 0 comments 0 reactions 0 assignees View on GitHub

@Machine-Maker is already working on this.

Since Aug 7, 2026.

  • #14152 by @Machine-Maker — open
status: accepted version: 26.2
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Expected behavior

Being able to create Consumable data components with sound range or empty sound keys like this: sound:{sound_id:""}

Observed/Actual behavior

The API only supports Consumable.sound(Key key), no Consumable.sound(Key key, float range) or similar which the NBT data offers: https://minecraft.wiki/w/Data_component_format#consumable

Steps/models to reproduce
  1. Try creating sound with range
  2. Doesn't work
  3. Sad moment :(
Plugin and Datapack List

My own plugin

Paper version

Paper version 26.2-111-main@f570646 (2026-08-07T16:16:19Z) (Implementing API version 26.2.build.111-stable)

Other

Would also be nice to allow an empty string/key if you don't want to play an sound

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Consumable API and its existing sound(Key key) method, then compare its supported data with the linked Consumable component format. Check how API-created components are tested or represented in the repository; done means sound ranges and empty sound keys can be created through the API.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.