How to turn on "keep inventory" in Minecraft Java?

Items falling in lava after death (Image via Minecraft)
Items falling in lava after death (Image via Mojang Studios)

Minecraft is a game deeply tied to resource gathering, at least for those playing survival or hardcore instead of creative mode, which features unlimited resources from the creative inventory. For those with cheats enabled, there are endless possibilities for customizing the different options and rules applied to the game.

One of the options available to players wanting a more laid-back Minecraft experience is to keep inventory true.


What does "keep inventory" do in Minecraft?

A player with an inventory they would not want to lose (Image via Mojang Studios)
A player with an inventory they would not want to lose (Image via Mojang Studios)

It is an in-game command that, as the name suggests, lets players keep their inventory after dying. Normally, in Minecraft, when a player dies, their items are scattered on the floor in a circle from the death location. After some time has passed, 6000 in-game ticks or precisely five minutes, the items on the floor despawn.

It is worth noting that this is five minutes of loaded time. This means the timer will not start until the player gets close enough to the location of their death to load the chunks. Once the chunks are loaded, the item’s despawn timer begins.

Keep inventory is a game setting that is not always available in the menu. To edit or change the settings, players will need to play on a world with cheats enabled. Keep inventory is toggleable via console commands and is thus considered a "cheat" by the game.


How to activate "keep inventory"

A player using the setting "keep inventory" true (Image via Mojang Studio)
A player using the setting "keep inventory" true (Image via Mojang Studio)

Thankfully, the command used to turn to keep inventory on is quite simple. Players will need to either open the chat and then enter a forward slash or hit the forward slash button, which will open up the chat with the slash input.

From here, players must type “gamerule” without the quotes. This command function will tell the game that the player is looking to edit one of the rules for the world. Then, add a space and type “keep inventory” without quotes, followed by a space, and then “true” without quotes, as shown below.

/gamerule keepInventory true

This will tell the game to retain "keep inventory." However, the world also needs to allow this feature to be used. Other gamerules are doFireTick, which controls fire, and mob griefing, which controls mobs like creepers and enderman destroying or moving blocks.


Why players might want to "keep inventory"

youtube-cover

Very few aspects of Minecraft are as frustrating as dying near a source of fire or while mining near a lava pool and losing all items. The "keep inventory" game rule can mitigate this frustration, as players will not drop their items on death. This is a major time saver.

This option is great for newer players who don't want to be bogged down by item collection or veteran players chasing other goals.

Quick Links