Making a plugin that extends the registry

Hi,
I’m working on my first Kirby plugin and just read this page in the docs:
https://getkirby.com/docs/developer-guide/plugins/registry

Is there a way for a plugin to extend the registry by adding a new type that can then be used by other plugins?

So that other plugins could do:
$kirby->set(‘mynewtype’, ‘name’, value);

Well, you could of course extend the registry, but that wouldn’t be useful, because your new extended class wouldn’t be used by Kirby.

Alright, so I hacked something together that appears to be doing what I wanted: