To use, summon a mob with the following values in the data field:
* playerrange: Range that the player must stay within. If they leave this range, a redstone block will activate and monitoring will stop.
* fallback_x, fallback_y, fallback_z: The coordinates of the block to turn to a redstone_block if the player moves out of range
* healththreshold: The health (combined health + absorbtion) threshold that will trigger a redstone block and end monitoring if the mob falls below
* success_x, success_y, success_z: The coordinates of the block to turn to a redstone_block if the mob drops below health threshold

Then, execute the function healthmonitor:start_monitoring as the mob to be monitored


For example:
/summon zombie ~ ~1 ~ {data:{fallback_x:-63,fallback_y:71,fallback_z:72,success_x:-63,success_y:71,success_z:76,playerrange:10,healththreshold:5}}
/execute as @n[type=minecraft:zombie] run function healthmonitor:start_monitoring

