mojira.dev
MC-295853

Blocking some damage sources using a shield with a custom blocks_attacks component ignores invincibility frames, breaking it within seconds

The Bug:

Certain damage sources such as most environmental damage sources can deal item damage every tick to a shield with a custom blocks_attacks component, despite this damage not applying every tick to the player due to invincibility frames.

How to reproduce:

  1. Place a magma block.

  2. Get a shield that is able to block all damage sources with a blocking angle of 180° using the next command:

/give @s shield[minecraft:blocks_attacks={damage_reductions:[{types:[],base:1,factor:1,horizontal_blocking_angle:180}],block_sound:"minecraft:item.shield.block"}]
  1. While blocking, step on the magma block.

  2. Notice the shield durability.

Expected result:

The shield would be damaged at the same rate the player is damaged by the magma block.

Observed result:

The shield is damaged every tick, ignoring invincibility frames and making it break within seconds.

Linked issues

Attachments

Comments 1

That’s true, the easiest way to test this is by making a scoreboard which takes the value of item damage. Even tough the block sound is played correctly, durability lowers every tick.

syarumi

(Unassigned)

Confirmed

Platform

Low

Commands, Items

1.21.5

Retrieved