Mojira Archive
MC-3304

Enchantments from items held in the main hand are applied to other items when entities are killed

The Bug:

Enchantments from items held in the main hand are applied to other items when entities are killed.

Steps to Reproduce:

  1. Summon a husk, hold a bow in your offhand, and a sword enchanted with a high level of looting in your main hand, by using the commands provided below.
    /summon minecraft:husk ~ ~ ~ {NoAI:1b}
    /item replace entity @s weapon.offhand with minecraft:bow
    /item replace entity @s weapon.mainhand with minecraft:diamond_sword[enchantments={levels:{"minecraft:looting":100}}]
  2. Shoot and kill the husk using the bow.
  3. Look if the looting enchantment on the sword affected the number of items that the husk dropped.
  4. Take note as to whether or not enchantments from items held in the main hand are applied to other items when entities are killed.

Observed Behavior:

Enchantments are applied to other items when entities are killed.

Expected Behavior:

Enchantments would not be applied to other items when entities are killed.

Potential Fix:

A potential fix by Chumbanotz can be found in this comment.