mojira.dev
MC-157484

When the player dies by using an item with the use_remainder component (such as a potion of harming), the remainder item is deleted if keep_inventory is false

  • Short description of the issue

    • When you die using an item with the use_remainder component the result ItemStack its removed when player die before the component can finish convert the item, its more noticed with the “Potion of Harming” what use that component to convert to a simple glass bottle when use.

  • Steps to reproduce the issue in vanilla

    • Vanilla

      • Use poison or reduce your health

      • Consume a Potion of Harming for die

      • Respawn and check items dropped

    • Custom

      • Use

        /give @p potion[use_remainder={id:"minecraft:gunpowder"},potion_contents={potion:strong_harming},potion_duration_scale=3]
      • Die using many of them

      • Respawn and check for the gunpowder dropped

  • Expected result

    • The result item (glass bottle/gunpowder) its added and dropped in death

  • Actual result

    • The result item (glass bottle/gunpowder) its added but removed in respawn and not dropped

Linked issues

Attachments

Comments 11

Steps to reproduce:

  • Give yourself 9 Potions of harming 2

  • /gamemode survival

  • Drink every potion until you die

  • Go back to place where you killed yourself

Notice the total number of bottles (potions of harming 2 and empty bottles) has been decreased to 8

Can confirm for 19w37a

Can confirm in 20w51a.

Can confirm in 21w06a.

Can confirm in 1.16.5 and 21w08b.

1 more comments

Can confirm in 1.18.1.

Can confirm in 1.19.3

Adjusted title again to keep the issue findable in searches

Doc

(Unassigned)

Confirmed

Player

1.14.4, 19w37a, 20w51a, 1.16.5, 21w06a, , 1.21.4, 26.3, 26.4 Snapshot 2, 26.4 Snapshot 3, 26.4 Snapshot 4

Retrieved