This only happens when firework rockets are generated via command with no NBT data other than a custom display or name (meaning no decoration). When the stack is split in some way and one of the smaller stacks is used, that second stack loses the ability to stack with the unused set. This includes use when launched, used with an elytra, and shot out of a dispenser. When an additional stack is used, it can combine with the other used stack again.
Further inspection with advanced tooltips shows that the number of NBT tags changes from 1 to 2, and an even closer look reveals that "Fireworks": {} is added to the NBT after a stack is used.
The attached video shows this in detail (poor quality to fit under the 10MB limit).
Attachments
Comments 5
Confirmed in 1.20.3 pre 2
Also here is the updated command that works
/give @p minecraft:firework_rocket{display:{Name:'{"text":"Bug Report","color":"red"}'}} 16
When the player uses the firework rocket item, the game adds an empty "Firework {}" tag to the item stack, leading to the inability to stack.
Here, the first item is one which was not used, and the second was.
The source seems to be 'appendTooltip()' inside FireworkRocketItem (MCP 1.20.2) where the game tries to append the "Firework {Flight: [x]}" tag, but since the rocket does not have a flight duration the tag is just left empty.
@Override
public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context) {
NbtCompound nbtCompound = stack.getSubNbt("Fireworks");
if (nbtCompound != null) {
if (nbtCompound.contains("Flight", NbtElement.NUMBER_TYPE)) {
tooltip.add(
Text.translatable("item.minecraft.firework_rocket.flight")
.append(ScreenTexts.SPACE)
.append(String.valueOf(nbtCompound.getByte("Flight")))
.formatted(Formatting.GRAY)
);
}
. . .
}
}
⚠️ Please do not mark Unreleased Versions as affected. You don't have access to them yet.
-- I am a bot. This action was performed automatically! If you think it was incorrect, please notify us on Discord or Reddit