diff --git a/.gitignore b/.gitignore index 6dc4554..1e92ae7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .vscode/ +.idea/ node_modules/ package-lock.json code_records/ diff --git a/src/agent/agent.js b/src/agent/agent.js index f7b658f..b2777f3 100644 --- a/src/agent/agent.js +++ b/src/agent/agent.js @@ -91,6 +91,12 @@ export class Agent { this.bot.on('login', () => { console.log('Logged in!'); + + // Set skin for profile, requires Fabric Tailor. (https://modrinth.com/mod/fabrictailor) + if (this.prompter.profile.skin) + this.bot.chat(`/skin set URL ${this.prompter.profile.skin.model} ${this.prompter.profile.skin.path}`); + else + this.bot.chat(`/skin clear`); }); this.bot.once('spawn', async () => { @@ -100,7 +106,7 @@ export class Agent { // wait for a bit so stats are not undefined await new Promise((resolve) => setTimeout(resolve, 1000)); - + console.log(`${this.name} spawned.`); this.clearBotLogs(); diff --git a/src/utils/mcdata.js b/src/utils/mcdata.js index 2a8d7fa..e4fa534 100644 --- a/src/utils/mcdata.js +++ b/src/utils/mcdata.js @@ -41,6 +41,10 @@ class MinecraftData { bot.loadPlugin(collectblock); bot.loadPlugin(autoEat); bot.loadPlugin(armorManager); // auto equip armor + bot.once('resourcePack', () => { + bot.acceptResourcePack(); + }); + return bot; }