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

You can steal the item a villager is holding for trade by killing it

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.17.1 Pre-release 2
    • 1.17, 1.17.1 Pre-release 1
    • None
    • Confirmed
    • Entities, Trading
    • Important

      If you hold a selling item (e.g emerald) villager will shown the items when you kill it with hold the item it have a change to drop the holding item.

      Im using emerald that enchanting sharpness 100 and looting 100 to test this.

      Villagers do not drop their inventory items so villagers also should not drop the holding items.

      Steps to Reproduce: (from pine1needle)

      1. /give @p minecraft:emerald{Enchantments:[{lvl:255s,id:"minecraft:looting"},{lvl:255s,id:"minecraft:sharpness"}]}
        
      2. /time set day
        
      3. Put a blast furnace on the ground for the villager to use as a work station.
      4. /summon minecraft:villager
        
      5. Wait for the villager to take the blast furnace as a work station.
      6. Hold the emerald in your main-hand and wait for the villager to start holding a piece of iron armor (as a trade offer).
      7. Punch the villager with the emerald. Observe that the iron armor drops as an item when the villager dies. (The iron armor is also partially damaged.)

      It's also possible for this to occur in a normal survival world, but it would have to be the correct time of day and the villager would have to have such low health that the player can kill the villager with a single punch. Theoretically, this means that a player could build an AFKable enchanted book (& bookshelf) farm by having a villager breeder send villagers to a machine that hurts the villagers, and then sends the villagers to a chamber where there's a lectern and the player can punch the villager with an emerald. However, the farm would be extremely slow because it would only function during part of the day, villagers only have an 8.5% chance to drop their held item, and the speed of the farm would be limited by the speed of the villager breeder. It would probably be much more efficient to just directly trade for the enchanted books.

      Here is a proof-of-concept video and test world for the farm: villager drops enchanted book.mp4 & MC-229441 Test World.zip

        1. 2021-06-18_12.55.22.png
          715 kB
          user-d1c12
        2. 2021-06-18_12.55.31.png
          996 kB
          user-d1c12
        3. villager drops enchanted book.mp4
          2.67 MB
          [Helper] pine1needle

            boq [Mojang] Bartosz Bok
            jirauser623306 user-d1c12 (Inactive)
            Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: