mojira.dev
MC-131637

The slowness effect is applied to entities when the bane of arthropods enchantment is held in the off hand

The Bug:

The slowness effect is applied to entities when the bane of arthropods enchantment is held in the off hand.

For example, when you melee attack a spider while having an item enchanted with bane of arthropods in your off hand, the slowness effect is applied to the entity you attacked. This doesn't make sense because the off hand item isn't being used.

Steps to Reproduce:

  1. Hold a sword enchanted with bane of arthropods in your off hand by using the command provided below.

    /item replace entity @s weapon.offhand with minecraft:netherite_sword[minecraft:enchantments={levels:{'minecraft:bane_of_arthropods':5}}]
  2. Summon a spider and attack it using your main hand.

Observed Behavior:

The slowness effect is applied to entities when the bane of arthropods enchantment is held in the off hand.

Expected Behavior:

The slowness effect would only be applied to entities if the weapon used for the attack has the bane of arthropods enchantment.

Linked issues

Attachments

Comments 6

Henry Loenwind

The same applies to Thorns. Holding an item with Thorns on it in any hand damages the attacker.

Same root cause, just a neighboring method (Enchantment.onEntityDamaged() vs Enchantment.onUserHurt()).

Confirmed for 1.13.1-pre1

Confirmed for 1.13.1

Henry Loenwind

A side effect of this is that it apples the enchantments for "main hand, off hand, head, chest, legs, feet, main hand". Notice how "main hand" is doubled up here...

Not 100% sure if this duplicates MC-3304. If not, then it definitely relates to it.

The slowness effect from the enchantment is only activated when holding an item with bane of anthropods in the offhand. However, it doesn't amplify damage under these circumstances.

Henry Loenwind

Avoma

slicedlime

Confirmed

Combat, Items

bane_of_arthropods, cave_spider, spider, weakness

Minecraft 1.12.2, Minecraft 1.13-pre2, Minecraft 1.13.1-pre1, Minecraft 1.13.1, Minecraft 1.13.2, ..., 1.17.1, 1.19, 1.19.1 Pre-release 4, 24w10a, 24w11a

24w18a

Retrieved