mojira.dev
MC-207048

Bundles treat invalid items as valid items, causing them to display an empty slot when an invalid item ID is used to create the bundle

The bug

When creating a bundle using commands and entering an invalid item ID as one of the items, an empty slot is displayed (in addition to the + slot that is always shown when more space is available within a bundle). This is caused by bundles treating invalid items as valid items.

When right clicking this bundle in the inventory, the empty slot is removed. When right clicking this bundle outside of the inventory, a hand animation plays, and the empty slot is removed.

A screenshot can be found below.

How to reproduce

Run the command:

/give @s minecraft:bundle{Items:[{id:"minecraft:glass",Count:1},{id:"minecraft:mojira",Count:1}]}

Screenshot

This screenshot was taken in snapshot 20w48a. Due to some recent changes to bundles, this may not be relevant anymore. I'm planning on getting a new screenshot tomorrow.

[media]

Linked issues

Attachments

Comments 3

Can confirm in 1.18.1.

Can confirm in 1.18.2.

I cannot reproduce this in 1.21.2 pre1. This was probably fixed in 1.20.5 snapshots after the migration to the component system, as now bundle_contents doesn't accept invalid items.

[Mod] markderickson

(Unassigned)

Confirmed

Platform

Low

Commands

bundle

20w48a, 20w49a, 20w51a, 21w03a, 21w05b, ..., 1.19.3, 23w04a, 23w06a, 1.19.4, 23w51b

Retrieved