mojira.dev
MC-280181

Villagers cannot have items with certain components removed within their buyB slot

Villagers can't use their "B" buy slot to buy items with components removed. I tested it with the removal of "minecraft:food" and "minecraft:consumable". Affects both Singleplayer and Multiplayer.

In Singleplayer, nothing shows up in the console, however in Multiplayer, a warning shows up, that reads: [23:50:02 WARN]: Failed to load offers: Not a valid resource location: !minecraft:consumable Non [a-z0-9_.-] character in namespace of location: !minecraft:consumable; Not a valid resource location: !minecraft:consumable Non [a-z0-9_.-] character in namespace of location: !minecraft:consumable; Not a valid resource location: !minecraft:food Non [a-z0-9_.-] character in namespace of location: !minecraft:food; Not a valid resource location: !minecraft:food Non [a-z0-9_.-] character in namespace of location: !minecraft:food missed input: {"!minecraft:consumable":{},"!minecraft:food":{}}

Steps to Reproduce:
1. Spawn Villager with a spawn egg and give it a workstation. If spawned using /summon, add it a trade by using this command:
/data modify entity @n[type=villager] Offers.Recipes append value {buy:{id:"minecraft:stone"},sell:{id:"minecraft:stone"}}
2. Run this command: /give @s baked_potato[!minecraft:food,!minecraft:consumable]
3. Holding the baked potato in your main hand, run this command: /data modify entity @n[type=villager] Offers.Recipes[0].buyB set from entity @s SelectedItem

Expected behavior: The item in question shows up on the buyB slot.
Observed behavior: The buyB slot is empty. Additionally, server console in Multiplayer throws out the aforementioned warning message.

Linked issues

Comments 3

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

That ticket has already been resolved as invalid. Please take a look at the parent ticket (MC-274451) and see if an explanation is provided there in the description of the ticket or in the comments for why this issue is invalid.

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

From what I see, the parent ticket is certainly related, as it mentions the primary villager buy slot, but doesn't show the same issue. The primary slot works perfectly, but the secondary doesn't.

The primary slot also does not support removing components, only the sell slot does.

AnalogMC

(Unassigned)

Unconfirmed

(Unassigned)

1.21.4

Retrieved