Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/plugins/entities.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend keeping .headPitch set to .headYaw for compatibility

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do u mean compatibility?
for me it mean it will break alot thing, but what actually issue is it?
and why only that file change?

entity.headYaw = conv.fromNotchianPitchByte(packet.headYaw)

let notchVel
if (bot.supportFeature('entityVelocityIsLpVec3')) {
Expand Down
12 changes: 6 additions & 6 deletions test/internalTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading