Moving despawn detection to the entity.