mojira.dev
MC-206307

Arrow of Harming bypasses Totem of Undying

If an Arrow of Harming's base arrow damage is enough to kill while you're holding a Totem of Undying, the Harming damage is dealt after the totem activates. You can even bypass the totem entirely with only a Harming II Arrow.

Steps to Reproduce:

  • Run "/kill" to ensure you have full health and no player-assigned attributes.

  • Set the "naturalRegeneration" gamerule to "false" to avoid yourself from regenerating.

/gamerule naturalRegeneration false
  • Obtain a totem of undying, a bow, and an arrow of harming with instant damage 2.

  • Hold the totem of undying in your offhand and the bow in your main hand.

  • Switch into survival mode and teleport yourself 23 blocks upward so that you have half a heart of health remaining.

/tp @s ~ ~23 ~
  • Look upwards and shoot yourself using the bow and harming arrow.

  • Take note as to whether or not harming arrows can bypass the totem of undying.

Linked issues

Attachments

Comments 27

I can confirm for 1.16.4

Can confirm in 20w51a.

Can confirm in 21w03a.

Can confirm in 21w06a.

Can confirm in 21w07a.

17 more comments

How it works != how it is intended. Totems are intended to keep the user alive after a hit. The player is hit once, not twice.

I test this in 25w16a, it only works if the arrow is shoot by yourself. If the arrow is from other player or from dispenser, the player would not be killed.

The mechanics of totem is bad. If player takes two times of damage at the same tick, and damage 1 pops the totem, then damage 2 still can harm or kill the player. Despite single-player or multi-players. The players in video are offline accounts but it doesn’t affect reproducing.

Note 1: Tipped arrows with instant_damage 2 actually make two damage at the same tick, first the arrow, then the effect. Weak bowing attack does about 1 damage, so the effect does about 11 damage. Full charged bowing attack does 9 damage, so the effect can only does 3 damage, according to note 3, player has 6 health at the totem-popping tick.

Note 2: Entities has 0.5s-damage-resistant-time if they get damaged, so if they get shoot by the tipped arrow, first damage is arrow, second damage is (effects minus arrow).

Note 3: After popping a totem, player has health as below:

The popping totem tick: 1 + 8(absorption) = 9

Next tick: 1+ 8(absorption) + 1(regeneration) = 10

So if player takes fatal damage x, then take two damages x+9 and x+18 at the same tick, although has two totems, player can still be killed. So this can prove that these damages happen at 1 tick.

Video 1: 1 health player got attacked by the tipped arrow, and it popped a totem and died at the same tick. (arrow pops totem and effects killed player)

Video 2: 1 health player got attacked by the tipped arrow, and it popped 2 totems at the same tick. (arrow pops totem and effects pops another totem)

Video 3: 20 health player got attacked by /damage, 20 29 38 so player takes 20 9 9 damage at one tick, and it popped 2 totems then killed the player at the same tick. (20 damage pops totem, 9 damage pops another totem, 9 damage killed the player)

How to solve? Popping totem should protect player from more damages at the same tick.

Easiest method that doesn’t change any code: Totem gives player resistance 5 for 1 tick. Not just 40s regeneration 2 and 40s fire resistance 1.

Eh I think better fix is to make instant harming arrows actually increase damage instead of hackily applying an effect the same tick. The portion of damage added could still be treated as magic damage, but it should function as a single attack rather than two at once.

This would also fix harming arrows not increasing damage properly on high power shots, which would prevent players from intentionally shooting low power shots to make the harming effect actually work.

migrated

(Unassigned)

Confirmed

Gameplay

Important

Entities, Player

1.16.4, 20w46a, 20w48a, 20w49a, 20w51a, , 1.21.1, 24w34a, 24w46a, 1.21.4, 25w16a

Retrieved