Merge pull request #322 from Nimikita/profile-skins

Profile skins (Fabric Tailor)
This commit is contained in:
Max Robinson 2024-11-16 14:06:03 -06:00 committed by GitHub
commit da51341bdb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -84,6 +84,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 () => {
@ -93,7 +99,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();