mojira.dev
MC-269586

Crafter does not save its name when mined

Crafter does not save it's name when mined.

Chest saves it's name when mined
Dispenser saves it's name when mined
etc

Crafter has NBT that allows save name when mined like other container blocks

Attachments

Comments 7

Thank you for your report!
We're tracking this issue in MC-209, 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 (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

@unknown, this is not a duplicate. MC-174496 was not a duplicate of it either. MC-209 is about blocks without NBT data losing their name. The crafter actually has NBT data, therefore making this not a duplicate of it just like MC-174496.

Added loot table file where fixed this issue.

crafter.json

⚠️ Please do not add Affected Versions to resolved reports.

Have a look at the Resolution and the comments to see why this ticket has been resolved. If you think this ticket has been resolved erroneously you can contact the Mojira staff on Discord or Reddit.

-- I am a bot. This action was performed automatically! If you think it was incorrect, please notify us on Discord or Reddit

This can't be a Duplicate of MC-209 because in this Case the Crafter Block has same behavior with Custom Names like Dispensers or Droppers.

[media]

Also this Bug still exists in 24w21b.

Code analysis (Yarn mappings)

In the data generator for block loot tables (the VanillaBlockLootTableGenerator class), the loot table for the crafter is generated with the following line:

this.addDrop(Blocks.CRAFTER);

However, since the crafter is a nameable container (having a block entity with a LockableContainerBlockEntity superclass), the crafter should instead be specified with the following line, matching other nameable containers:

this.addDrop(Blocks.CRAFTER, block -> this.nameableContainerDrops(block));

Easiest steps to reproduce:
0. Be on any of those Affected Versions,
1. Get any Crafter Block,
2. Rename it in Anvil,
3. Place that Block,
4. Break it!

SilentPaltos

(Unassigned)

Community Consensus

Platform

Normal

Loot tables

crafter, loot-table

24w11a, 24w21b, 1.21 Pre-Release 4, 1.21, 1.21 Release Candidate 1, 1.21.4

Retrieved