Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-111467

Inventory cleared when keepInventory gamerule is switched to false

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • None
    • Minecraft 1.11, Minecraft 16w50a, Minecraft 1.11.2, Minecraft 1.13.1, Minecraft 1.13.2-pre2, Minecraft 1.14, 1.14.4, 1.16.1, 20w30a, 1.16.5
    • None
    • Confirmed
    • (Unassigned)

      What happens: A player dies while the keepInventory gamerule is set to true, and then the gamerule is switched to false by command blocks while the player is on the death screen.

      Bug: As soon as you click the respawn button on the death screen, not only is your inventory completely wiped of all items, but none of them are even dropped on the ground. The items are gone forever.

      Expected outcome: When you hit the respawn button on the death screen, you will respawn with all of your items and experience points since you died when keepInventory was set to true.


      Steps to reproduce:

      Run the following command once:

      /gamerule keepInventory true

      Run the following command once:

      /scoreboard objectives add Deaths stat.deaths

      Place the following command inside an active repeating command block:

      /execute @a[score_Deaths_min=1] ~ ~ ~ /gamerule keepInventory false

      Run the following command once:

      /kill @p

      After dying, all the items in your inventory will be cleared, but none of them will drop on the ground, even though you died while keepInventory was set to true.

      The keepInventory gamerule should be based on the moment the player dies, not the moment they click the respawn button. If this was fixed, it would allow the possibility of command block creations that kill the player, without item or experience loss, in order to get them to their respawn point.

            Unassigned Unassigned
            Haec_Esne_Legas HaecEsneLegas
            Votes:
            11 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: