mojira.dev
MC-308771

Hitting a sulfur cube with a block inside doesn't trigger the `player_hurt_entity` advancement trigger

Sulfur Cubes with a block placed inside do not trigger player hurt entity trigger, this affects common usages with features like advancements and other datapacks. As the Sulfur Cube is still being attacked but is immune the trigger should still be counted or a more standard trigger should be exist for these use cases. The issue only occurs when a block is placed inside, outside the trigger functions correctly.

How to reproduce
1. Create an advancement datapack containing the “minecraft:player_hurt_entity” trigger for the Sulfur Cube entity (my usage provided below)

{
  "parent": "update-advancement-quests:chaos_cubed/place_block_in_sulfur_cube",
  "criteria": {
    "attack_sulfur_cube": {
      "conditions": {
        "entity": [
          {
            "condition": "minecraft:entity_properties",
            "entity": "this",
            "predicate": {
              "minecraft:entity_type": "minecraft:sulfur_cube"
            }
          }
        ]
      },
      "trigger": "minecraft:player_hurt_entity"
    }
  },
  "display": {
    "description": {
      "translate": "advancements.chaos_cubed.punch_sulfur_cube.description"
    },
    "icon": {
      "id": "minecraft:stick"
    },
    "title": {
      "translate": "advancements.chaos_cubed.punch_sulfur_cube.title"
    }
  },
  "requirements": [
    [
      "attack_sulfur_cube"
    ]
  ],
  "sends_telemetry_event": true
}
  1. Place valid block inside Sulfur Cube

  2. Attack Sulfur Cube

Expected Result:
The trigger should be activated upon attacking the entity as the action is affected the entity

Actual Result:

Trigger does not activate

Attachments

Comments 0

No comments.

A5ho9999

(Unassigned)

Confirmed

Platform

Normal

Advancements, Statistics

26.2 Release Candidate 2

Retrieved