diff --git a/plugins/core.js b/plugins/core.js index db5b707..35d051d 100644 --- a/plugins/core.js +++ b/plugins/core.js @@ -102,20 +102,6 @@ function inject(bot, dcclient, config) { // }, }; - // bot._client.on('block_change', (packet) => { - // if (core.isCore(packet.location) && packet.type === 0) fillCore(); - // }); - - // bot._client.on('multi_block_change', (packet) => { - // if (core.start === packet.chunkCoordinates || core.end === packet.chunkCoordinates) fillCore(); - // }); - - bot.on('end', () => { - clearInterval(interval); - }); - - bot.core = core; - function fillCore() { core.start = new Vec3( Math.floor(bot.position.x / 16) * 16, @@ -131,6 +117,20 @@ function inject(bot, dcclient, config) { bot.on('position', fillCore); const interval = setInterval(() => fillCore(), config.core.refillInterval); + + // bot._client.on('block_change', (packet) => { + // if (core.isCore(packet.location) && packet.type === 0) fillCore(); + // }); + + // bot._client.on('multi_block_change', (packet) => { + // if (core.start === packet.chunkCoordinates || core.end === packet.chunkCoordinates) fillCore(); + // }); + + bot.on('end', () => { + clearInterval(interval); + }); + + bot.core = core; } module.exports = {inject};