Mojira Archive
MC-272735

The hit_block effect in enchantments does not work for zombies

The hit_block effect in enchantments allows actions when a block is hit in survival mode. However, this effect only activates when a block is hit by a player, not by zombies, zombie villagers, husks, etc. Since these mobs can hit and break doors, it is expected that the effect should also work when they break doors.

Steps to reproduce

  1. Install the attached datapack
  2. /give @s minecraft:feather[minecraft:enchantments={levels:{"minecraft:netherite":1}}]
  3. Hit some doors in survival mode to confirm that the enchantment transforms doors into netherite blocks when hit
  4. Spawn a villager behind a door
  5. Ensure the difficulty is set to hard and mobGriefing is enabled
  6. Execute the following command in front of the door:
    /summon minecraft:husk ~ ~ ~ {HandItems:[{id:"minecraft:feather",count:1,components:{"minecraft:enchantments":{levels:{"minecraft:netherite":1}}}},{}],CanBreakDoors:1b}

Observed result: When the husk starts breaking the door, it does not transform into a netherite block.
Expected result: When the husk starts breaking the door, it should transform into a netherite block.

Invalid

No User

The grandpa of minecraft

2024-05-30, 09:39 PM

2024-06-21, 03:14 PM

2024-06-21, 03:14 PM

0

0

Unconfirmed

(Unassigned)

1.21 Pre-Release 1

-