mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 18:54:55 -05:00
14 lines
351 B
JavaScript
14 lines
351 B
JavaScript
|
/* eslint-disable require-jsdoc */
|
||
|
const Vec3 = require('vec3');
|
||
|
|
||
|
function inject(bot) {
|
||
|
bot.position = new Vec3(null, null, null);
|
||
|
|
||
|
bot._client.on('position', (position) => {
|
||
|
bot.position = new Vec3(position.x, position.y, position.z);
|
||
|
bot.write('teleport_confirm', {teleportId: position.teleportId});
|
||
|
});
|
||
|
}
|
||
|
|
||
|
module.exports = {inject};
|