Update position.js

This commit is contained in:
Yaode_owo 2024-10-18 14:56:40 -04:00
parent 26dea59f4a
commit c0675ce4da

View file

@ -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);
});
}