mojira.dev
MC-234511

After dying, items inside of a temporary GUI slot will be dropped even with the keepInventory gamerule enabled

When the player dies, they will drop items that were put inside of a 'temporary' GUI slot (not a chest, furnace, brewing stand, etc) despite the fact that they are still within the player's inventory at the time, and not permenantly stored inside of a container.

This issue applies for the following block GUI's:

[media]

Steps to Reproduce:

Enable keepInventory gamerule before either test

On LAN:

  1. Player 1 open a container

  2. Player 1 should set an item into a "temporary" holding slot

  3. Player 2 must kill Player 1

Singleplayer

  1. Set up an 8 block long water stream leading into a pressure plate

  2. Place a command block next to the pressure plate (must be activated upon stepping on pressure plate) and use the following command:

    /kill @s
  3. Place one of the listed blocks above in the image near the end of the water stream

  4. Walk into water stream with an item in your inventory

  5. When possible, open the respective block's GUI and insert an item into one of the applicable slots (do not close the GUI)

  6. Observe behavior

Set-up should look something like this:

[media]

Observed Results:

The player will drop the items that were inserted into the block.

Expected Results:

The items would not drop from the players inventory, and would instead be returned if enough space is available.

Linked issues

Attachments

Comments 6

This isn't an issue. They aren't in your inventory anymore they are in a separate container i.e the crafting table so keepinventory wouldn't apply to those containers.

Crafting tables aren't containers, they don't hold any items. Any items you place in the crafting table interface, as far as I'm aware, are technically still in the players inventory and thus (in my opinion) should be saved if keepInventory is true.

Can confirm in 1.19.4 pre-3

This behavior is not exclusive to the crafting bench, it applies to all of the following blocks:

[media]

Can confirm in 1.20.1

Requesting ownership of this issue as original issue poster has been innactive for two years, and post should be updated to reflect other containers this issue affects

Plixo

[Mod] Jingy

(Unassigned)

Community Consensus

Gameplay

Normal

Inventory, Player

gamerule, keepinventory

1.17.1, 1.19.4 Pre-release 3, 1.20.1, 23w31a, 1.20.2 Pre-release 2, ..., 1.20.3 Pre-Release 4, 1.20.4, 23w51b, 24w07a, 1.20.5

Retrieved