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:
parent
458e5a7cd5
commit
f950686fd3
1 changed files with 2 additions and 2 deletions
4
index.js
4
index.js
|
@ -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'}]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue