getEntityConverter() does not convert between NMS and Bukkit Entites
chrisliebaer opened this issue ยท 2 comments
Not sure what's the idea behind this converter, but according to the Javadoc it should be converting between NMS and Bukkit classes which in this case it doesn't. It converts between an integer and the Bukkit entity, sharing the same id, which is midly confusing, even if intented. I would propse chaning either die documentation or the implementation.
It kind of converts between the two. The use-case for this converter is packet.getEntities().read
, which makes sense when being used. I guess I could change the documentation for that converter, but for most people they're probably just looking at the packet container.
I guess most people use ProtocolLib for packets only but I found it very easy do other things with it's helper classes as well. I really got used to the converter classes so I tried to use it :)
I think changing the documentation would be enough. The type error that comes up if you throw in an NMS entity instead of an integer is very confusing.