Bedrock Energistics Core
    Preparing search index...

    Pistons

    Machines are destroyed when pushed by a piston and nonpersistent machine entities are despawned. However, Persistent entities are not despawned, the fluffyalien_energisticscore:on_destroyed_by_piston entity event is triggered instead.

    This allows you to run code before despawning the entity. The event can be handled in the entity event without scripting, or you can use the dataDrivenEntityTrigger world after event to listen for the entity event.