When an instance of damage is applied to a player using an item with the blocks_attacks component (both through the damage command and normal attacks) the item’s ability to block attacks is no longer disabled if the source entity has an item in its mainhand with the disable_blocking_for_seconds field set in the weapon component. When the damage command is used to apply the instance of damage which should disable blocking, the command fails with the message “Target is invulnerable to the given damage type“.
Previously, items with the blocks_attacks component had their ability to block damage disabled when an instance of damage was applied (both through the damage command and normal attacks) from a source entity wielding an item with disable_blocking_for_seconds set in the weapon component.
Steps to Reproduce
Summon a hostile mob and replace its mainhand slot with an item which has the
disable_blocking_for_secondsfield set in theweaponcomponent, like an axe.Begin blocking attacks from the summoned mob using an item with the
blocks_attackscomponent, like a shield.
Expected Result
The item’s ability to block attacks is disabled for the time specified in the weapon component.
Actual Result
The item’s ability to block attacks is not disabled.
Thank you for helping us improve Minecraft! We saved your files: