From 3c5800f0dc30b4ff2ad683748d0ae481611c84c0 Mon Sep 17 00:00:00 2001 From: BF5258 <@gmail.com> Date: Wed, 16 Oct 2024 17:32:28 +1000 Subject: [PATCH 1/2] Fixed placeHere and attack. --- src/agent/commands/actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agent/commands/actions.js b/src/agent/commands/actions.js index 0e87c78..be86314 100644 --- a/src/agent/commands/actions.js +++ b/src/agent/commands/actions.js @@ -257,7 +257,7 @@ export const actionsList = [ { name: '!placeHere', description: 'Place a given block in the current location. Do NOT use to build structures, only use for single blocks/torches.', - params: {type: 'string', description: 'The block type to place.'}, + params: {'type': { type: 'string', description: 'The block type to place.' }}, perform: wrapExecution(async (agent, type) => { let pos = agent.bot.entity.position; await skills.placeBlock(agent.bot, type, pos.x, pos.y, pos.z); @@ -266,7 +266,7 @@ export const actionsList = [ { name: '!attack', description: 'Attack and kill the nearest entity of a given type.', - params: {'type': 'string', description: 'The type of entity to attack.'}, + params: {'type': { type: 'string', description: 'The type of entity to attack.'}}, perform: wrapExecution(async (agent, type) => { await skills.attackNearest(agent.bot, type, true); }) From 93780792e6a8a2bb6bb397d98e69681743153eaf Mon Sep 17 00:00:00 2001 From: BF5258 <@gmail.com> Date: Wed, 16 Oct 2024 17:38:59 +1000 Subject: [PATCH 2/2] Changed 'string' to 'ItemName' and 'BlockName' --- src/agent/commands/actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agent/commands/actions.js b/src/agent/commands/actions.js index be86314..92eb68b 100644 --- a/src/agent/commands/actions.js +++ b/src/agent/commands/actions.js @@ -238,7 +238,7 @@ export const actionsList = [ name: '!smeltItem', description: 'Smelt the given item the given number of times.', params: { - 'item_name': { type: 'string', description: 'The name of the input item to smelt.' }, + 'item_name': { type: 'ItemName', description: 'The name of the input item to smelt.' }, 'num': { type: 'int', description: 'The number of times to smelt the item.', domain: [1, Number.MAX_SAFE_INTEGER] } }, perform: async function (agent, item_name, num) { @@ -257,7 +257,7 @@ export const actionsList = [ { name: '!placeHere', description: 'Place a given block in the current location. Do NOT use to build structures, only use for single blocks/torches.', - params: {'type': { type: 'string', description: 'The block type to place.' }}, + params: {'type': { type: 'BlockName', description: 'The block type to place.' }}, perform: wrapExecution(async (agent, type) => { let pos = agent.bot.entity.position; await skills.placeBlock(agent.bot, type, pos.x, pos.y, pos.z);