title iconMinecraft Java 1.19 update: How to enable 'keep inventory'?

If you're playing survival or hardcore instead of creative mode, where you can get unlimited resources from the creative inventory, Minecraft is a game deeply tied to resource gathering. It is possible to customize the game's options and rules in the world with cheats enabled. In Minecraft, keeping inventory true can be a good option for players who want a more relaxed experience. When a player dies in Minecraft, their inventory is normally scattered on the floor in a circle from the place of death. As its name suggests, it allows players to keep their inventory after dying. The items on the floor despawn after 6000 in-game ticks or exactly five minutes. The player will not start the despawn timer until they are close enough to the place of their death to load chunks. Upon loading chunks, the despawn timer begins.

Players can toggle Keep Inventory via console commands and are therefore considered cheaters by the game if they are not playing on a world with cheats enabled. Players can turn inventory on by typing a forward slash into the chat, or by pressing the forward slash button, which will open up the chat with the forward slash input. After typing "game rule" without the quotes, players must add a space and type "keep inventory" without quotes. They must then add a space and type "true" without quotes, which will let the game know they want to edit one of the rules for the world. Additionally, other game rules like firestick, which controls fire, and mob griefing, which controls mobs that destroy or move blocks, such as creepers and enderman, need to be enabled for this feature to work.