Inlined sounds are not possible to create using the API
- 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
- Try creating sound with range
- Doesn't work
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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