mojira.dev
MC-297868

Items in the armor.body and saddle slots are not kept when dying while the game rule keepInventory is set to true

Steps to reproduce:

  1. Equip an item into armor.body slot:
    /item replace entity @s armor.body with minecraft:diamond_horse_armor

  2. Equip an item into saddle slot:
    /item replace entity @s saddle with minecraft:saddle

  1. Check if item is in the armor.body and/or saddle slot:
    /data get entity @s equipment.body
    /data get entity @s equipment.saddle

  2. Changing the gamerule keepInventory to True:
    /gamerule keepInventory true

  3. Kill the player:
    /kill @s

Expected Result:
/data get entity @s equipment.body returning item stack, meaning the slot still has the item.
/data get entity @s equipment.saddle returning item stack, meaning the slot still has the item.

Actual Result:
/data get entity @s equipment.body returning fail with the description of: Found no elements matching equipment
The item is also not dropped on death, so it completely vanishes.

/data get entity @s equipment.saddle returning fail with the description of: Found no elements matching equipment
The item is also not dropped on death, so it completely vanishes.

Environment

Newly created world, Survival gamemode, no gamerule changes, Allowed Commands:On

Attachments

Comments 3

The other video was on a Fabric version in case, that is a problem even though it was just optimization mods, here is in the latest snapshot.

[media]

Stop always putting 'Future Update' as an affected version — you don't have access to it.

I wasnt aware that is what it meant, apologies

Efimity

etanaratsastaja

Confirmed

Platform

Normal

Commands

keepinventory

1.21.5, 25w20a

1.21.6 Pre-Release 1

Retrieved