Open sefirosweb opened 2 years ago
I'm having the same problem, but on Paper. bot.rainState appears to work as intended, so you can replace bot.isRaining
on line 80 with bot.rainState > 0
https://github.com/PrismarineJS/mineflayer/blob/9dfa882df4e2e7151c5a7e9c48ba6ec10a4b31f3/lib/plugins/bed.js#L80
the issue is with bot.isRaining, not with the thunderstorm
Versions
Detailed description of a problem
I detected the bot cant sleep well when thunderstorm is active and is spigot server
I saw the variables used in bed, in the funderstorm & isRaining never return true https://github.com/PrismarineJS/mineflayer/blob/9dfa882df4e2e7151c5a7e9c48ba6ec10a4b31f3/lib/plugins/bed.js#L80
This issue only occurs in spigot server as far I know From vanilla servers works perfect,
What did you try yet?
Debug the variables of raining and thunder storm on differents version of server:
Replace code
I saw in bot servers the variable bot.thunderState is positive, maybe can replace to remove "bot.isRaining"
https://github.com/PrismarineJS/mineflayer/blob/9dfa882df4e2e7151c5a7e9c48ba6ec10a4b31f3/lib/plugins/bed.js#L80
Additional context
I think the problems come from packets sent by server and this library is getting, but im not sure how the mineflayer manage the difference packets between different version of server
https://github.com/PrismarineJS/mineflayer/blob/a0befeb042fe3851ac35887da116c2910f505791/lib/plugins/rain.js#L3-L22