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?
[2.0.41] pre_entity_died event
Re: [2.0.41] pre_entity_died event
The current entity died event is actually a pre-died event. Because once something is actually dead, we can't make a lua event for it (since it's dead). In the current died event if you set the health back to a non-zero value it doesn't actually die.
If you want to get ahold of me I'm almost always on Discord.