How can I get the event when material dropped on Face

There was an error in the onElementModified() callback method:

@painted_entity = entity

was this (in error):

@entity = entity

(The above example and file has been fixed.)