mojira.dev
MC-306072

The game now crashes when viewing the tooltip of a bundle containing an item stack with incompatible data

This behavior was introduced in 26.1-snapshot-3.

The bug

When viewing the tooltip of a bundle containing an item stack with incompatible data, the game tends to render an empty item stack, causing it to crash with the following error:

The game crashed: rendering screen
Error: java.lang.IllegalStateException: Stack must be non-empty

Steps to reproduce

  1. Create an item stack with incompatible data and put it into a bundle, or create a bundle containing an item stack with incompatible data. This can be done …

    • … with an item stack that has a max_stack_item value different from 1 and also has the max_damage component.

      One way to obtain such an item is to use the following command above a chest containing an item with the max_damage component.

      data modify block ~ ~-1 ~ Items[0].components merge value {"minecraft:max_stack_size":99}
      data modify block ~ ~-1 ~ Items[0].components merge value {"minecraft:max_stack_size":99}
    • … with an item stack that has a count greater than the max_stack_item component.

      One way to obtain such a bundle is to use the following command above a chest containing a bundle with an item with the max_stack_item component less than value.

      data modify block ~ ~-1 ~ Items[0].components."minecraft:bundle_contents"[0].count set value <value>
      data modify block ~ ~-1 ~ Items[0].components."minecraft:bundle_contents"[0].count set value <value>
  2. Hover the mouse cursor over the bundle.

Additional notes

The attached video shows some OBS Studio freezes and a cut between the first crash and opening the world again; neither corresponds to a bug in the game.

Attachments

Comments 2

Thank you for helping us improve Minecraft! We saved your files:

[media]

Reproduced in 26.1-snapshot-5. Upon placing the bundle back into the chest it crashed the game and gave this error:

image-20260130-023636.png

(Sorry for the small video I didn’t fully open the window.)

Aloi

(Unassigned)

Confirmed

(Unassigned)

26.1 Snapshot 5

Retrieved