mojira.dev
MC-129057

The recipe book doesn't move ingredients that have NBT data

Since the beginning of version 1.12 and the introduction of the Recipe Book, there is a bug related to this book that prevents ingredients containing NBT data from being automatically transferred to the crafting grid when clicking on a book.
The following video shows the bug with leather containing a compound tag :
https://streamable.com/x2t23
The recipes are normally not sensitive to NBT data, which allows the recipe but prevents adding the ingredients.
The error is only server side and related to a player inventory method that is only used for the recipe book.
Related MCP Mappings :

PlayerInventory.findSlotMatchingUnusedItem(ItemStack p_194014_1_)
ServerRecipeBookHelper.func_194325_a(Slot p_194325_1_, ItemStack p_194325_2_)

Affected method: net.minecraft.world.entity.player.Inventory.findSlotMatchingUnusedItem(ItemStack) (Mojang name)
The check Inventory.isSameItem(ItemStack, ItemStack) makes all subsequent checks irrelevant.

Linked issues

MC-128863 Water bottle does not get transfered from inventory when a custom recipe is selected from in game recipie book. MC-175400 Dispenser recipe in recipe book crafts a dropper instead of a dispenser MC-176837 Dispenser glitches in recipe book MC-178671 gridstone fishing pole cannot craft warped fungus on a stick MC-195000 Click a Dispenser from the recipe book, but get a Dropper MC-231862 When Crafting a Dispenser Using the Recipe Book, the Recipe Dispenses Droppers, rather than Dropping Dispensers MC-233923 Crafting MC-239825 Recipe book will not show warped fungus / carrot on a stick as craftable if fishing rod has any durability damage, even though you can craft them. MC-240772 If two bows are damaged and combined to full health you can use the recipe for a dispenser in a crafting table, but as soon as you click it, it automatically changes the dropper recipe and crafts a dropper MC-255426 The Recipe book doesnt move ingredients that have NBT data for shaped recipes. MC-255678 The Recipe book doesnt move ingredients that have NBT data for shaped recipes. MC-260525 Crafting book doesn't take into account the bow's durability for dispenser crafting MC-267766 Weird behaviours from the recipe guide book when renaming item names or using custom model data. MC-270494 Items with modified components can be used in recipes, but won't jump to the crafting UI when clicked in the recipe book MC-270788 Recipe book does not move items to crafting table if recipes with item components exist. MC-272498 Recipe book broken with item components

Comments

user-f2760

Sorry, but bug reports are only accepted in English.

Corail

I'll edit it np 🙂

tryashtar
Corail

Yes, i just help you to identify the trouble but it looks the same bug 🙂

pokechu22

And also MC-116905 – I think that's why the game explicitly ignores NBT, to avoid using enchanted items.

Corail

no this method checks nbt & enchant & damage, so it just needs to remove the nbt check

// MCP
if (!((ItemStack)this.mainInventory.get(i)).isEmpty() && this.stackEqualExact(p_194014_1_, this.mainInventory.get(i)) && !((ItemStack)this.mainInventory.get(i)).isItemDamaged() && !itemstack.isItemEnchanted() && !itemstack.hasDisplayName())
pine1needle

Perhaps a better title for this report would be "The recipe book doesn't move ingredients that have NBT tags".

pokechu22

Thanks, changed (minus the RAS syndrome 🙂)

pulpetti

In 20w29a.

j_p_smith

Related to MC-153160 - same issue but with trading instead of crafting.

SpicyChicken24

This does not work as intended, fix your game

user-f2760

Nothing to fix, this is by design. This place is not a place to spread your opinions, but to report issues and get them fixed. This is not a bug.

SpicyChicken24

@Dhranios this is not by design, i will say the same to you, i dont care what you think, its a bug and this is not the place to spread your opinion either. Please refer to MC-153160 where it is a widespread bug that affects everything using AUTO crafting with NBT. Please do your research before you speak.

user-f2760

It was resolved as Works As Intended by Mojang themselves, that means it is by design. That's a non-debatable fact.

Villagers and crafting are entirely different things. Additionally, that report has not been triaged by Mojang and can still get resolved as intended by them. A non-triaged report does not mean it is a bug.

bingusboy20

This may be working as intended, but the side-effect of it may not be. It doesn't make sense to have a recipe book that doesn't allow you to auto-fill the dispenser recipe (the reason I came to see if there was a bug report). I doubt Mojang intentionally made it where you couldn't auto-complete the dispenser recipe.

Not allowing ingredients with NBT data is likely intentional, but breaking certain auto-complete recipes almost certainly is not.

I would start a separate issue about that, but all of them are resolved as duplicates of this, despite them being different.

KangoMPK

Is this going to be fixed or not?

user-f2760

Resolution:Works As Intended

[Mod] Jingy

The issue MC-269738 and it's status as triaged may be relevant to this issue.

Corail

(Unassigned)

Confirmed

Crafting, UI

Minecraft 1.12.2, 1.15.1 Pre-release 1, 20w12a, 20w13b, 20w15a, 20w17a, 1.16.1, 1.16.2, 1.17.1

Retrieved