We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b1d6ea commit a315653Copy full SHA for a315653
1 file changed
lib/plugins/inventory.js
@@ -490,8 +490,7 @@ function inject (bot, { hideErrors }) {
490
}
491
const window = bot.currentWindow || bot.inventory
492
493
- assert.ok(mouseButton === 0 || mouseButton === 1)
494
- assert.strictEqual(mode, 0)
+ assert.ok(mode >= 0 && mode <= 4)
495
const actionId = createActionNumber()
496
497
const click = {
@@ -528,7 +527,8 @@ function inject (bot, { hideErrors }) {
528
527
mouseButton,
529
action: actionId,
530
mode,
531
- item: Item.toNotch(click.item)
+ // protocol expects null even if there is an item at the slot in mode 2 and 4
+ item: Item.toNotch((mode === 2 || mode === 4) ? null : click.item)
532
})
533
} else { // 1.17
534
bot._client.write('window_click', {
0 commit comments