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 ef8fc45 commit 472a72dCopy full SHA for 472a72d
lib/plugins/inventory.js
@@ -726,6 +726,11 @@ function inject (bot, { hideErrors }) {
726
const window = packet.windowId === 0 ? bot.inventory : bot.currentWindow
727
if (!window || window.id !== packet.windowId) return
728
const newItem = Item.fromNotch(packet.item)
729
+ // very hacky solution. if the server doesnt send the slots in the proper order, then the window will still never emit 'windowOpen'
730
+ if (bot.currentWindow && packet.slot === bot.currentWindow.slots.length - 1) {
731
+ // window is probably ready
732
+ bot.emit(`setWindowItems:${window.id}`)
733
+ }
734
bot._setSlot(packet.slot, newItem, window)
735
})
736
bot._client.on('window_items', (packet) => {
0 commit comments