Mojira Archive
MC-136147

Riptide tridents use mainhand item to inflict damage when thrown in the offhand

The bug

When you throw a riptide trident in the offhand, you hit with the mainhand item instead. This means that throwing a riptide trident in the offhand while holding nothing in the mainhand will make the trident deal minimal damage. This also means that a sword held in the mainhand will inflict damage, apply most of its enchantments (looting is intended), and take durability damage when you ram into mobs via riptide trident in offhand.

How to reproduce

  1. Setup a scoreboard to count all damage dealt
    /scoreboard objectives add Damage minecraft.custom:minecraft.damage_dealt
    /scoreboard objectives setdisplay sidebar Damage
    /scoreboard players add @s Damage 0
    
  2. Get a trident with Riptide I and spawn an entity
  3. Throw the trident in mainhand
    Score increases with 80
  4. Throw the trident in offhand while holding nothing in main hand
    Score increases with 10