Skip to content

Commit

Permalink
reduce debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
extremeheat committed Jan 7, 2025
1 parent 1184242 commit 63654c5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/externalTests/plugins/testCommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,14 @@ function inject (bot) {
}
}

// DEBUG
bot._client.on('packet', function (data, meta) {
if (['chunk', 'time', 'light', 'alive'].some(e => meta.name.includes(e))) return
console.log('->', meta.name, JSON.stringify(data)?.slice(0, 100))
})

// you need to be in creative mode for this to work
async function setInventorySlot (targetSlot, item) {
// DEBUG
bot._client.on('packet', function (data, meta) {
console.log(meta.name, JSON.stringify(data)?.slice(0, 100))
})
assert(item === null || item.name !== 'unknown', `item should not be unknown ${JSON.stringify(item)}`)
return bot.creative.setInventorySlot(targetSlot, item)
}
Expand Down

0 comments on commit 63654c5

Please sign in to comment.