retrooper / packetevents

PacketEvents is emerging as a strong contender in the realm of Minecraft packet processing libraries. Designed to simplify packet manipulation while delivering high performance, this powerful tool aims to demystify the complexities of projects utilizing packets.
GNU General Public License v3.0
520 stars 149 forks source link

SpigotConversionUtil Additions #701

Open jtJava opened 6 months ago

jtJava commented 6 months ago

Is your feature request related to a problem? Please describe. It would be helpful to have methods added to the conversion util for the following: EntityEquipment -> List PlayerProfile/GameProfile -> UserProfile Pose -> EntityPose

Describe the solution you'd like Simple conversion methods added to the util class.

Describe alternatives you've considered to solve your solution without us adding this as a feature? I just do it myself without legacy version compatibility.

Add any other context or screenshots about the feature request here. image

jtJava commented 6 months ago

https://github.com/retrooper/packetevents/blob/c8d0733935a8d3cf80752fb1d755132f4a72eb3e/spigot/src/main/java/io/github/retrooper/packetevents/util/SpigotReflectionUtil.java#L395

This should be changed to return a UserProfile object with the texture included, and then a method for conversion using the Paper profile should be added to avoid unnecessary reflection.

Tofaa2 commented 6 months ago

https://github.com/retrooper/packetevents/blob/c8d0733935a8d3cf80752fb1d755132f4a72eb3e/spigot/src/main/java/io/github/retrooper/packetevents/util/SpigotReflectionUtil.java#L395

This should be changed to return a UserProfile object with the texture included, and then a method for conversion using the Paper profile should be added to avoid unnecessary reflection.

packet events is supporting spigot, not paper, therefore irs unavoidable, it gets cached which is a good thing

jordoncodes commented 6 months ago

Is your feature request related to a problem? Please describe. It would be helpful to have methods added to the conversion util for the following: EntityEquipment -> List PlayerProfile/GameProfile -> UserProfile Pose -> EntityPose

Describe the solution you'd like Simple conversion methods added to the util class.

Describe alternatives you've considered to solve your solution without us adding this as a feature? I just do it myself without legacy version compatibility.

Add any other context or screenshots about the feature request here. image

legacy version compatibility is really easy, it's just getValue and getSignature instead of value and signature

retrooper commented 6 months ago

Good suggestion, will be considered for the next update.