mojira.dev
MC-229441

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

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 @unknown)

  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:

[media]

&

[media]

Linked issues

Attachments

Comments 8

I can confirm that this occurs in 1.17.1 prerelease 1, but I suspect that this is intended. Here are some more detailed reproduction steps for anyone else that wants to test this.
Fast way to reproduce

  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:

[media]

&

[media]

I don't think so. Villagers are humans. We do not kill any humans to earn.

It causes costless trading.

I don't think it's confirmed that villagers are humans; and evokers seem to be the same species and have a very special drop. Nonetheless I am quite certain this is a bug and I might do some investigating into when this first came about.

Confirmed. The armor seems to have varying durabilty.

Is it a bug? I mean you can do this in real life and they'll drop the item when you kill them. haha. May add a chance they'll try to kill you for your items?

It is certain that these villagers will not drop anything at ordinary times, and they should not be robbed during trading, which is unreasonable

Yes, it's a bug. It was resolved as fixed with 1.17.1's second pre-release on Tuesday.

user-d1c12

boq

Confirmed

Important

Entities, Trading

1.17, 1.17.1 Pre-release 1

1.17.1 Pre-release 2

Retrieved