The bug
I’ve noticed there are two ‘types’ of patterned banner that are unable to stack with each other. The first ‘type’ of patterned banner is a banner that has never been placed down before and has only existed in item form. The other ‘type’ of patterned banner is a banner that has been placed down and broken, even if they were previously stacked, they would now be unable to stack.
To reproduce
Make 2 identical banners (pattern doesn’t matter as long as they are identical), then place one of the banners down. When broken, the banner that has been placed is unable to stack with the other banner, they are only able to stack once you have placed down and broken the other banner too.
This works for any banner pattern.
This does not work for blank banners.
This has existed since 1.8 and is still happening in 1.18.2
Cause
From MC-256342: The banner, when mined, loses its BlockEntityTag
"minecraft:banner" id, causing the NBTs of the items to no longer be identical and thus no longer stack.
Code analysis
Code analysis by @unknown can be found in duplicate MC-256994.
Related issues
is duplicated by
relates to
Attachments
Comments


Are you checking ominous banners by any chance? (MC-151793)

@Dhranios
no, the bugs are very similar but with the ominous banner glitch the reason they don't stack is because the ones broken from the ground display their patterns whilst the ones from captains don't. in my report the banners look identical even after one is broken and picked up from the ground but won’t stack.
btw I was using normal banners.

I was unable to reproduce this in 1.19.2. Can you please provide a video with your debug screen enabled (F3). If the video is to big please upload it onto YouTube as unlisted and post the link here

I was able to reproduce this issue.

Seems to have been fixed in 24w09a.