Update position.js
This commit is contained in:
parent
26dea59f4a
commit
c0675ce4da
1 changed files with 48 additions and 47 deletions
|
@ -35,14 +35,15 @@ function inject(bot) {
|
|||
|
||||
bot.write('teleport_confirm', { teleportId })
|
||||
|
||||
bot.emit('move', oldPosition) // idk why add "true", so i removed
|
||||
bot.emit('move', oldPosition, newPosition);
|
||||
});
|
||||
|
||||
bot.on("end", () => {
|
||||
bot.position = { x: NaN, y: NaN, z: NaN, yaw: NaN, pitch: NaN, world: null };
|
||||
});
|
||||
|
||||
bot.on('move', oldPosition => {
|
||||
bot.on('move', (oldPosition, newPosition) => {
|
||||
console.log(oldPosition); // NaN value at join
|
||||
console.log(newPosition);
|
||||
});
|
||||
}
|
Reference in a new issue