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
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
Get a trident with Riptide I and spawn an entity
Throw the trident in mainhand
→ ✔ Score increases with 80Throw the trident in offhand while holding nothing in main hand
→ ❌ Score increases with 10
Linked issues
is duplicated by 2
relates to 2
Attachments
Comments 22
Can confirm. I'll leave a more detailed way on how to reproduce.
How to reproduce
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
Get a trident with riptide I and spawn a sheep.
Throw the trident in mainhand
→✔ Score increases with 80.Throw the trident in offhand
→❌ Score increases with 10.
It also seems that Impaling or strength work as they should in the offhand. The trident itself is the only thing that does reduced damage.
Edit: Impaling actually doesn't work in the offhand, but strength does add damage. The reason I thought it didn't was because I had a sword in my mainhand, and I discovered that mainhand weapon damage is applied to the offhand trident attack.
I think this was fixed in 24w19a (the part about applying enchantments is still in the game, but covered under MC-3304). This could also be considered fixed in 24w18a, but riptide tridents did not work correctly in that version. In the "Affected Versions", 24w19a and 24w20a are listed; I cannot reproduce the bug in these versions, nor in any version after them.
Possibly relates to MC-99063