cletus/node_modules/mineflayer/lib/plugins/spawn_point.js
2025-05-09 15:53:19 -05:00

11 lines
284 B
JavaScript

const { Vec3 } = require('vec3')
module.exports = inject
function inject (bot) {
bot.spawnPoint = new Vec3(0, 0, 0)
bot._client.on('spawn_position', (packet) => {
bot.spawnPoint = new Vec3(packet.location.x, packet.location.y, packet.location.z)
bot.emit('game')
})
}