When playing on a world with cheats enabled, turning on KeepInventory then changing the difficulty to Normal or Hard turns KeepInventory off.
When playing on a world with cheats enabled, turning off KeepInventory then changing the difficulty for Easy or Peaceful turns KeepInventory on.
When playing on a world with cheats disabled, changing the difficulty form Hard or Normal to Easy or Peaceful does not turn on KeepInventory.
Comments 13
I can corroborate @RWRmrfrog's report.
Server version is Linux bedrock server 1.21.50.
Every time the server is restarted keepinventory is set to false, regardless of difficulty setting. I tried it on both normal (which is the bug behavior my children observed) and I also tried setting it to Easy based on the release note which stated:
Players will keep their inventory after dying on Easy and Peaceful as we're testing ways to adapt our difficulty levels.
It would make some sense that the new keepinventory logic checks difficulty and sets state based on that at server start, but that seems to not be the case - otherwise, starting the server in Easy mode would set it to true. Further, even if you set it to true while in Easy mode, it still resets to false on server restart.
This appears to be a broader issue of keepinventory not persisting regardless of difficulty setting.
I can corroborate @RWRmrfrog's report.
Server version is Linux bedrock server 1.21.50.
Every time the server is restarted keepinventory is set to false, regardless of difficulty setting. I tried it on both normal (which is the bug behavior my children observed) and I also tried setting it to Easy based on the release note which stated:
Players will keep their inventory after dying on Easy and Peaceful as we're testing ways to adapt our difficulty levels.
It would make some sense that the new keepinventory logic checks difficulty and sets state based on that at server start, but that seems to not be the case - otherwise, starting the server in Easy mode would set it to true. Further, even if you set it to true while in Easy mode, it still resets to false on server restart.
This appears to be a broader issue of keepinventory not persisting regardless of difficulty setting.
@KR_ - if it is intentional that keepinventory turns on and off in a world with cheats enabled when selecting Easy/Peaceful, then why does it report off? Specifically:
Stop server
Set world difficulty to Easy
Start server
At console, do `/gamerule keepinventory`
Console reports `false`.
This would suggest that it is not on, regardless of the difficulty setting.
It also doesn't persist when you bounce the server.
@KR_ - if it is intentional that keepinventory turns on and off in a world with cheats enabled when selecting Easy/Peaceful, then why does it report off? Specifically:
Stop server
Set world difficulty to Easy
Start server
At console, do `/gamerule keepinventory`
Console reports `false`.
This would suggest that it is not on, regardless of the difficulty setting.
It also doesn't persist when you bounce the server.
I do agree that this can be an inconvenience and frustrating to deal with, especially if you want to continually switch between difficulties without having to toggle keepinventory back on/off, so maybe that part is an oversight.
But, given how it's currently coded, it does make sense why it works this way. According to the feedback website, changing the difficulty will either enable or disable the option. Since keepinventory is considered a cheat (in the sense that it can be toggled), and you have cheats enabled, switching between difficulties will allow you to toggle the keepinventory option. It's why MCPE-187500 was resolved as WAI. Since cheats aren't enabled, and keepinventory is considering a cheat, switching difficulties will disable it, meaning that it cannot be re-enabled after.
Also, the comments left by RWRmrfrog and mattcaron about the keepinventory rule not keeping toggled on BDS appears to describe a separate issue.
Fair point. Created MCPE-189071.
Fair point. Created MCPE-189071.
I am having a similar issue, on my minecraft bedrock dedicated server the world is on hard mode and I have turned keep inventory on. Everytime I start the server keep inventory is turned off again.