Custom heads in 1.20.6
xeRicker opened this issue ยท 7 comments
I tried to make custom heads work with the 1.20.6 update but failed. I can confirm that the code in this page is not working.
Correct, this way isnt possible anymore, as vanilla tags are not stored as nbt at runtime.
I tried switching the tags around, but it didn't work either. Is there a workaround for that?
vanilla tags are not stored as nbt at runtime
In 1.20.5+ NBT.modify on items is always just custom nbt, not vanilla nbt.
3 possible workarounds:
- Convert the ItemStack to nbt, modify the component, turn the nbt back into an itemstack
- Build the itemstack nbt from the ground up and then turn it into an itemstack
- Build 1.20.4(or other earlier version) itemstack nbt, upgrade it, and then turn it into an itemstack.
Thanks for the response and the suggested workarounds. I'm still having trouble making custom heads work. Could you provide an example of the code using one of the listed methods?
Nice, gonna check it and update the wiki(as I now also nuked the text from the spigotmc page, also linking the wiki instead).
I added a new method in 2.13.0 that simplifies the process. Take a look at NBT.modifyComponents
.
Thanks! It works like a charm :)