1
0
Fork 0
mirror of https://github.com/ChomeNS/chomens-bot-mc.git synced 2025-04-24 04:53:39 -04:00

add mcdata to vm2 context

This commit is contained in:
ChomeNS 2022-08-26 17:15:12 +07:00
parent 458e5a7cd5
commit f950686fd3

View file

@ -223,6 +223,7 @@ function main() {
bot.uuid = bot._client.uuid;
bot.username = bot._client.username;
bot.entityId = data.entityId;
bot.mcData = require('minecraft-data')('1.18.2');
previusMessage = undefined;
loginfinish = false;
started = false;
@ -251,6 +252,7 @@ function main() {
},
generateEaglerUsername: generateEaglerUsername,
cowsay: cowsay,
mcData: bot.mcData,
},
// require: {
// mock: {
@ -263,8 +265,6 @@ function main() {
};
bot.vm = new VM(bot.vmoptions);
bot.mcData = require('minecraft-data')('1.18.2');
loginfinish = true;
await sleep(1400);
bot.core.run('minecraft:tellraw @a ' + JSON.stringify([{text: 'ChomeNS Bot', color: 'yellow'}, {text: ' - a bot made by ', color: 'gray'}, {text: 'chayapak', color: 'gold'}]));