mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-03-28 14:56:24 +01:00
settings.json to json object
This commit is contained in:
parent
dd89b25277
commit
449e3da221
7 changed files with 21 additions and 22 deletions
2
main.js
2
main.js
|
@ -1,5 +1,5 @@
|
|||
import { AgentProcess } from './src/process/agent-process.js';
|
||||
import settings from './src/settings.js';
|
||||
import settings from './settings.js';
|
||||
|
||||
let profiles = settings.profiles;
|
||||
let load_memory = settings.load_memory;
|
||||
|
|
17
settings.js
Normal file
17
settings.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
export default
|
||||
{
|
||||
"minecraft_version": "1.20.4", // supports up to 1.20.4
|
||||
"host": "127.0.0.1", // or "localhost", "your.ip.address.here"
|
||||
"port": 55916,
|
||||
"auth": "offline", // or "microsoft"
|
||||
|
||||
"profiles": [
|
||||
"./andy.json"
|
||||
// add more profiles here, check ./profiles/ for more
|
||||
// more than 1 profile will require you to /msg each bot indivually
|
||||
],
|
||||
"load_memory": false, // load memory from previous session
|
||||
"init_message": "Say hello world and your name", // sends to all on spawn
|
||||
"allow_insecure_coding": false, // disable at own risk
|
||||
"code_timeout_mins": 10, // -1 for no timeout
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"minecraft_version": "1.20.4",
|
||||
"host": "127.0.0.1",
|
||||
"port": 55916,
|
||||
"auth": "offline",
|
||||
"allow_insecure_coding": true,
|
||||
"code_timeout_mins": 10,
|
||||
|
||||
"profiles": [
|
||||
"./profiles/gpt.json",
|
||||
"./profiles/llama.json"
|
||||
],
|
||||
"load_memory": false,
|
||||
"init_message": "Say hello world and your name"
|
||||
|
||||
}
|
|
@ -6,7 +6,7 @@ import { initBot } from '../utils/mcdata.js';
|
|||
import { containsCommand, commandExists, executeCommand, truncCommandMessage } from './commands/index.js';
|
||||
import { NPCContoller } from './npc/controller.js';
|
||||
import { MemoryBank } from './memory_bank.js';
|
||||
import settings from '../settings.js';
|
||||
import settings from '../../settings.js';
|
||||
|
||||
|
||||
export class Agent {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as skills from '../library/skills.js';
|
||||
import settings from '../../settings.js';
|
||||
import settings from '../../../settings.js';
|
||||
|
||||
function wrapExecution(func, timeout=-1, resume_name=null) {
|
||||
return async function (agent, ...args) {
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
import { readFileSync } from 'fs';
|
||||
export default JSON.parse(readFileSync('./settings.json', 'utf8'));
|
|
@ -1,5 +1,5 @@
|
|||
import minecraftData from 'minecraft-data';
|
||||
import settings from '../settings.js';
|
||||
import settings from '../../settings.js';
|
||||
import { createBot } from 'mineflayer';
|
||||
import { pathfinder } from 'mineflayer-pathfinder';
|
||||
import { plugin as pvp } from 'mineflayer-pvp';
|
||||
|
|
Loading…
Add table
Reference in a new issue