Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-273689

The "hit_block" enchantment effect doesn't work for non-player entities

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.21
    • None
    • Community Consensus
    • Data Packs, Enchantments

      The Bug:

      The "hit_block" enchantment effect doesn't work for non-player entities.

      Steps to Reproduce:

      1. Install the attached data pack. MC-273689.zip
      2. Build the setup as shown in the provided attachment. setup.png
      3. Ensure that the difficulty is set to "hard" and the "mobGriefing" gamerule is set to "true" by using the commands provided below.
        /difficulty hard
        /gamerule mobGriefing true
      4. While standing on top of the diamond block, summon a husk that can break doors that's holding a sword enchanted with the "Convert to Gold" enchantment by using the command provided below.
        /summon minecraft:husk ~ ~ ~ {HandItems:[{id:"minecraft:iron_sword",count:1,components:{"minecraft:enchantments":{levels:{"minecraft:convert_to_gold":1}}}},{}],CanBreakDoors:1b}
      5. Stand on the opposite side of the door as the husk, switch into survival mode, and get the husk to notice you.
      6. Watch closely as the husk begins to break down the door.

      Observed Behavior:

      The "hit_block" enchantment effect doesn't work for non-player entities.

      Expected Behavior:

      The "hit_block" enchantment effect would work for non-player entities.

        1. MC-273689.png
          MC-273689.png
          367 kB
        2. MC-273689.zip
          1 kB
        3. setup.png
          setup.png
          950 kB

            Unassigned Unassigned
            Avoma [Mod] Avoma
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: