Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-280181

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.21.4
    • None
    • Windows 10 Pro 22H2 19045.2965
    • Unconfirmed
    • (Unassigned)

      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.

            Unassigned Unassigned
            AnalogMC AnalogMC
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: