API way to get opening/closing sounds from doors and trapdoors
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 12.7k
- Forks
- 3.5k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 11
Description
Is your feature request related to a problem?
Among the numerous kinds of doors that Minecraft has accumulated over the years, many of them have unique sounds when opening or closing them. Currently there is no way to get these sounds via the API. If you wish to emulate opening or closing a door through code, the sounds aren't played automatically, but you also have no way of knowing which sound to play in a robust and future-proof way.
Describe the solution you'd like.
A way to access the sounds given a Door or TrapDoor kind of object representing the specific kind of door.
Describe alternatives you've considered.
Hard-coding everything and crying when Mojang adds yet another wood type in the next update.
Other
Vanilla has a BlockSetType for this, which is stored in a field of a DoorBlock. I'd love for an equivalent to be exposed. I tried implementing this myself but failed because the Material system is so incompatible with vanilla's system. I'm hoping maybe it's more possible now with BlockType and stuff.
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 by examining how Door, TrapDoor, BlockType, and the Material system represent specific block kinds, then compare that with vanilla's BlockSetType and the DoorBlock field mentioned in the issue. Done means the API can retrieve the appropriate opening and closing sounds for each door or trapdoor kind without hard-coding every wood type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100