Skip to content

Comments

Implement optional direction vector to activateItem#3695

Open
Sheepy3 wants to merge 12 commits intoPrismarineJS:masterfrom
Sheepy3:master
Open

Implement optional direction vector to activateItem#3695
Sheepy3 wants to merge 12 commits intoPrismarineJS:masterfrom
Sheepy3:master

Conversation

@Sheepy3
Copy link

@Sheepy3 Sheepy3 commented Jul 7, 2025

implements optional vector parameter into activateItem, as per issue #3621. allows for providing direction vector when bot is performing actions like throwing potions.

Copy link
Contributor

@Omena0 Omena0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the linting errors. Otherwise this looks great, I've been looking forward to this feature for a while so i can automatically mend the bot's armor when durability is low.

@Omena0
Copy link
Contributor

Omena0 commented Aug 7, 2025

Tests don't seem to pass, might be unrelated as I don't see how this PR changes could cause this.

Error seems to be:

Error: Don't know how to get the enchants from an item on this mc version
    at get enchants (/home/runner/work/mineflayer/mineflayer/node_modules/prismarine-item/index.js:262:13)
    at EventEmitter.digTime (/home/runner/work/mineflayer/mineflayer/lib/plugins/digging.js:234:40)
    at EventEmitter.dig (/home/runner/work/mineflayer/mineflayer/lib/plugins/digging.js:27:26)
    at dig (/home/runner/work/mineflayer/mineflayer/examples/digger.js:68:19)
    at EventEmitter.<anonymous> (/home/runner/work/mineflayer/mineflayer/examples/digger.js:39:7)
    at EventEmitter.emit (node:events:518:28)
    at EventEmitter.<anonymous> (/home/runner/work/mineflayer/mineflayer/lib/plugins/chat.js:85:13)
    at EventEmitter.emit (node:events:518:28)
    at Client.<anonymous> (/home/runner/work/mineflayer/mineflayer/lib/plugins/chat.js:131:9)
    at Client.emit (node:events:518:28)

@extremeheat
Copy link
Member

Can you update the type def?

@Sheepy3
Copy link
Author

Sheepy3 commented Dec 26, 2025

forgive me @extremeheat, but what do you mean?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants