mojira.dev
MC-256994

Pick Block on a banner or creating a banner with loom produces an item with different nbt than when it is mined

Pick block on a banner gives an item with id tag in BlockEntityTag in its nbt data. Creating a banner with the loom also give a banner with id tag in BlockEntityTag in its nbt data. Mining the banner gives an item without the id tag in BlockEntityTag in its nbt data. This results in two stacks of the effectively same banner when picking block on a banner while you have the banner in your inventory.

Code Analysis

The loot table of banners only copy the patterns tag

[media]

while pick block uses

BlockItem.setBlockEntityNbt()
[media]

which adds the id tag to BlockEntityTag

Suggested Fix

Add

{
    "op": "replace",
    "source": "id",
    "target": "BlockEntityTag.id"
},

to "ops" as seen here

[media]

Linked issues

Attachments

Comments

ampolive

Thank you for your report!
We're tracking this issue in MC-251509, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Kevinthegreat

(Unassigned)

Unconfirmed

(Unassigned)

1.19.2

Retrieved