[2.0.41] pre_entity_died event
Posted: Sun Mar 16, 2025 5:55 am
There are "pre" events for all "mining" ways in which an entity can be removed:
- on_pre_player_mined_item -> on_player_mined_entity
- on_robot_pre_mined -> on_robot_mined_entity
- on_space_platform_pre_mined -> on_space_platform_mined_entity
However, there is no pre-event for on_entity_died. So in some of my mods, I now have to deal with "entity gets removed" events differently for the "mined" and "died" events (do pre-reqs in _pre_..._mined and on_entity_died and the actual op in _..._mined and on_post_entity_died).
Would it be possible to have a "on_pre_entity_died" event similar to the pre_..._mined events that triggers before an entity actually dies?
- on_pre_player_mined_item -> on_player_mined_entity
- on_robot_pre_mined -> on_robot_mined_entity
- on_space_platform_pre_mined -> on_space_platform_mined_entity
However, there is no pre-event for on_entity_died. So in some of my mods, I now have to deal with "entity gets removed" events differently for the "mined" and "died" events (do pre-reqs in _pre_..._mined and on_entity_died and the actual op in _..._mined and on_post_entity_died).
Would it be possible to have a "on_pre_entity_died" event similar to the pre_..._mined events that triggers before an entity actually dies?