Skip to content
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

Fix parse of sound event in MusicInstrument #11910

Closed
wants to merge 1 commit into from

Conversation

Doc94
Copy link
Contributor

@Doc94 Doc94 commented Jan 5, 2025

This PR is refer a issue mentioned in Discord where a item with a sound event in the instrument component throw a convert issue when call getItemMeta.
in a few tests i come to the CraftMusicInstrument and notice the use of a deprecate registry thing i change this and works but not really sure if this is the correct fix.. mostly the issue is ItemMeta and the expected things...

@Doc94 Doc94 requested a review from a team as a code owner January 5, 2025 01:52
@Machine-Maker
Copy link
Member

Lets instead add overloads to CraftRegistry.minecraftToBukkit and CraftRegistry.minecraftHolderToBukkit that take RegistryKey so others can use this and we don't have to do the full RegistryAccess.registryAccess()

@Doc94
Copy link
Contributor Author

Doc94 commented Jan 5, 2025

Lets instead add overloads to CraftRegistry.minecraftToBukkit and CraftRegistry.minecraftHolderToBukkit that take RegistryKey so others can use this and we don't have to do the full RegistryAccess.registryAccess()

you mean move the RegistryAccess.registryAccess() to CraftRegistry or the new method using the RegistryKey and handle in a own way?

@Machine-Maker
Copy link
Member

Machine-Maker commented Jan 5, 2025

well actually, minecraftToBukkit and minecraftHolderToBukkit should just have the bukkit Registry parameter replaced with RegistryKey. And then all the usages should be updated. Shouldn't be passing a Registry instance anywhere, just the key, and then get the registry instance in CraftRegistry minecraftToBukkit and minecraftHolderToBukkit

@Doc94
Copy link
Contributor Author

Doc94 commented Jan 5, 2025

well actually, minecraftToBukkit and minecraftHolderToBukkit should just have the bukkit Registry parameter replaced with RegistryKey. And then all the usages should be updated. Shouldn't be passing a Registry instance anywhere, just the key, and then get the registry instance in CraftRegistry minecraftToBukkit and minecraftHolderToBukkit

hmm im lost in there xd
if you wanna handle because (maybe the time) dont fully understand the changes in the implementation

@kennytv kennytv added the type: bug Something doesn't work as it was intended to. label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something doesn't work as it was intended to.
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

3 participants