mojira.dev
MC-306146

Count of 1 is no longer serialized for items in certain components

The count field of items always used to serialize even when count is 1. This was mentioned as an intended feature during the 1.20.5 cycle as a useful feature to always be able to read the item count with the data command. In 1.20.5 - 1.21.11, this applied to items no matter where they are. In 26.1-snapshot-5, this no longer applies to items in certain components like container, bundle_contents, and use_remainder.

Expected behavior:

Using the data command, items should serialize the same way whether or not they are stored within a component.

Steps to reproduce:

Place one item in a shulker, pick it up, and run β€œ/data get entity @s SelectedItem”

In 1.21.11 and earlier, the result will be: ⁨{components: {"minecraft:container": [{item: {count: 1, id: "minecraft:stone"}, slot: 0}]}, count: 1, id: "minecraft:shulker_box"}

In 26.1-snapshot-5, the result will be: ⁨{components: {"minecraft:container": [{item: {id: "minecraft:stone"}, slot: 0}]}, count: 1, id: "minecraft:shulker_box"}

Linked issues

Comments 2

Thank you for your report!
After consideration, the issue is being closed as Won't Fix.

Please note that this is not the same as Working as Intended, as this bug report correctly describes behavior in the game that might not be the intended or desirable behavior, but it will not be fixed right now. Sometimes, this is because the issue reported is minor and/or impossible to change without large architectural changes to the code base.

Quick Links:
πŸ““ Bug Tracker Guidelines – πŸ’¬ Community Support – πŸ“§ Mojang Support (Technical Issues) – πŸ“§ Microsoft Support (Account Issues)
πŸ““ Project Summary – ✍️ Feedback and Suggestions – πŸ“– Game Wiki

42Richtofen42

(Unassigned)

Confirmed

(Unassigned)

26.1 Snapshot 5

Retrieved