Fix the new position plugin
This commit is contained in:
parent
a8ce3ecba3
commit
b5b803e1e8
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
function inject (bot) {
|
||||
bot.position = { x: null, y: null, z: null, yaw: null, pitch: null } // to prevent errors i guess
|
||||
|
||||
bot._client.on('position', (packet) => {
|
||||
bot.on('packet.position', (packet) => {
|
||||
const oldPos = { ...bot.position }
|
||||
|
||||
bot.position.x = packet.x + bot.position.x * !!(packet.flags & 1)
|
||||
|
|
Loading…
Reference in a new issue