Hi,
It looks like you're not watching for all of the various events that could result in a new working mining drill, including:
- on_entity_revived
- on_entity_cloned
- on_robot_built!
equally, for mining-drills going away.
also, in 1.0+. you should be able to register for events using a filter so that you're only called for mining-drills.