EntityMetadata doesn't work in 1.19.3
karu1231 opened this issue · 4 comments
- This issue is not solved in a development build
Describe the bug
When I try to rewrite EntityMetadata Packet in 1.19.3 with onPacketSending, I get an error that Datawatcher is unrecognized.
To Reproduce
Steps to reproduce the behavior:
- Listen for EntityMetadata packets using PacketAdapter.
- To extract data from the packet, read number 0 of WatchableCollectionModifier.
- See error
Expected behavior
Manipulate EntityMeta packet data. (Note that this is an error that appeared when the code that worked in 1.18.1 was brought to 1.19.3, but worked fine in 1.18.1.)
You need to update your code to the new metadata system of Minecraft. WrappedWatchableObject has been replaced with WrappedDataValue. There is also a modifier for this. I think it is getWrappedDataValueLists()
or similar
You need to provide the unwrapped handle in the constructor of WrappedDataValue
. So in your case Optional.of(WrappedChatComponent.fromText(name).getHandle())