diff --git a/lib/plugins/entities.js b/lib/plugins/entities.js index bd0514e39..223f9ec7c 100644 --- a/lib/plugins/entities.js +++ b/lib/plugins/entities.js @@ -269,7 +269,7 @@ function inject (bot) { entity.yaw = conv.fromNotchianYawByte(packet.yaw) entity.pitch = conv.fromNotchianPitchByte(packet.pitch) - entity.headPitch = conv.fromNotchianPitchByte(packet.headPitch) + entity.headYaw = conv.fromNotchianPitchByte(packet.headYaw) let notchVel if (bot.supportFeature('entityVelocityIsLpVec3')) { diff --git a/test/internalTest.js b/test/internalTest.js index 3027adb12..b3a7824dc 100644 --- a/test/internalTest.js +++ b/test/internalTest.js @@ -213,7 +213,7 @@ for (const supportedVersion of mineflayer.testedVersions) { z: 12, yaw: 13, pitch: 14, - headPitch: 14, + headYaw: 14, velocity: { x: 15, y: 16, z: 17 }, velocityX: 16, velocityY: 17, @@ -598,7 +598,7 @@ for (const supportedVersion of mineflayer.testedVersions) { z: 3, pitch: 0, yaw: 0, - headPitch: 0, + headYaw: 0, objectData: 1, velocity: { x: 0, y: 0, z: 0 }, velocityX: 0, @@ -679,7 +679,7 @@ for (const supportedVersion of mineflayer.testedVersions) { z: 3, pitch: 0, yaw: 0, - headPitch: 0, + headYaw: 0, objectData: 1, velocity: { x: 0, y: 0, z: 0 }, velocityX: 0, @@ -736,7 +736,7 @@ for (const supportedVersion of mineflayer.testedVersions) { z: 12, yaw: 13, pitch: 14, - headPitch: 14, + headYaw: 14, velocity: { x: 15, y: 16, z: 17 }, velocityX: 16, velocityY: 17, @@ -784,7 +784,7 @@ for (const supportedVersion of mineflayer.testedVersions) { z: 0, pitch: 0, yaw: 0, - headPitch: 0, + headYaw: 0, objectData: 1, velocity: { x: 0, y: 0, z: 0 }, velocityX: 0, @@ -925,7 +925,7 @@ for (const supportedVersion of mineflayer.testedVersions) { z: zombiePos.z, yaw: 0, pitch: 0, - headPitch: 0, + headYaw: 0, velocity: { x: 0, y: 0, z: 0 }, velocityX: 0, velocityY: 0,