-
Bug
-
Resolution: Works As Intended
-
None
-
1.18.12 Hotfix, 1.18.30, 1.18.31, 1.19.0
-
None
-
Confirmed
-
Windows
-
785809
The bug
When using the "minecraft:damage_sensor" component and specifying multiple triggers that have the capacity to run multiple events per tick, only the first one listed is applied to its target. Also noteworthy is the lag spike that occurs when the pig is first hit.
Steps to reproduce:
- Download the attached behavior pack and apply it to a world.
- In the world, summon a pig and punch it. The pig has two triggers in its damage sensor: the first one runs an event on itself, and the second an event on the damager.
- Observe chat. You should see a line from both the pig and the player, indicating both events were ran.
→
Only the line from the pig is printed, as it was listed first. The player did not receive an event despite meeting the conditions for the trigger.
Additionally, one can rearrange the triggers in the pig's behavior file, or comment out the first trigger, and confirm that the trigger listed first is the one that fires an event.