mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-07-31 20:35:31 +02:00
pause item collecting after giving item
This commit is contained in:
parent
d265409c55
commit
5cfe794d5f
1 changed files with 4 additions and 0 deletions
|
@ -150,7 +150,11 @@ export const actionsList = [
|
||||||
'num': { type: 'int', description: 'The number of items to give.', domain: [1, Number.MAX_SAFE_INTEGER] }
|
'num': { type: 'int', description: 'The number of items to give.', domain: [1, Number.MAX_SAFE_INTEGER] }
|
||||||
},
|
},
|
||||||
perform: runAsAction(async (agent, player_name, item_name, num) => {
|
perform: runAsAction(async (agent, player_name, item_name, num) => {
|
||||||
|
const modes = agent.bot.modes;
|
||||||
|
modes.pause('item_collecting');
|
||||||
await skills.giveToPlayer(agent.bot, item_name, player_name, num);
|
await skills.giveToPlayer(agent.bot, item_name, player_name, num);
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 3000));
|
||||||
|
modes.unpause('item_collecting');
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue