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:
![]()
Steps to Reproduce:
Enable keepInventory gamerule before either test
On LAN:
- Player 1 open a container
- Player 1 should set an item into a "temporary" holding slot
- Player 2 must kill Player 1
Singleplayer
- Set up an 8 block long water stream leading into a pressure plate
- Place a command block next to the pressure plate (must be activated upon stepping on pressure plate) and use the following command:
/kill @s
- Place one of the listed blocks above in the image near the end of the water stream
- Walk into water stream with an item in your inventory
- When possible, open the respective block's GUI and insert an item into one of the applicable slots (do not close the GUI)
- Observe behavior
Set-up should look something like this:

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.
2021-08-15, 04:42 AM
2024-08-26, 12:44 AM
5
4
-