PrismarineJS / mineflayer

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

bot.sleep({..}) gives error #98

Closed halkeye closed 11 years ago

halkeye commented 11 years ago

Is there a step that needs to be done first before a bot can sleep in a bed?

TypeError: Cannot read property 'id' of undefined at new SlotWriter (/home/halkeye/git/minecraft reporter/node_modules/mineflayer/node_modules/minecraft-protocol/lib/protocol.j s:1024:20) at /home/halkeye/git/minecraft-reporter/node_modules/mineflayer/node_modules/minecraft-protocol/lib/protocol.js:1182:17 at Array.forEach (native) at createPacketBuffer (/home/halkeye/git/minecraft-reporter/node_modules/mineflayer/node_modules/minecraft-protocol/lib/protoc ol.js:1178:10) at Client.write (/home/halkeye/git/minecraft-reporter/node_modules/mineflayer/node_modules/minecraft-protocol/lib/client.js:63 :16) at Bot.bot.sleep (/home/halkeye/git/minecraft-reporter/node_modules/mineflayer/lib/plugins/bed.js:12:16) at Bot. (/home/halkeye/git/minecraft-reporter/index.js:42:7)

andrewrk commented 11 years ago

Thanks for the report. Release 0.0.15 contains the fix.