Commits

Owen1212055 authored and md_5 committed a2fafdd1d2f
#1232: Re-add fix for player rotation
No tags

nms-patches/net/minecraft/server/level/EntityTrackerEntry.patch

Modified
106 106
107 107 + // CraftBukkit start - If sending own attributes send scaled health instead of current maximum health
108 108 + if (this.entity.getId() == entityplayer.getId()) {
109 109 + ((EntityPlayer) this.entity).getBukkitEntity().injectScaledMaxHealth(collection, false);
110 110 + }
111 111 + // CraftBukkit end
112 112 +
113 113 if (!collection.isEmpty()) {
114 114 consumer.accept(new PacketPlayOutUpdateAttributes(this.entity.getId(), collection));
115 115 }
116 -@@ -300,6 +339,7 @@
116 +@@ -300,8 +339,15 @@
117 117 if (!list.isEmpty()) {
118 118 consumer.accept(new PacketPlayOutEntityEquipment(this.entity.getId(), list));
119 119 }
120 120 + ((EntityLiving) this.entity).detectEquipmentUpdates(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending
121 121 }
122 122
123 ++ // CraftBukkit start - MC-109346: Fix for nonsensical head yaw
124 ++ if (this.entity instanceof EntityPlayer) {
125 ++ consumer.accept(new PacketPlayOutEntityHeadRotation(this.entity, (byte) MathHelper.floor(this.entity.getYHeadRot() * 256.0F / 360.0F)));
126 ++ }
127 ++ // CraftBukkit end
128 ++
123 129 if (!this.entity.getPassengers().isEmpty()) {
124 -@@ -333,6 +373,11 @@
130 + consumer.accept(new PacketPlayOutMount(this.entity));
131 + }
132 +@@ -333,6 +379,11 @@
125 133 Set<AttributeModifiable> set = ((EntityLiving) this.entity).getAttributes().getDirtyAttributes();
126 134
127 135 if (!set.isEmpty()) {
128 136 + // CraftBukkit start - Send scaled max health
129 137 + if (this.entity instanceof EntityPlayer) {
130 138 + ((EntityPlayer) this.entity).getBukkitEntity().injectScaledMaxHealth(set, false);
131 139 + }
132 140 + // CraftBukkit end
133 141 this.broadcastAndSend(new PacketPlayOutUpdateAttributes(this.entity.getId(), set));
134 142 }
135 143

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut