Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-165197

Component minecraft:on_hurt does not do anything

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.19.50, 1.20.73 Hotfix, 1.21.0
    • None
    • Confirmed
    • Multiple
    • 947071

      The entity components documentation describes a component, minecraft:on_hurt, and the vanilla behavior json for blazes, pillagers, and end crystals contain this component. However, this component does not do anything.

      Steps to reproduce

      1. Load Test pack for on_hurt.mcpack. This pack removes the component "minecraft:on_hurt_by_player" from blazes, and adds the component "minecraft:on_hurt" to bats. In each mob, "minecraft:on_hurt" is set to run an event that includes the command, "say Ow!".
      2. Activate this pack on a world and enable Holiday Creator experiments.
      3. Make a 1 x 2 x 1 room for a blaze and a 1 x 1 x 1 room for a bat. Leave one block out of the side of the blaze room, and make one of the side blocks for the bat room a slab, so that you can hit each mob. Make one side wall block of each room a dispenser. Put arrows in the dispenser and a button on its side.
      4. Spawn a blaze in the blaze room and a bat in the bat room.
      5. Punch each mob, press the button on the dispenser to shoot each mob, and run the command </damage @e 1>.

      Expected results

      Each mob says "Ow!" when punched, when shot by a dispenser arrow, and when damaged by the damage command.

      Observed results

      The mobs do not say "Ow!"

            GoldenHelmet [Mod] GoldenHelmet
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: