-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Instrument Component fields into MusicInstrument #11925
base: main
Are you sure you want to change the base?
Conversation
when make this i have the "question" about if is good make the changes in MusicInstrument or move to the paper components for make a builder... but sure the best thing.. i mean for less breaking things i prefer keep working in MusicInstrument (not sure in that case how handle a builder or leave this to future PR) another thing.. currently this PR still fails if the item created has a sound_event invalid
|
Adventure related methods shouldn't have a get/set prefix and getSoundEvent feels a bit weird i don't think the api has any of that actually except registry keys fields. It's okay to have them in the instrument itself in the future the value could be created via an inlined builder like Art#create in the component. |
If we could have a proper way, with Paper, to handle this component, you don't even know how happy I would be :D (being able to manipulate this from my plugin, and so, remove the instrument to replace it with a sound event). |
changes make.. i think im a little lost in the last things. |
|
||
Component description(); | ||
|
||
Sound sound(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect. We cannot/should not use the Sound type here. This has to be an Either<SoundEventRegistryEntry, TypedKey>. See how I've implemented it in JukeboxSoundRegistryEntry. https://github.com/PaperMC/Paper/pull/11805/files#diff-806c67f8d37d5fadd51ad314002172c70d3eff1ce45f2fe2c7219f27b9ad9b07R30
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohhh i see... first time dealing with this. but then this PR now depends in #11805 for the SoundEventRegistryEntry not?
This PR aims to provide more fields to the MusicInstrument currently this class with many deprecated methods for the instrument but not provide any method for the fields in instrument https://minecraft.wiki/w/Data_component_format#instrument like the description or duration.
This depends on #11918 for items with instruments custom