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

Shooting a mob with a persistent projectile from the offhand will activate a the mainhand enchantment's on hit effect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.19, 1.19.1 Pre-release 4
    • None
    • Windows 10,
      Java 17
    • Unconfirmed
    • (Unassigned)

      If you're holding an enchanted item (in the only vanilla applicable case, something with Bane of Arthropods) and you shoot a persistent projectile (arrow/trident) from your offhand at a susceptible mob (in this case a spider), it will apply the enchantment's onTargetDamaged method effect. In this case, will apply slowness to the spider, despite the actual weapon that has Bane of Arthropods never striking it. The weapon only needs to be simply held in the mainhand.
      Note that flipping hands also works. Ie, if the enchanted weapon is in the offhand and you shoot with the mainhand. Melee attacking with anything in the mainhand while the enchanted weapon is in the offhand will also work.

      I'm a modder, and discovered this when messing with some of my custom enchantments that use this method. It doesn't have very large effects in vanilla other than the single spider slowness debuff, but this will effect my mod and any other mods that add enchantments that utilize this method.

      As you can see in the attached video, it applies the slowness debuff to the spider, despite the sword never striking it. The video was recorded in vanilla MC.

            Unassigned Unassigned
            Joncraft Jonathan Hart
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: