mojira.dev
MC-195660

Arrow behavior inconsistency: damage:0.0d arrows hit mobs but not players

Arrows with the nbt damage:0.0d hit mobs while they bounce off of players.

Expected behaviour:

The arrows would hit both players and mobs, even if they do no damage.

Actual behaviour:

The arrow bounces off of the player but is able to hit the mob, still not dealing any damage.

Steps to reproduce

  1. Place a repeating command block with the following command:

    /execute as @e[type=arrow] run data modify entity @s damage set value 0
  1. Shoot a mob
    →✔ The mob gets hit but doesn't lose any health

  2. Now shoot a player or get your own arrow to hit you
    →❌  It will bounce off of the player

Attachments

Comments 9

  1. You seem to be using a non-vanilla client. Try replicating the bug with a vanilla client.

This is not a modded client. Those are items witch custom model data and a resource pack. The arrow was shot with a vanilla crossbow with a different model and texture. The lead that appeared was just from a datapack function and has nothing to do with the bug report.

[media]

 

Got it. I thought that could have been the case, hence the 'seem'.

I could've fired it from a normal crossbow and edited the function for arrows shot from any crossbow but thought it wouldn't be a problem and I also forgot to open the F3 menu. Should've done that from the start to clear up the ambiguity.

Found out this makes the arrow invisible to the player who shot it.

[media]

Can confirm in 1.17.1.

Same issue as MC-3179; all hits of less than 1 damage do this.

Affects 24w39a. The command is:

/execute as @e[type=arrow] run data modify entity @s damage set value 0

Also would like to request ownership to maintain the report as the reporter has deleted their account.

 

Can confirm in 1.21.8

user-16d15

sof

(Unassigned)

Confirmed

(Unassigned)

NBT, arrow, damage, inconsistency, mob, player

20w29a, 20w30a, 1.17.1, 24w39a, 1.21.3, 1.21.4

Retrieved