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

Killing a villager while it offers a Totem of Undying uses the totem and removes it from its hand

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.6, 24w18a, 24w19b, 24w20a, 24w21b, 1.21 Pre-Release 1, 1.21 Pre-Release 2, 1.21 Pre-Release 3, 1.21 Pre-Release 4, 1.21 Release Candidate 1, 1.21, 24w33a, 1.21.1 Release Candidate 1, 1.21.1, 24w34a, 24w35a, 24w36a, 24w37a, 24w38a, 24w39a, 24w40a, 1.21.2 Pre-Release 1, 1.21.2 Pre-Release 2, 1.21.2 Pre-Release 3, 1.21.2 Pre-Release 4, 1.21.2 Pre-Release 5, 1.21.2 Release Candidate 1, 1.21.2 Release Candidate 2, 1.21.2, 24w44a, 1.21.3, 24w45a, 24w46a, 1.21.4 Pre-Release 1
    • Confirmed
    • 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 away from the player/loses focus on them.

      Steps to Reproduce

      1. Place a command block and a lever next to it, and in the command block, paste in the command:
        /summon minecraft:villager ~ ~1 ~ {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:1.0f}
      2. 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.
      3. Punch the villager while holding the emerald in your main hand.

      Observed Results

      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 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.

      Expected Results

      The villager does not consume/use a totem if offering/holding one or immediately shows the totem in its hand again.

      Additional Notes

      Related to MC-255829.

            Unassigned Unassigned
            Viradex Viradex
            Votes:
            5 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              CHK: