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

Cannot convert direct holder to bukkit representation (Goat horn without proper instrument assigned) #11911

Closed
Athar42 opened this issue Jan 5, 2025 · 0 comments · Fixed by #11918
Labels
status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. version: 1.21.4 Game version 1.21.4

Comments

@Athar42
Copy link

Athar42 commented Jan 5, 2025

Expected behavior

Up to release 1.21.3, we were able to retrieve the PDC data of a custom goat horn which doesn't use a standard instrument (see below to reproduce).

Trying to retrieve the value using that code :
event.getItem().getItemMeta().getPersistentDataContainer().has(new NamespacedKey(myplugin, "customhorn")

should get me "filename.mp3" (where "event" is "PlayerInteractEvent")

Observed/Actual behavior

Now, doing the same code with 1.21.4 end with an error :
java.lang.IllegalArgumentException: Cannot convert direct holder to bukkit representation

Steps/models to reproduce

Give yourself a modified goat horn with a custom instrument (using a vanilla sound_event) + some custom_data (which will reflect the PDC creation) :

/give @a goat_horn[instrument={use_duration:10,range:100,sound_event:"minecraft:intentionally_empty"},custom_data={PublicBukkitValues:{"myplugin:customhorn":"filename.mp3"}]

If you try to retrieve the custom_data "myplugin:customhorn", you'll get the error.

Plugin and Datapack List

[03:07:15 INFO]: Server Plugins (6):
[03:07:15 INFO]: Bukkit Plugins:
[03:07:15 INFO]: - ArmorPoser, CustomDiscs, ProtocolLib, ViaBackwards, ViaVersion, voicechat

No Datapacks

Paper version

version
[03:07:53 INFO]: Checking version, please wait...
[03:07:53 INFO]: This server is running Paper version 1.21.4-75-main@9f90b4c (2025-01-04T21:02:23Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-72-daddcf6 (MC: 1.21.4)

Other

Behavior discussed on Discord + a PR which "resolve" it : #11910

I don't know what other informations would be needed, so if not clear enough, I'll edit it/reply with more content.

@papermc-sniffer papermc-sniffer bot added the version: 1.21.4 Game version 1.21.4 label Jan 5, 2025
@Warriorrrr Warriorrrr added status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. and removed status: needs triage labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted Disputed bug is accepted as valid or Feature accepted as desired to be added. version: 1.21.4 Game version 1.21.4
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants