Affects Version/s: 1.17, 1.17.1 Pre-release 1
Fix Version/s: 1.17.1 Pre-release 2
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)
- Put a blast furnace on the ground for the villager to use as a work station.
- Wait for the villager to take the blast furnace as a work station.
- Hold the emerald in your main-hand and wait for the villager to start holding a piece of iron armor (as a trade offer).
- 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.