idk if this fixes but ig no

This commit is contained in:
ChomeNS 2022-11-15 17:52:33 +07:00
parent 38813c9ae8
commit eab8afe146

View file

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