PrismarineJS / mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/mineflayer/
MIT License
5.14k stars 927 forks source link

Fix window.deposit requiring item.count #3460

Closed Pix3lPirat3 closed 1 week ago

Pix3lPirat3 commented 2 months ago

Patches window.deposit throwing an error if "count" arg is undefined, figured this out with WhoTho since you should be able to only specify window.deposit(item.type), as the other args can be "null", however as WhoTho pointed out--

undefined == null but undefined !== null

rom1504 commented 2 weeks ago

No let's not use == null, it includes too many cases

Let's use === undefined || === null