mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-09-10 12:02:59 +02:00
lil fixes to smelting/pathfinding
This commit is contained in:
parent
dde8ef210f
commit
0cd4dcd420
4 changed files with 4 additions and 9 deletions
|
@ -7,7 +7,7 @@ const settings = {
|
|||
// the mindserver manages all agents and hosts the UI
|
||||
"mindserver_port": 8080,
|
||||
|
||||
"base_profile": "survival", // survival, creative, assistant, or god_mode
|
||||
"base_profile": "survival", // survival, assistant, creative, or god_mode
|
||||
"profiles": [
|
||||
"./andy.json",
|
||||
// "./profiles/gpt.json",
|
||||
|
|
|
@ -69,7 +69,7 @@ export class ActionManager {
|
|||
else {
|
||||
this.recent_action_counter = 0;
|
||||
}
|
||||
if (this.recent_action_counter > 2) {
|
||||
if (this.recent_action_counter > 3) {
|
||||
console.warn('Fast action loop detected, cancelling resume.');
|
||||
this.cancelResume(); // likely cause of repetition
|
||||
}
|
||||
|
|
|
@ -278,12 +278,7 @@ export const actionsList = [
|
|||
'num': { type: 'int', description: 'The number of times to smelt the item.', domain: [1, Number.MAX_SAFE_INTEGER] }
|
||||
},
|
||||
perform: runAsAction(async (agent, item_name, num) => {
|
||||
let success = await skills.smeltItem(agent.bot, item_name, num);
|
||||
if (success) {
|
||||
setTimeout(() => {
|
||||
agent.cleanKill('Safely restarting to update inventory.');
|
||||
}, 500);
|
||||
}
|
||||
await skills.smeltItem(agent.bot, item_name, num);
|
||||
})
|
||||
},
|
||||
{
|
||||
|
|
|
@ -156,7 +156,7 @@ const modes_list = [
|
|||
{
|
||||
name: 'hunting',
|
||||
description: 'Hunt nearby animals when idle.',
|
||||
interrupts: [],
|
||||
interrupts: ['action:followPlayer'],
|
||||
on: true,
|
||||
active: false,
|
||||
update: async function (agent) {
|
||||
|
|
Loading…
Add table
Reference in a new issue