aadnk / ProtocolLib

Provides read and write access to the Minecraft protocol with Bukkit.
GNU General Public License v2.0
287 stars 92 forks source link

Implemented WrappedEntityPose #178

Closed lewysDavies closed 4 years ago

lewysDavies commented 4 years ago

Added a Wrapper for EntityPose, which is contained in the Entity Metadata packet since 1.13+ This wrapper currently allows access to all 1.15.2 poses for use within the WrappedDataWatcher

Usage:

WrappedDataWatcher dataWatcher = new WrappedDataWatcher();
WrappedDataWatcherObject poseWatcher = new WrappedDataWatcherObject(6, 
        Registry.get(WrappedEntityPose.getNmsClass()));

WrappedEntityPose wrappedPose = WrappedEntityPose.fromValue(EntityPose.CROUCHING);
dataWatcher.setObject(poseWatcher, wrappedPose.getHandle());

// Send Metaupdate

Previews: CROUCHING image SLEEPING image

Relevant Open Issues:

871

864

dmulloy2 commented 4 years ago

Did you mean to make this pull request on dmulloy2/ProtocolLib?

lewysDavies commented 4 years ago

Yes, I am new to pull requests -_-