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

Killing a villager while it is offering a Totem of Undying uses the totem and does not display anything in its hand

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 24w18a, 1.20.6, 24w19b, 24w20a
    • Community Consensus
    • Trading
    • Low
    • Platform

      The Bug

      If a villager trades a totem of undying, and the player holds the item used to buy it and kills it while it offers the totem in its main hand, the totem is consumed and revives the villager. However, when continuing to hold the item needed to buy the totem, the totem does not appear in the villager's main hand again (even after switching your offer and trading with the villager), unless the world is reloaded or the villager is unloaded by going out of its simulation distance.

      Jingy has also stated in their comment that the totem can additionally show up again if the villager walks far enough away from the player/loses focus on them.

      It would be expected that the villager does not consume/use a totem if offering/holding one, or immediately shows the totem in its hand again.

      How to Reproduce

      Place a command block and a lever next to it, and in the command block, paste in the command below.

      /summon minecraft:villager ~ ~ ~ {VillagerData: {profession: "minecraft:librarian", level: 2, type: "minecraft:plains"}, Offers: {Recipes: [{maxUses: 12, sell: {count: 1, id: "minecraft:totem_of_undying"}, buy: {count: 1, id: "minecraft:emerald"}, priceMultiplier: 0.05f}]}, Health:20.0f}

      Once the command has been pasted in, flick the lever. A villager should spawn on the top of the command block. Verify that it has the totem of undying trade.

      Run the command below to be able to trigger the totem of undying in one hit:

      /effect give @s minecraft:strength 60 9 true

      Now, while holding emeralds in your main hand, punch the villager. Note how the totem is consumed and disappears from the villager's hand.

      If you try to switch inventory slots from and back to the totem, the villager will not show another totem in its hand. It does not show the totem again even after trading with it. The only ways (I found) to make it show again is to close and re-open the world, or unload the villager and reload it by going out of its simulation distance.

      Additional Notes

      Related to MC-255829 (fixed issue).

            Unassigned Unassigned
            Arnav78 Arnav
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              CHK: